/* Forastream Karaoke Theme - Cyberpunk / Neon Stage Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --bg-primary: #0a0e17;
  --bg-surface: rgba(18, 25, 41, 0.75);
  --bg-surface-hover: rgba(28, 38, 62, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 245, 212, 0.3);

  --neon-cyan: #00f5d4;
  --neon-magenta: #f72585;
  --neon-purple: #7209b7;
  --neon-blue: #4361ee;
  --neon-yellow: #fee440;
  --neon-green: #10b981;
  --neon-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow-cyan: 0 0 20px rgba(0, 245, 212, 0.35);
  --shadow-glow-magenta: 0 0 20px rgba(247, 37, 133, 0.35);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(114, 9, 183, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(0, 245, 212, 0.12) 0%, transparent 45%);
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.glass-panel:hover {
  border-color: var(--border-glow);
}

/* Header & Nav */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow-cyan);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-main);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-purple));
  color: #fff;
  box-shadow: var(--shadow-glow-magenta);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(247, 37, 133, 0.6);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #0a0e17;
  box-shadow: var(--shadow-glow-cyan);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 245, 212, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.35);
}

/* Form Controls */
.input-field {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-cyan { background: rgba(0, 245, 212, 0.15); color: var(--neon-cyan); border: 1px solid rgba(0, 245, 212, 0.3); }
.badge-magenta { background: rgba(247, 37, 133, 0.15); color: var(--neon-magenta); border: 1px solid rgba(247, 37, 133, 0.3); }
.badge-yellow { background: rgba(254, 228, 64, 0.15); color: var(--neon-yellow); border: 1px solid rgba(254, 228, 64, 0.3); }

/* Pitch Visualizer & Gauge */
.pitch-gauge-container {
  position: relative;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pitch-gauge-center {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.pitch-needle {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 8px;
  border-radius: 4px;
  background: #fff;
  left: 50%;
  transform: translateX(-50%);
  transition: left 0.08s ease-out, background-color 0.1s ease;
  z-index: 3;
}

/* Score Display */
.score-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--neon-yellow);
  text-shadow: 0 0 15px rgba(254, 228, 64, 0.4);
}

.multiplier-pill {
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.9rem;
  color: #0a0e17;
  display: inline-flex;
}

/* Grade Popups */
.grade-popup {
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: popScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grade-perfect { color: var(--neon-cyan); text-shadow: 0 0 20px var(--neon-cyan); }
.grade-good { color: var(--neon-yellow); text-shadow: 0 0 15px var(--neon-yellow); }
.grade-miss { color: var(--neon-red); text-shadow: 0 0 10px var(--neon-red); }

@keyframes popScale {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Karaoke Lyrics Display */
.lyrics-stage {
  padding: 24px;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lyrics-current-line {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.lyric-word {
  position: relative;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.1s ease;
}

.lyric-word.active {
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.lyric-word.completed {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.6);
}

.lyrics-next-line {
  font-size: 1.25rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Song Queue Item */
.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.queue-item.active-item {
  border-color: var(--neon-cyan);
  background: rgba(0, 245, 212, 0.08);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.15);
}

/* Canvas Pitch Highway */
.pitch-canvas {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: block;
}

/* Countdown Overlay */
.countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.countdown-num {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: popScale 0.8s ease infinite;
}

/* Responsive grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .lyrics-current-line {
    font-size: 1.4rem;
  }
  .header-bar {
    padding: 12px 16px;
  }
}
