/* ============================================
   NIGHTWAVE — Premium Dark PWA Stylesheet
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #07070f;
  --bg2: #0d0d1a;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.15);
  --text: #e8e8f0;
  --text2: #9090b0;
  --text3: #5a5a80;
  --purple: #a78bfa;
  --blue: #38bdf8;
  --pink: #f472b6;
  --green: #34d399;
  --yellow: #fbbf24;
  --purple-glow: rgba(167,139,250,0.3);
  --blue-glow: rgba(56,189,248,0.3);
  --pink-glow: rgba(244,114,182,0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --header-h: 60px;
  --nav-h: 58px;
  --np-h: 64px;
  --font: 'Syne', sans-serif;
  --mono: 'Space Mono', monospace;
}

[data-theme="neon"] {
  --bg: #00030a;
  --bg2: #000814;
  --purple: #bf00ff;
  --blue: #00e5ff;
  --pink: #ff006e;
  --purple-glow: rgba(191,0,255,0.35);
  --blue-glow: rgba(0,229,255,0.35);
  --pink-glow: rgba(255,0,110,0.35);
}

[data-theme="cyberpunk"] {
  --bg: #0a0005;
  --bg2: #120008;
  --purple: #ff2d78;
  --blue: #00f5ff;
  --pink: #ffee00;
  --purple-glow: rgba(255,45,120,0.35);
  --blue-glow: rgba(0,245,255,0.35);
  --pink-glow: rgba(255,238,0,0.35);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  position: fixed;
  width: 100%;
}

/* === BACKGROUND === */
#starCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.bg-gradient {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167,139,250,0.15), transparent),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(56,189,248,0.1), transparent),
              radial-gradient(ellipse 50% 60% at 20% 70%, rgba(244,114,182,0.08), transparent);
  animation: gradientShift 20s ease infinite alternate;
}

@keyframes gradientShift {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.bg-orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.12; animation: orbFloat 25s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--purple); top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: var(--blue); bottom: 0; right: -80px; animation-delay: -8s; }
.orb-3 { width: 250px; height: 250px; background: var(--pink); top: 40%; left: 50%; animation-delay: -15s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === INSTALL BANNER === */
.install-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  padding: 10px 16px; transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.install-banner:not(.hidden) { transform: translateY(0); }
.install-banner.hidden { transform: translateY(-100%); }
.install-banner-inner {
  display: flex; align-items: center; gap: 10px; max-width: 480px; margin: 0 auto;
}
.install-icon { font-size: 18px; }
.install-banner-inner span:nth-child(2) { flex: 1; font-size: 14px; font-weight: 600; }
.btn-install {
  background: rgba(255,255,255,0.25); border: 1px solid rgba(255,255,255,0.4);
  color: white; padding: 5px 14px; border-radius: 20px; font-family: var(--font);
  font-weight: 700; font-size: 13px; cursor: pointer; transition: background 0.2s;
}
.btn-install:hover { background: rgba(255,255,255,0.4); }
.btn-close-install {
  background: none; border: none; color: rgba(255,255,255,0.7);
  cursor: pointer; font-size: 16px; padding: 4px;
}

/* === APP SHELL === */
.app {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  max-width: 480px; margin: 0 auto;
}

/* === HEADER === */
.header {
  height: var(--header-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
  background: rgba(7,7,15,0.8); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); flex-shrink: 0; z-index: 10;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.logo-img {
  height: 42px; width: auto;
  filter: drop-shadow(0 0 8px rgba(56,189,248,0.5)) brightness(1.1) saturate(1.2);
  object-fit: contain;
}
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.icon-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }

/* === NAV TABS === */
.nav-tabs {
  display: flex; background: rgba(7,7,15,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); flex-shrink: 0; padding: 0 8px;
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 10px 4px; background: none; border: none;
  color: var(--text3); cursor: pointer; font-family: var(--font);
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  position: relative; transition: color 0.25s; text-transform: uppercase;
}
.tab-btn svg { transition: color 0.25s; }
.tab-btn::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 2px 2px 0 0; transform: scaleX(0); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.tab-btn.active { color: var(--purple); }
.tab-btn.active::after { transform: scaleX(1); }

/* === MAIN CONTENT === */
.main-content {
  flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: calc(var(--np-h) + 16px);
}
.main-content::-webkit-scrollbar { display: none; }

.tab-section { display: none; padding: 20px 16px; animation: fadeSlideUp 0.35s ease both; }
.tab-section.active { display: block; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header { margin-bottom: 20px; }
.section-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.section-header p { font-size: 13px; color: var(--text2); }

/* === GLOBAL CONTROLS === */
.global-controls {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px;
}
.btn-global-play {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border: none; border-radius: 10px; color: white; padding: 10px 18px;
  font-family: var(--font); font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all 0.25s; box-shadow: 0 4px 20px var(--purple-glow); white-space: nowrap;
}
.btn-global-play:hover { transform: translateY(-1px); box-shadow: 0 6px 25px var(--purple-glow); }
.btn-global-play.playing { background: linear-gradient(135deg, var(--pink), var(--purple)); }
.master-volume { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--text2); }
.master-volume input[type=range] { flex: 1; }

/* === SOUNDS GRID === */
.sounds-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.sound-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1); position: relative; overflow: hidden;
}
.sound-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--card-color, var(--purple)), transparent);
  opacity: 0; transition: opacity 0.3s; border-radius: inherit;
}
.sound-card.active { border-color: var(--card-color, var(--purple)); box-shadow: 0 0 20px var(--card-glow, var(--purple-glow)); }
.sound-card.active::before { opacity: 0.1; }
.sound-card:hover { transform: translateY(-2px); border-color: var(--border2); }

.sound-emoji { font-size: 28px; margin-bottom: 8px; display: block; }
.sound-name { font-size: 13px; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 10px; }
.sound-vol {
  width: 100%; accent-color: var(--card-color, var(--purple));
  -webkit-appearance: none; appearance: none; height: 3px;
  background: var(--border2); border-radius: 3px; cursor: pointer; outline: none;
}
.sound-vol::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--card-color, var(--purple)); cursor: pointer;
  box-shadow: 0 0 8px var(--card-glow, var(--purple-glow));
}
.sound-active-dot {
  position: absolute; top: 10px; right: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--card-color, var(--purple));
  opacity: 0; transition: opacity 0.3s; animation: pulse 1.5s ease-in-out infinite;
}
.sound-card.active .sound-active-dot { opacity: 1; }
@keyframes pulse { 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.4); opacity:0.7; } }

/* === MIXER === */
.presets-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: none; }
.presets-bar::-webkit-scrollbar { display: none; }
.preset-chip {
  white-space: nowrap; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text2); padding: 6px 14px; font-family: var(--font);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.preset-chip.active, .preset-chip:hover {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-color: transparent; color: white;
}

.mixer-sliders { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.mixer-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.mixer-emoji { font-size: 20px; width: 28px; text-align: center; }
.mixer-name { font-size: 13px; font-weight: 600; width: 80px; color: var(--text2); }
.mixer-vol-wrap { flex: 1; }
.mixer-vol {
  width: 100%; accent-color: var(--purple);
  -webkit-appearance: none; appearance: none; height: 4px;
  background: var(--border2); border-radius: 4px; cursor: pointer; outline: none;
}
.mixer-vol::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue)); cursor: pointer;
  box-shadow: 0 0 10px var(--purple-glow);
}
.mixer-pct { font-family: var(--mono); font-size: 12px; color: var(--text3); width: 32px; text-align: right; }

.mixer-actions { display: flex; gap: 10px; margin-bottom: 24px; }
.btn-primary, .btn-secondary {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius-sm); font-family: var(--font);
  font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.25s; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white; box-shadow: 0 4px 20px var(--purple-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 25px var(--purple-glow); }
.btn-secondary {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.btn-secondary:hover { background: var(--surface2); border-color: var(--border2); }

.ai-suggest {
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(56,189,248,0.08));
  border: 1px solid rgba(167,139,250,0.2); border-radius: var(--radius); padding: 18px;
}
.ai-suggest-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ai-badge {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white; font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; letter-spacing: 0.5px;
}
.ai-suggest h3 { font-size: 16px; font-weight: 700; }
.ai-desc { font-size: 13px; color: var(--text2); margin-bottom: 14px; line-height: 1.5; }
.btn-ai {
  background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(56,189,248,0.2));
  border: 1px solid rgba(167,139,250,0.4); color: var(--purple);
  padding: 10px 18px; border-radius: var(--radius-sm); font-family: var(--font);
  font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.25s; width: 100%;
}
.btn-ai:hover { background: linear-gradient(135deg, rgba(167,139,250,0.3), rgba(56,189,248,0.3)); }

/* === TIMER === */
.timer-display { display: flex; justify-content: center; margin-bottom: 24px; }
.timer-ring-wrap { position: relative; width: 200px; height: 200px; }
.timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: var(--surface2); stroke-width: 6; }
.timer-prog {
  fill: none; stroke: url(#timerGrad); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 534; stroke-dashoffset: 534;
  transition: stroke-dashoffset 1s linear;
}
.pomo-track { stroke: rgba(244,114,182,0.1); }
.pomo-prog { stroke: url(#pomoGrad); stroke-dasharray: 534; stroke-dashoffset: 0; }

/* SVG gradient defs injected by JS */

.timer-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.timer-time { font-family: var(--mono); font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.timer-label { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.timer-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.time-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text2); padding: 7px 14px;
  font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.time-chip.active, .time-chip:hover {
  background: rgba(167,139,250,0.15); border-color: var(--purple); color: var(--purple);
}

.timer-custom { margin-bottom: 20px; }
.timer-custom label { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: block; }
.custom-time-input {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 16px; width: fit-content;
}
.custom-time-input span { font-family: var(--mono); font-size: 22px; font-weight: 700; min-width: 40px; text-align: center; }
.custom-time-input.sm span { font-size: 18px; }
.stepper {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  width: 32px; height: 32px; border-radius: 8px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.stepper:hover { background: rgba(167,139,250,0.2); border-color: var(--purple); }
.stepper.sm { width: 28px; height: 28px; font-size: 16px; }

.timer-buttons { display: flex; gap: 10px; margin-bottom: 20px; }

.sleep-mode-card, .deep-night-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.sleep-icon, .deep-icon { font-size: 22px; }
.sleep-mode-card > div, .deep-night-card > div { flex: 1; }
.sleep-mode-card h4, .deep-night-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.sleep-mode-card p, .deep-night-card p { font-size: 12px; color: var(--text2); }

/* === TOGGLE === */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 24px; transition: all 0.3s;
}
.toggle-slider:before {
  content: ''; position: absolute; width: 16px; height: 16px;
  left: 3px; top: 3px; background: var(--text3); border-radius: 50%; transition: all 0.3s;
}
.toggle input:checked + .toggle-slider { background: linear-gradient(135deg, var(--purple), var(--blue)); border-color: transparent; }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); background: white; }

/* === POMODORO === */
.pomodoro-display { display: flex; justify-content: center; margin-bottom: 20px; }
.pomo-ring-wrap { position: relative; width: 200px; height: 200px; }
.pomo-phase-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  color: var(--pink); text-transform: uppercase; margin-bottom: 4px;
}
.pomo-session { font-size: 11px; color: var(--text2); margin-top: 4px; }

.pomo-cycles { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.cycle-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  transition: all 0.3s;
}
.cycle-dot.active { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 8px var(--pink-glow); }
.cycle-dot.done { background: var(--purple); border-color: var(--purple); }

.pomo-config {
  display: flex; gap: 16px; margin-bottom: 20px;
}
.pomo-cfg-item { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.pomo-cfg-item label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: block; }
.pomo-buttons { display: flex; gap: 10px; margin-bottom: 20px; }

/* === NOW PLAYING === */
.now-playing {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--np-h);
  background: rgba(13,13,26,0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); display: flex; align-items: center;
  gap: 12px; padding: 0 16px; z-index: 20;
}
.np-wave { display: flex; align-items: center; gap: 2px; height: 20px; }
.np-wave span {
  display: block; width: 3px; background: linear-gradient(to top, var(--purple), var(--blue));
  border-radius: 2px; animation: waveBar 1.2s ease-in-out infinite;
}
.np-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
.np-wave span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.np-wave span:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.np-wave span:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.np-wave span:nth-child(5) { height: 10px; animation-delay: 0.4s; }

@keyframes waveBar {
  0%,100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.now-playing.silent .np-wave span { animation-play-state: paused; transform: scaleY(0.3); opacity: 0.4; }

.np-info { flex: 1; min-width: 0; }
.np-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 2px; }
.np-tracks { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.np-stop {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(244,114,182,0.15); border: 1px solid rgba(244,114,182,0.3);
  color: var(--pink); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.np-stop:hover { background: rgba(244,114,182,0.25); }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
  z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 480px; padding: 20px; max-height: 80vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 20px; font-weight: 800; }
.modal-close { background: var(--surface); border: 1px solid var(--border); color: var(--text2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 16px; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.stat-num { font-family: var(--mono); font-size: 28px; font-weight: 700; background: linear-gradient(90deg, var(--purple), var(--blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { font-size: 12px; color: var(--text2); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.history-section h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius-xs); padding: 10px 12px; font-size: 13px; }
.history-item .hi-time { font-family: var(--mono); color: var(--text2); font-size: 11px; margin-left: auto; }

/* === DEEP NIGHT === */
.deep-night-overlay {
  position: fixed; inset: 0; background: #000; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.5s;
}
.deep-night-overlay:not(.hidden) { opacity: 1; }
.deep-night-overlay.hidden { pointer-events: none; opacity: 0; }
.dn-content { text-align: center; }
.dn-clock { font-family: var(--mono); font-size: 20px; color: rgba(255,255,255,0.2); margin-bottom: 16px; }
.dn-timer { font-family: var(--mono); font-size: 72px; font-weight: 700; color: rgba(167,139,250,0.6); line-height: 1; margin-bottom: 8px; }
.dn-label { font-size: 11px; letter-spacing: 4px; color: rgba(255,255,255,0.2); text-transform: uppercase; margin-bottom: 40px; }
.dn-exit { background: none; border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.3); padding: 10px 24px; border-radius: 20px; font-family: var(--font); font-size: 13px; cursor: pointer; transition: all 0.3s; }
.dn-exit:hover { border-color: rgba(255,255,255,0.4); color: rgba(255,255,255,0.7); }

/* === TOAST === */
.toast {
  position: fixed; bottom: calc(var(--np-h) + 12px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--text);
  backdrop-filter: blur(20px); z-index: 100; opacity: 0; pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === RANGE INPUT GLOBAL === */
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 4px;
  background: var(--border2); border-radius: 4px; cursor: pointer; outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue)); cursor: pointer;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* === LOADING STATE === */
.sound-card.loading { opacity: 0.6; pointer-events: none; }
.sound-card.loading .sound-emoji { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
