/* =============================================
   FocusFlow — style.css
   Theme: Soft warm orange (#ff6b00)
   Style: Glassmorphism, minimal, modern SaaS
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS VARIABLES (light) ── */
:root {
  --text-dark: #2d1a0e;
  --text-mid: #9a7a6a;
  --text-soft: #c4a090;
  --bg-grad-1: #fff8f3;
  --bg-grad-2: #ffeee0;
  --bg-grad-3: #fff3eb;
  --bg-grad-4: #ffe8d6;
  --glass-bg: rgba(255,255,255,0.60);
  --glass-border: rgba(255,255,255,0.80);
  --card-bg: rgba(255,255,255,0.72);
  --card-border: rgba(255,107,0,0.09);
  --shadow-orange: rgba(255,107,0,0.08);
  --input-bg: rgba(255,255,255,0.80);
  --input-border: rgba(255,107,0,0.15);
  --stats-border: rgba(255,107,0,0.09);
  --empty-icon-color: #b09080;
  --empty-sub-color: #c4a090;
  --task-text-done: #b09080;
  --delete-color: #d4b0a0;
}

[data-theme="dark"] {
  --text-dark: #f5e6d8;
  --text-mid: #c4a090;
  --text-soft: #9a7a6a;
  --bg-grad-1: #1a0f07;
  --bg-grad-2: #241308;
  --bg-grad-3: #1f110a;
  --bg-grad-4: #2a160c;
  --glass-bg: rgba(40,20,10,0.70);
  --glass-border: rgba(255,255,255,0.08);
  --card-bg: rgba(50,25,12,0.72);
  --card-border: rgba(255,107,0,0.13);
  --shadow-orange: rgba(255,107,0,0.18);
  --input-bg: rgba(50,25,12,0.80);
  --input-border: rgba(255,107,0,0.20);
  --stats-border: rgba(255,107,0,0.12);
  --empty-icon-color: #9a7a6a;
  --empty-sub-color: #9a7a6a;
  --task-text-done: #7a5a4a;
  --delete-color: #9a7a6a;
}

body {
  font-family: 'Sora', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg,
    var(--bg-grad-1) 0%,
    var(--bg-grad-2) 40%,
    var(--bg-grad-3) 70%,
    var(--bg-grad-4) 100%
  );
  color: var(--text-dark);
  overflow-x: hidden;
  position: relative;
  transition: background 0.5s ease, color 0.3s ease;
}

/* ── AMBIENT GLOW BLOBS ── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.8s ease, background 0.8s ease;
}
.blob-1 { width: 420px; height: 420px; background: #ff6b00; top: -120px; left: -80px; }
.blob-2 { width: 320px; height: 320px; background: #ffaa55; bottom: -80px; right: -60px; }
.blob-3 { width: 200px; height: 200px; background: #ff9944; top: 50%; left: 60%; }

[data-theme="dark"] .blob-1 { opacity: 0.22; }
[data-theme="dark"] .blob-2 { opacity: 0.18; }

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 107, 0, 0.10);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(30,15,6,0.72);
  border-bottom-color: rgba(255,107,0,0.15);
}

.logo {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b00, #ff9944);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}
.logo span { font-weight: 300; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  color: var(--text-mid);
  background: transparent;
  font-family: 'Sora', sans-serif;
}
.nav-tab.active {
  background: #ff6b00;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.30);
}
.nav-tab:not(.active):hover {
  background: rgba(255, 107, 0, 0.08);
  color: #ff6b00;
}

/* Theme toggle — matches pomodoro exactly */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 107, 0, 0.25);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--text-mid);
}
.theme-toggle:hover {
  background: rgba(255,107,0,0.12);
  border-color: #ff6b00;
}

/* ── MAIN LAYOUT ── */
main {
  position: relative;
  z-index: 1;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── GLASS CARD ── */
.glass-card {
  width: 100%;
  max-width: 640px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 36px 36px 32px;
  box-shadow:
    0 8px 32px var(--shadow-orange),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── SECTION HEADING ── */
.section-heading { margin-bottom: 28px; }

.section-heading h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.heading-accent {
  display: inline-block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #ff6b00, #ffaa55);
  border-radius: 2px;
  margin-top: 8px;
}

/* ── INPUT ROW ── */
.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.task-input {
  flex: 1;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-family: 'Sora', sans-serif;
  color: var(--text-dark);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.task-input::placeholder { color: var(--text-soft); }
.task-input:focus {
  border-color: rgba(255, 107, 0, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.add-btn {
  padding: 13px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  color: #fff;
  background: #ff6b00;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.30);
  letter-spacing: 0.1px;
}
.add-btn:hover {
  background: #e85f00;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.38);
}
.add-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.28);
}

/* ── FILTER PILLS ── */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-pill {
  padding: 7px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid rgba(255, 107, 0, 0.30);
  background: transparent;
  color: var(--text-mid);
  font-family: 'Sora', sans-serif;
  letter-spacing: 0.2px;
}
.filter-pill.active {
  background: #ff6b00;
  border-color: #ff6b00;
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 107, 0, 0.28);
}
.filter-pill:not(.active):hover {
  border-color: #ff6b00;
  color: #ff6b00;
  background: rgba(255, 107, 0, 0.05);
}

/* ── TASK LIST ── */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 40px;
}

/* ── TASK CARD ── */
.task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: default;
  transition: all 0.22s ease;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Priority left strip */
.task-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
}
.task-card.priority-high::before { background: #ff6b00; }
.task-card.priority-med::before  { background: #ffaa44; }
.task-card.priority-low::before  { background: #88c88a; }

.task-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(255, 107, 0, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.05);
  border-color: rgba(255, 107, 0, 0.18);
}

.task-card.done { opacity: 0.55; }

/* ── CHECKBOX ── */
.checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 0, 0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
}
.checkbox.checked {
  background: #ff6b00;
  border-color: #ff6b00;
}
.checkbox.checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(42deg) translateY(-1px);
  display: block;
}
.checkbox:not(.checked):hover {
  border-color: #ff6b00;
  background: rgba(255, 107, 0, 0.07);
}

/* ── TASK TEXT ── */
.task-text {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.5;
  transition: all 0.2s;
}
.task-card.done .task-text {
  text-decoration: line-through;
  color: var(--task-text-done);
}

/* ── DELETE BUTTON ── */
.delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--delete-color);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
  font-family: 'Sora', sans-serif;
  opacity: 0;
}
.task-card:hover .delete-btn { opacity: 1; }
.delete-btn:hover {
  background: rgba(220, 60, 40, 0.09);
  color: #cc3030;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
}
.empty-icon   { font-size: 48px; opacity: 0.3; }
.empty-title  { font-size: 15px; font-weight: 600; color: var(--empty-icon-color); }
.empty-sub    { font-size: 13px; color: var(--empty-sub-color); text-align: center; line-height: 1.5; }

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--stats-border);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.stat-num   { font-size: 20px; font-weight: 700; color: #ff6b00; }
.stat-label { font-size: 11px; color: var(--text-soft); font-weight: 500; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .navbar { padding: 0 20px; }
  .glass-card { padding: 24px 20px 24px; border-radius: 18px; }
  .section-heading h1 { font-size: 22px; }
  .nav-tab { padding: 7px 12px; font-size: 12px; }
  .add-btn { padding: 13px 16px; }
}

nav a { text-decoration: none; }
