:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1c1c28;
  --border: rgba(255,255,255,0.08);
  --accent: #ff4d4d;
  --accent2: #ff8c00;
  --accent3: #7c3aed;
  --text: #f0f0f0;
  --text-muted: rgba(240,240,240,0.5);
  --radius: 16px;
  --glow: 0 0 40px rgba(255,77,77,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background orbs */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: drift 12s ease-in-out infinite alternate;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent); top: -200px; left: -150px; animation-duration: 14s; }
.orb-2 { width: 400px; height: 400px; background: var(--accent3); bottom: -150px; right: -100px; animation-duration: 10s; animation-delay: -4s; }
.orb-3 { width: 300px; height: 300px; background: var(--accent2); top: 40%; left: 55%; animation-duration: 16s; animation-delay: -7s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.1); }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Header */
header { text-align: center; }
.logo { font-size: 64px; line-height: 1; margin-bottom: 12px; animation: pump 1.8s ease-in-out infinite; }
@keyframes pump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 10vw, 96px);
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.tagline { color: var(--text-muted); font-size: 15px; margin-top: 8px; letter-spacing: 1px; }

/* Quote banner */
.quote-banner {
  background: linear-gradient(135deg, rgba(255,77,77,0.12), rgba(124,58,237,0.12));
  border: 1px solid rgba(255,77,77,0.25);
  border-radius: var(--radius);
  padding: 20px 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.quote-banner::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 80px;
  color: rgba(255,77,77,0.15);
  line-height: 1;
}

/* Sections */
section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 8px;
}

/* Picker */
.picker-hint { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.minute-dial {
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  position: relative;
}
.dial-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--progress, 0%), var(--surface2) 0%);
  padding: 8px;
  transition: background 0.3s;
}
.dial-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}
.dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.dial-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 56px;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dial-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }

.minute-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}
.btn-adj {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-adj:hover { background: var(--accent); border-color: var(--accent); }

input[type=number] {
  width: 80px;
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  padding: 8px;
  border-radius: 10px;
  outline: none;
  -moz-appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number]:focus { border-color: var(--accent); }

.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 24px rgba(255,77,77,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255,77,77,0.55); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: 12px;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.hidden { display: none !important; }

/* Status */
.status-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface2);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.status-icon { font-size: 40px; animation: pulse-glow 2s infinite; }
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,77,77,0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(255,77,77,0.9)); }
}
.status-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.countdown {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-top: 4px;
}
.active-minute { color: var(--text-muted); font-size: 14px; text-align: center; }
.active-minute strong { color: var(--accent); }

/* Sound */
.sound-controls { display: flex; flex-direction: column; gap: 16px; }
.track-list { display: flex; flex-wrap: wrap; gap: 10px; }
.track-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.track-btn:hover { border-color: var(--accent); color: var(--text); }
.track-btn.active {
  background: linear-gradient(135deg, rgba(255,77,77,0.2), rgba(255,140,0,0.2));
  border-color: var(--accent);
  color: var(--text);
}

.playback-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.btn-play {
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(255,77,77,0.1);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-play:hover { background: rgba(255,77,77,0.2); }
.btn-play.playing { background: var(--accent); color: #fff; }

.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
}
.visualizer span {
  display: block;
  width: 5px;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  border-radius: 3px;
  height: 6px;
  transition: height 0.1s;
  opacity: 0.4;
}
.visualizer.active span { opacity: 1; animation: bar-anim 0.6s ease-in-out infinite alternate; }
.visualizer.active span:nth-child(1) { animation-delay: 0s; }
.visualizer.active span:nth-child(2) { animation-delay: 0.08s; }
.visualizer.active span:nth-child(3) { animation-delay: 0.16s; }
.visualizer.active span:nth-child(4) { animation-delay: 0.24s; }
.visualizer.active span:nth-child(5) { animation-delay: 0.32s; }
.visualizer.active span:nth-child(6) { animation-delay: 0.4s; }
.visualizer.active span:nth-child(7) { animation-delay: 0.48s; }
.visualizer.active span:nth-child(8) { animation-delay: 0.56s; }
.visualizer.active span:nth-child(9) { animation-delay: 0.64s; }
.visualizer.active span:nth-child(10) { animation-delay: 0.72s; }
@keyframes bar-anim {
  from { height: 4px; }
  to { height: var(--max-h, 30px); }
}
.visualizer.active span:nth-child(1)  { --max-h: 20px; }
.visualizer.active span:nth-child(2)  { --max-h: 30px; }
.visualizer.active span:nth-child(3)  { --max-h: 24px; }
.visualizer.active span:nth-child(4)  { --max-h: 34px; }
.visualizer.active span:nth-child(5)  { --max-h: 16px; }
.visualizer.active span:nth-child(6)  { --max-h: 28px; }
.visualizer.active span:nth-child(7)  { --max-h: 32px; }
.visualizer.active span:nth-child(8)  { --max-h: 18px; }
.visualizer.active span:nth-child(9)  { --max-h: 26px; }
.visualizer.active span:nth-child(10) { --max-h: 22px; }

/* Mantras */
.mantra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.mantra-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}
.mantra-card:hover { border-color: rgba(255,77,77,0.4); color: var(--text); }
.mantra-card .mantra-icon { font-size: 24px; margin-bottom: 8px; }

/* Notification badge */
.notification-badge {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.badge-inner {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 24px;
  padding: 48px 56px;
  text-align: center;
  box-shadow: 0 0 60px rgba(255,77,77,0.5);
  animation: badge-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 400px;
  position: relative;
}
@keyframes badge-pop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.badge-icon { font-size: 72px; display: block; margin-bottom: 16px; animation: pump 1s ease-in-out infinite; }
.badge-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--surface2);
  border: none;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.badge-close:hover { background: var(--accent); color: #fff; }

@media (max-width: 600px) {
  .container { padding: 24px 16px 60px; gap: 24px; }
  section { padding: 20px; }
  .status-card { flex-direction: column; text-align: center; gap: 12px; }
  .badge-inner { padding: 32px 28px; margin: 16px; }
}
