/* =============================================
   FocusFlow Pomodoro — style.css
   Theme: Warm orange #ff6b00
   Style: Glassmorphism, minimal, calm
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #ff6b00;
  --orange-light: #ff9944;
  --orange-pale: rgba(255,107,0,0.12);
  --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);
  --shadow-orange: rgba(255,107,0,0.18);
  --ring-track: rgba(255,107,0,0.12);
}

[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);
  --shadow-orange: rgba(255,107,0,0.25);
  --ring-track: rgba(255,107,0,0.10);
}

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 BLOBS ── */
.blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.8s ease, background 0.8s ease;
}
.blob-1 { width: 500px; height: 500px; background: #ff6b00; top: -160px; left: -120px; filter: blur(100px); opacity: 0.18; }
.blob-2 { width: 360px; height: 360px; background: #ffaa55; bottom: -100px; right: -80px;  filter: blur(90px);  opacity: 0.18; }
.blob-3 { width: 240px; height: 240px; background: #ff9944; top: 45%; left: 55%;           filter: blur(80px);  opacity: 0.12; }

body.running .blob-1 { opacity: 0.26; }
body.running .blob-2 { opacity: 0.22; }
[data-theme="dark"] .blob-1 { opacity: 0.22; }
[data-theme="dark"] .blob-2 { opacity: 0.18; }
[data-theme="dark"].running .blob-1 { opacity: 0.32; }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.60);
  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; letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ff6b00, #ff9944);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.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; border: none; background: transparent;
  color: var(--text-mid); font-family: 'Sora', sans-serif; transition: all 0.2s;
}
.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 {
  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: var(--orange-pale); border-color: #ff6b00; }

/* ── MAIN ── */
main {
  position: relative; z-index: 1;
  padding: 44px 20px 80px;
  display: flex; flex-direction: column; align-items: center;
}

/* ── GLASS CARD ── */
.glass-card {
  width: 100%; max-width: 520px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: 28px; padding: 36px 36px 32px;
  box-shadow:
    0 8px 40px var(--shadow-orange),
    0 2px 8px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.85);
  transition: box-shadow 0.5s ease, background 0.3s ease;
}
body.running .glass-card {
  box-shadow:
    0 12px 60px var(--shadow-orange),
    0 4px 16px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

/* ── MODE TABS ── */
.mode-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 32px; }

.mode-tab {
  padding: 7px 16px; border-radius: 100px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid rgba(255,107,0,0.25); background: transparent;
  color: var(--text-soft); font-family: 'Sora', sans-serif; transition: all 0.22s;
  letter-spacing: 0.2px;
}
.mode-tab.active { background: #ff6b00; border-color: #ff6b00; color: #fff; box-shadow: 0 3px 12px rgba(255,107,0,0.30); }
.mode-tab:not(.active):hover { border-color: #ff6b00; color: #ff6b00; background: rgba(255,107,0,0.05); }

/* ── TIMER RING ── */
.timer-wrap {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 32px; position: relative;
}

.timer-svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--ring-track); stroke-width: 8; }
.ring-progress {
  fill: none; stroke-width: 8; stroke-linecap: round;
  stroke: url(#ringGrad);
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(255,107,0,0.45));
}
body.running .ring-progress { filter: drop-shadow(0 0 10px rgba(255,107,0,0.60)); }

.timer-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
}
.timer-display {
  font-size: 54px; font-weight: 700; letter-spacing: -2px;
  color: var(--text-dark); line-height: 1; transition: color 0.3s;
}
.timer-label {
  font-size: 11px; font-weight: 600; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 1.5px;
}

/* ── PULSE ANIMATION ── */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,0,0.20); }
  70%  { box-shadow: 0 0 0 14px rgba(255,107,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
}
.pulse-circle {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity 0.4s;
}
body.running .pulse-circle { opacity: 1; animation: pulse-ring 2s ease-out infinite; }

/* ── MOTIVATIONAL TEXT ── */
.motive-text {
  text-align: center; font-size: 13px; color: var(--text-soft);
  margin-bottom: 28px; min-height: 20px; transition: color 0.3s;
  font-style: italic; letter-spacing: 0.1px;
}

/* ── CURRENT TASK CARD ── */
.current-task {
  background: rgba(255,107,0,0.07);
  border: 1.5px solid rgba(255,107,0,0.15);
  border-radius: 12px; padding: 11px 16px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.task-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6b00; flex-shrink: 0; }
.task-text-label { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.task-name { font-size: 13px; color: var(--text-dark); font-weight: 600; flex: 1; }
.task-edit {
  font-size: 11px; color: #ff6b00; cursor: pointer; font-weight: 600;
  padding: 2px 6px; border-radius: 6px; transition: background 0.15s;
  border: none; background: transparent; font-family: 'Sora', sans-serif;
}
.task-edit:hover { background: rgba(255,107,0,0.10); }

/* ── CONTROLS ── */
.controls {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 28px;
}

.btn-reset,
.btn-skip {
  width: 48px; height: 48px; 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;
  transition: all 0.2s; color: var(--text-mid);
}
.btn-reset:hover,
.btn-skip:hover {
  border-color: #ff6b00; color: #ff6b00;
  background: rgba(255,107,0,0.06);
  transform: translateY(-1px);
}
.btn-reset svg,
.btn-skip svg { width: 18px; height: 18px; }

.btn-main {
  width: 72px; height: 72px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #ff6b00, #ff9944);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(255,107,0,0.40);
  transition: all 0.22s; font-family: 'Sora', sans-serif;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(255,107,0,0.50); }
.btn-main:active { transform: translateY(0); box-shadow: 0 4px 16px rgba(255,107,0,0.35); }
.btn-main svg { width: 26px; height: 26px; }

/* ── SESSION DOTS ── */
.session-row {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 20px; border-top: 1px solid rgba(255,107,0,0.09);
}
.session-label { font-size: 11px; color: var(--text-soft); font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; }
.session-dots { display: flex; gap: 10px; }

.session-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,107,0,0.30); background: transparent;
  transition: all 0.3s ease;
}
.session-dot.done   { background: #ff6b00; border-color: #ff6b00; box-shadow: 0 0 8px rgba(255,107,0,0.40); }
.session-dot.active { border-color: #ff6b00; background: rgba(255,107,0,0.18); animation: dot-pulse 1.4s ease-in-out infinite; }

@keyframes dot-pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.30); backdrop-filter: blur(4px);
  z-index: 500; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--glass-bg); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border); border-radius: 20px;
  padding: 28px; width: 340px;
  box-shadow: 0 16px 48px rgba(255,107,0,0.16);
}
.modal h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 14px; }

.modal-input {
  width: 100%; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  font-family: 'Sora', sans-serif; color: var(--text-dark);
  background: rgba(255,255,255,0.80); border: 1.5px solid rgba(255,107,0,0.20);
  outline: none; margin-bottom: 14px;
}
[data-theme="dark"] .modal-input { background: rgba(50,25,12,0.80); }
.modal-input:focus { border-color: rgba(255,107,0,0.50); }

.modal-btns { display: flex; gap: 8px; justify-content: flex-end; }

.modal-cancel {
  padding: 9px 18px; border-radius: 10px; border: 1.5px solid rgba(255,107,0,0.25);
  background: transparent; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--text-mid); font-family: 'Sora', sans-serif; transition: all 0.15s;
}
.modal-cancel:hover { border-color: #ff6b00; color: #ff6b00; }

.modal-save {
  padding: 9px 18px; border-radius: 10px; border: none;
  background: #ff6b00; cursor: pointer; font-size: 13px; font-weight: 600;
  color: #fff; font-family: 'Sora', sans-serif; transition: all 0.15s;
  box-shadow: 0 4px 12px rgba(255,107,0,0.30);
}
.modal-save:hover { background: #e85f00; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .navbar    { padding: 0 20px; }
  .glass-card { padding: 24px 20px; border-radius: 20px; }
  .timer-display { font-size: 44px; }
  .nav-tab   { padding: 7px 12px; font-size: 12px; }
}
nav a {
  text-decoration: none;
}