/* ── STARS CANVAS ── */
#stars-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body:not(.light-mode) #stars-canvas { opacity: 1; }
body.light-mode #stars-canvas { opacity: 1; }

/* Push main content above canvas but BELOW nav dropdown */
.pomo-main { position: relative; z-index: 1; }
nav.nav    { z-index: 1200; }

/* ============================================================
   SMARTLIB — pomodoro.css  v4
============================================================ */

.pomo-main {
   padding-top: 62px;
  min-height: 100vh;
  padding-bottom: 4rem;
  position: relative;
  z-index: 10;
}
.pomo-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 0;
  justify-content: center;
  padding: 1rem 1rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;          /* was 1 — lift above orbs/canvas */
  overflow: visible;
}

.pomo-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.85rem, 1.5vw, 1.2rem);  /* scales with viewport */
  font-weight: 900;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.pomo-stat-label {
  font-size: clamp(0.42rem, 0.9vw, 0.55rem);  /* scales with viewport */
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--txt3);
  display: block;
  margin-top: .3rem;
}

/* Tablet: 601px – 1024px */
@media (max-width: 1024px) {
  .pomo-stats {
    grid-template-columns: repeat(5, 1fr);
    padding: 0.85rem 0.25rem;
    gap: 0;
  }
  .pomo-stat { padding: 0 0.1rem; }
}

/* Mobile: ≤ 600px */
@media (max-width: 600px) {
  .pomo-main {
    padding-top: 62px !important;
  }

  .pomo-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }

  /* Last stat (streak) full width */
  .pomo-stat:last-child {
    grid-column: 1 / -1 !important;
  }

  .pomo-stat-num { font-size: 1.1rem !important; }
  .pomo-stat-label { font-size: .52rem !important; }
}

.pomo-stat-div {
  display: none;
}
/* ── Timer card ── */
.pomo-card {
  max-width: 500px;
  margin: 0 auto 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 2rem 2.5rem;
  box-shadow: 0 12px 48px rgba(0,0,0,.35);
  position: relative;
  z-index: 1;
}

/* Tabs */
.pomo-tabs { display:flex; gap:.5rem; justify-content:center; margin-bottom:2rem; background:var(--bg2); border-radius:12px; padding:.35rem; }
.pomo-tab { flex:1; background:transparent; border:none; border-radius:8px; padding:.5rem .75rem; font-family:'Nunito',sans-serif; font-size:.82rem; font-weight:700; color:var(--txt3); cursor:pointer; transition:all .2s; }
.pomo-tab.active { background:var(--bg-card); color:var(--txt); box-shadow:0 2px 8px rgba(0,0,0,.2); }
.pomo-tab:hover:not(.active) { color:var(--txt2); }

/* Circle */
.pomo-circle-wrap { position:relative; width:240px; height:240px; margin:0 auto 2rem; }
.pomo-ring { width:100%; height:100%; transform:rotate(-90deg); }
.pomo-ring-bg   { fill:none; stroke:var(--border); stroke-width:10; }
.pomo-ring-fill { fill:none; stroke:var(--teal); stroke-width:10; stroke-linecap:round; transition:stroke-dashoffset .8s linear,stroke .4s; }
.pomo-ring-fill.break { stroke:var(--gold); }
.pomo-circle-inner { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.3rem; }
.pomo-tomato { font-size:2rem; animation:pomFloat 3s ease infinite; }
@keyframes pomFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.pomo-time  { font-family:'Playfair Display',serif; font-size:3.2rem; font-weight:900; color:var(--txt); line-height:1; letter-spacing:-.02em; }
.pomo-label { font-size:.72rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--txt3); }

/* Controls */
.pomo-controls { display:flex; align-items:center; justify-content:center; gap:1.2rem; margin-bottom:2rem; }
.pomo-btn-main {
  width:68px; height:68px; border-radius:50%;
  background:linear-gradient(135deg,var(--teal),#3aaa9e);
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; flex-direction:column; gap:.15rem;
  color:#0a0a0a; font-family:'Nunito',sans-serif; font-size:.65rem; font-weight:800;
  box-shadow:0 6px 24px rgba(94,196,182,.4);
  transition:transform .2s,box-shadow .2s;
}
.pomo-btn-main svg { width:22px; height:22px; }
.pomo-btn-main:hover { transform:scale(1.06); box-shadow:0 8px 32px rgba(94,196,182,.55); }
.pomo-btn-main:active { transform:scale(.97); }
.pomo-btn-icon { width:46px; height:46px; border-radius:50%; background:var(--bg2); border:1px solid var(--border); cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--txt2); transition:all .2s; }
.pomo-btn-icon svg { width:18px; height:18px; }
.pomo-btn-icon:hover { border-color:var(--teal); color:var(--teal); }
.pomo-btn-outline { background:transparent; border:1px solid var(--border); color:var(--txt2); font-family:'Nunito',sans-serif; font-size:.85rem; font-weight:600; padding:.6rem 1.2rem; border-radius:30px; cursor:pointer; transition:all .2s; }
.pomo-btn-outline:hover { border-color:var(--teal); color:var(--teal); }

/* Settings */
.pomo-settings { border-top:1px solid var(--border); padding-top:1.5rem; display:flex; flex-direction:column; gap:1rem; }
.pomo-setting-row { display:flex; align-items:center; justify-content:space-between; }
.pomo-setting-label { font-size:.82rem; font-weight:600; color:var(--txt2); }
.pomo-stepper { display:flex; align-items:center; gap:.6rem; font-family:'Playfair Display',serif; font-size:.9rem; font-weight:700; color:var(--txt); }
.stepper-btn { width:28px; height:28px; border-radius:50%; background:var(--bg2); border:1px solid var(--border); cursor:pointer; font-size:1rem; color:var(--txt2); display:flex; align-items:center; justify-content:center; transition:all .15s; }
.stepper-btn:hover { border-color:var(--gold); color:var(--gold); }
.pomo-switch { position:relative; display:inline-block; width:40px; height:22px; cursor:pointer; }
.pomo-switch input { opacity:0; width:0; height:0; }
.pomo-track { position:absolute; inset:0; background:var(--bg2); border:1px solid var(--border); border-radius:22px; transition:all .25s; }
.pomo-track::before { content:''; position:absolute; left:3px; top:2px; width:16px; height:16px; border-radius:50%; background:var(--txt3); transition:transform .25s,background .25s; }
.pomo-switch input:checked + .pomo-track { background:var(--teal); border-color:var(--teal); }
.pomo-switch input:checked + .pomo-track::before { transform:translateX(18px); background:#fff; }
.pomo-login-note { text-align:center; margin-top:1.2rem; font-size:.8rem; color:var(--txt3); }
.pomo-login-note a { color:var(--gold); }

/* Tips */
.pomo-tips { max-width:500px; margin:0 auto; display:flex; flex-direction:column; gap:.85rem; position:relative; z-index:1; }
.pomo-tip { background:var(--bg-card); border:1px solid var(--border); border-radius:14px; padding:1rem 1.25rem; display:flex; align-items:flex-start; gap:1rem; }
.pomo-tip span   { font-size:1.5rem; flex-shrink:0; margin-top:.1rem; }
.pomo-tip strong { font-family:'Playfair Display',serif; font-size:.88rem; color:var(--txt); display:block; margin-bottom:.2rem; }
.pomo-tip p      { font-size:.78rem; color:var(--txt3); line-height:1.5; margin:0; }

/* ── Overlay — FIXED: hidden by default, never blocks clicks when closed ── */
.pomo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s ease;
  pointer-events: none;
}
.pomo-overlay.active {
  display: flex;
  pointer-events: auto;
}
/* Safety: if inline style display:none, never block clicks */
.pomo-overlay[style*="display:none"],
.pomo-overlay[style*="display: none"] {
  pointer-events: none !important;
}

@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.pomo-overlay-box { background:var(--bg-card); border:1px solid var(--border); border-radius:24px; padding:2.5rem 2rem; max-width:360px; width:90%; text-align:center; box-shadow:0 24px 80px rgba(0,0,0,.6); animation:slideUp .35s ease; }
@keyframes slideUp { from{transform:translateY(24px);opacity:0} to{transform:translateY(0);opacity:1} }
.pomo-overlay-emoji { font-size:4rem; margin-bottom:.75rem; }
.pomo-overlay-box h2 { font-family:'Playfair Display',serif; font-size:1.6rem; font-weight:900; color:var(--txt); margin-bottom:.5rem; }
.pomo-overlay-box p  { font-size:.88rem; color:var(--txt2); margin-bottom:1.5rem; line-height:1.6; }
.pomo-overlay-actions { display:flex; gap:.75rem; justify-content:center; }

/* Running glow */
.pomo-card.running .pomo-ring-fill { filter:drop-shadow(0 0 8px rgba(94,196,182,.6)); }

@media (max-width: 1024px) {
  .pomo-stats {
    grid-template-columns: repeat(5, 1fr);
    padding: 0.85rem 0.25rem;
  }
  .pomo-stat { padding: 0 0.1rem; }
  .pomo-stat-num  { font-size: clamp(0.85rem, 1.5vw, 1.2rem); }
  .pomo-stat-label { font-size: clamp(0.42rem, 0.9vw, 0.55rem); }
}

@media(max-width:600px) {
  .pomo-card { margin:0 1rem; }
  .pomo-tips { margin:0 1rem; }
  .pomo-time { font-size:2.6rem; }
  .pomo-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 0;
    padding: 0.85rem 0.5rem;
  }
  .pomo-stat-div { display:none; }
  .pomo-stat:nth-child(8),
  .pomo-stat:nth-child(10) {
    grid-column: span 2;
  }
}