:root {
  --accent-2: #ff7300;
  --accent: #ffce00;

  --bg: linear-gradient(135deg,#f8f9fa,#e9ecef);
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6c757d;
  --shadow: 0 10px 25px rgba(0,0,0,.08);
}

body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  accent-color: var(--accent-2);
  transition: background .4s ease, color .4s ease;
}

.container-narrow { max-width: 960px; }

h1 { font-weight: 800; }

.cardish {
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.rule {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  margin: 18px 0;
}

.toggle-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  background: linear-gradient(135deg,var(--accent),var(--accent-2));
  color: var(--card);
  box-shadow: 0 8px 16px rgba(0,0,0,.12);
}

.toggle-btn:hover { transform: translateY(-1px); }

.form-control {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.percent { font-weight: 800; color: var(--accent-2); }

.progress {
  height: 14px;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-bar {
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
}

pre {
  padding: 16px;
}

.muted { color: var(--muted); }

footer {
  font-size: .9rem;
  color: var(--muted);
}

/* ================= DARK MODE ================= */

body.dark {
  --bg: linear-gradient(135deg,#0e0e0e,#1a1a1a);
  --card: #151515;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --shadow: 0 16px 40px rgba(0,0,0,.6);
  accent-color: var(--accent);
}

body.dark .form-control {
  background: #0f0f0f;
  border-color: #2a2a2a;
  color: #f3f4f6;
}

body.dark .form-control::placeholder {
  color: #6b7280;
}

body.dark .toggle-btn {
  color: #111;
}

body.dark .percent {
  color: var(--accent);
}

body.dark .progress {
  background: #222;
}

body.dark pre {
  background: #0f0f0f;
  color: #e5e7eb;
}

body.dark .btn-dark,
body.dark .btn {
  background: linear-gradient(135deg,var(--accent),var(--accent-2));
  border: none;
  color: #111;
}

/* ====================== Scheduled Slots ====================== */
#timeSlots { padding-left: 0; }
#timeSlots li { margin-bottom: 6px; }
#timeSlots label { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
#timeSlots input[type="checkbox"] { margin-right: 10px; transform: scale(1.2); }
#timeSlots .slotTime { font-weight: 600; }
#timeSlots .slotNote { font-size: 0.9rem; color: var(--muted); margin-left: auto; }
.dark #timeSlots .slotNote { color: #bbb; }

/* ====================== Strike-through ====================== */

/* ------------------- Strike-through for text only ------------------- */

label.done span,
label.just-done span {
  position: relative;
  opacity: 0.6;
}

label.done span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}

label.just-done span::after {
  width: 0;
  animation: strike 0.35s ease-out forwards;
}

@keyframes strike {
  from { width: 0; }
  to   { width: 100%; }
}
