/* ---------- Theme variables (defaults = Ocean, overridden by JS) ---------- */
:root {
  --primary: #2563eb;
  --primary-soft: #eff4ff;
  --accent: #2563eb;

  --bg: #fafafa;
  --card: #ffffff;
  --line: #e7e7e7;
  --text: #1a1a1a;
  --text-dim: #8a8a8a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Vazirmatn", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* one shared transition rule -> everything recolours at once */
.ct-transition {
  transition: color 250ms ease, background-color 250ms ease,
    border-color 250ms ease;
}

/* ---------- Layout ---------- */
.ct-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 56px;
}

.ct-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px 22px;
}

/* ---------- Header ---------- */
.ct-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.ct-badge {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.ct-title {
  margin: 0;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ct-tagline {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Theme switcher ---------- */
.ct-switcher {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin: 0 0 10px;
}

.ct-dot {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  opacity: 0.4;
  transition: opacity 180ms ease, transform 180ms ease;
}
.ct-dot:hover { opacity: 0.75; }
.ct-dot-active { opacity: 1; }
.ct-dot-check { font-size: 11px; }

.ct-quip {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 0 0 20px;
}
.ct-quip-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-inline-end: 6px;
}

/* ---------- Input ---------- */
.ct-inputrow {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.ct-input {
  flex: 1;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.ct-input::placeholder { color: var(--text-dim); }
.ct-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.ct-add {
  width: 44px;
  flex: 0 0 auto;
  border: none;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  cursor: pointer;
  background: var(--primary);
  transition: opacity 150ms ease, transform 120ms ease;
}
.ct-add:hover { opacity: 0.9; }
.ct-add:active { transform: scale(0.96); }

/* ---------- Progress ---------- */
.ct-progress-wrap { margin-bottom: 18px; }
.ct-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-family: "JetBrains Mono", monospace;
}
.ct-progress-track {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.ct-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 350ms ease, background-color 250ms ease;
}

/* ---------- Filters ---------- */
.ct-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ct-filter {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.ct-filter:hover { color: var(--text); }
.ct-filter-active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}
.ct-clear {
  margin-inline-start: auto;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.ct-clear:hover { color: var(--primary); }

/* ---------- Task list ---------- */
.ct-list { display: flex; flex-direction: column; }

.ct-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.ct-task:last-child { border-bottom: none; }
.ct-task-done { opacity: 0.6; }

.ct-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.ct-check:hover { border-color: var(--primary); }
.ct-check-on {
  background: var(--primary);
  border-color: var(--primary);
}

.ct-task-text {
  flex: 1;
  font-size: 14.5px;
  color: var(--text);
  word-break: break-word;
}
.ct-task-done .ct-task-text {
  text-decoration: line-through;
  color: var(--text-dim);
}

.ct-del {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.5;
}
.ct-del:hover { opacity: 1; color: #dc2626; }

/* ---------- Empty ---------- */
.ct-empty {
  text-align: center;
  padding: 40px 10px;
  color: var(--text-dim);
  font-size: 14px;
}
.ct-empty-face {
  font-size: 32px;
  margin-bottom: 10px;
  opacity: 0.7;
}

/* ---------- Footer ---------- */
.ct-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11.5px;
  color: var(--text-dim);
}
.ct-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.ct-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Minimal animations ---------- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.ct-shake { animation: shake 0.3s ease; }

@media (max-width: 480px) {
  .ct-card { padding: 22px 16px 18px; }
}