/* ============================================================
   Whistle Hero - Authentic Tin Whistle Rhythm & Pitch Trainer
   Theme: Neon Stage & Generation Brass / Nickel Whistle
   ============================================================ */

:root {
  --bg-dark: #090D16;
  --bg-card: #111827;
  --bg-card-alt: #1F2937;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(56, 189, 248, 0.3);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Theme Brass (Default: Generation D) */
  --accent-whistle: #F59E0B;
  --accent-whistle-glow: rgba(245, 158, 11, 0.35);
  --fipple-color: #DC2626;

  /* Neon Lane Colors */
  --lane-1: #EF4444;
  --lane-2: #F97316;
  --lane-3: #F59E0B;
  --lane-4: #10B981;
  --lane-5: #06B6D4;
  --lane-6: #8B5CF6;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --purple: #8B5CF6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.theme-nickel {
  --accent-whistle: #94A3B8;
  --accent-whistle-glow: rgba(148, 163, 184, 0.35);
  --fipple-color: #2563EB;
}

body.theme-g-whistle {
  --accent-whistle: #10B981;
  --accent-whistle-glow: rgba(16, 185, 129, 0.35);
  --fipple-color: #059669;
}

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

html, body {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body.game-app {
  font-family: var(--font-main);
  background: radial-gradient(circle at 50% 15%, #131d36 0%, #070a13 60%, #020306 100%);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   Top Arcade Console Bezel
   ============================================================ */

.arcade-bezel-top {
  height: 52px;
  background: rgba(9, 14, 28, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 40;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

/* Brand & Instrument Selector */
.arcade-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}



.arcade-switch-group {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
}

.btn-arcade-key {
  border: none;
  background: transparent;
  color: #94A3B8;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 900;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-arcade-key .key-letter {
  font-size: 0.92rem;
  font-weight: 900;
}

.btn-arcade-key .key-tag {
  font-size: 0.64rem;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.btn-arcade-key.active {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.55);
}

body.theme-g-whistle .btn-arcade-key.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 0 14px rgba(5, 150, 105, 0.55);
}

/* Game Mode Tabs */
.arcade-mode-group {
  display: flex;
  align-items: center;
}

.mode-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tab-btn {
  border: none;
  background: transparent;
  color: #94A3B8;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.6);
}

#btn-mode-rush.active {
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.6);
}

/* Mic & Display System Controls */
.arcade-sys-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-arcade-mic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(20, 30, 48, 0.9);
  color: #CBD5E1;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-arcade-mic:hover {
  background: rgba(30, 45, 70, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  color: #FFFFFF;
}

.btn-arcade-mic.btn-active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10B981;
  color: #34D399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.btn-arcade-mic .status-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #0F172A;
  box-sizing: border-box;
}

#mic-status-text,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-inactive {
  background: #64748B;
}

.dot-active {
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-dot 1.5s infinite;
}

.dot-error {
  background: #EF4444;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.btn-arcade-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(20, 30, 48, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  font-size: 0.92rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-arcade-icon:hover {
  background: rgba(30, 45, 70, 0.95);
  color: #FFFFFF;
  border-color: #38BDF8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.btn-arcade-icon.active {
  color: #FBBF24;
  border-color: #F59E0B;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

/* ============================================================
   Main Arcade Stage & Highway Canvas
   ============================================================ */

.arcade-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 18px 14px;
  gap: 12px;
  min-height: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.highway-container {
  flex: 1;
  width: 100%;
  min-height: 360px;
  background: #070B14;
  border-radius: 18px;
  border: 2px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 32px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  position: relative;
}

#highway-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Pause Overlay & Centered Play Button */
.field-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(3, 7, 18, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 20;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.field-play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.btn-field-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 2.5px solid rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 36px rgba(16, 185, 129, 0.65), 0 8px 24px rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-field-play .field-play-triangle {
  font-size: 2.3rem;
  margin-left: 5px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.btn-field-play:hover {
  transform: scale(1.12);
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  box-shadow: 0 0 48px rgba(16, 185, 129, 0.85), 0 10px 30px rgba(0, 0, 0, 0.7);
  border-color: #A7F3D0;
}

.btn-field-play:active {
  transform: scale(0.95);
}

/* ============================================================
   Bottom Arcade Console Deck
   ============================================================ */

.arcade-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(11, 17, 33, 0.92);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 8px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

/* Jukebox Track Selector */
.deck-track-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
  height: 40px;
}

.btn-track-arrow {
  width: 40px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #38BDF8;
  font-size: 0.95rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: all 0.18s ease;
}

.btn-track-arrow:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38BDF8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: scale(1.05);
}

.btn-track-arrow:active {
  transform: scale(0.96);
}

.track-select-box {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.track-select-label {
  display: none;
}

.arcade-song-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  background: rgba(15, 23, 42, 0.95);
  color: #F8FAFC;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  margin: 0;
  line-height: 37px;
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: all 0.2s ease;
}

.arcade-song-select:hover, .arcade-song-select:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

/* Giant Arcade PLAY / PAUSE Button */
.deck-action-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-arcade-play {
  border: none;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  padding: 10px 24px;
  min-width: 140px;
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-arcade-play:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.75), 0 6px 16px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.btn-arcade-play:active {
  transform: translateY(1px) scale(0.98);
}

.btn-arcade-play.is-playing {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-arcade-play.is-playing:hover {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.75), 0 6px 16px rgba(0, 0, 0, 0.5);
}



/* Backward compatibility button utilities */
.btn {
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* ============================================================
   End of Song Modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(4, 7, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: linear-gradient(165deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 29, 0.98) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), 0 20px 45px rgba(0, 0, 0, 0.7);
  animation: modal-pop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  position: relative;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.grade-badge-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  font-weight: 900;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  color: #FFFFFF;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 16px;
  color: #FFFFFF;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-stats-list {
  background: #1E293B;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 700;
}

.modal-stat-label {
  color: var(--text-secondary);
}

.modal-stat-val {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ============================================================
   Blocking Microphone Permission Modal (Arcade Cyber Style)
   ============================================================ */

#mic-modal {
  z-index: 250;
}

.mic-modal-content {
  max-width: 440px;
  width: 100%;
  background: linear-gradient(170deg, #0e172a 0%, #080d1a 60%, #050811 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.18), 0 25px 65px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
}

.mic-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38BDF8 0%, #F59E0B 50%, #10B981 100%);
}

.mic-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #38BDF8;
  margin-bottom: 14px;
}

.mic-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mic-modal-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.25) 0%, rgba(15, 23, 42, 0.95) 75%);
  border: 2px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35), inset 0 0 14px rgba(56, 189, 248, 0.2);
  animation: pulse-mic 2.4s infinite ease-in-out;
}

@keyframes pulse-mic {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.6);
  }
}

.mic-modal-content .modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.mic-modal-content .modal-subtitle {
  color: #94A3B8;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Feature tags */
.mic-feature-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.mic-feature-tags.hidden {
  display: none !important;
}

.mic-tag {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 5px 11px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #E2E8F0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mic-tag .tag-icon {
  font-size: 0.85rem;
}

/* Error Box */
.mic-error-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  text-align: left;
}

.mic-error-box.hidden {
  display: none !important;
}

.mic-error-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: #F87171;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mic-error-msg {
  font-size: 0.82rem;
  color: #FECACA;
  margin-bottom: 10px;
  line-height: 1.45;
}

.mic-error-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.error-step-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: #E2E8F0;
  line-height: 1.45;
}

.error-step-item strong {
  color: #FBBF24;
}

.step-num {
  background: rgba(239, 68, 68, 0.3);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #FCA5A5;
  border-radius: 6px;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Buttons inside Mic Modal */
.mic-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-arcade-mic-enable,
.btn-arcade-mic-skip {
  width: 100%;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-arcade-mic-enable {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 50%, #0EA5E9 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.45), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-arcade-mic-enable:hover {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  box-shadow: 0 0 32px rgba(14, 165, 233, 0.7), 0 6px 18px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.btn-arcade-mic-enable:active {
  transform: translateY(1px);
}

.btn-arcade-mic-enable.is-error-action {
  background: linear-gradient(135deg, #D97706 0%, #B45309 50%, #F59E0B 100%);
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.5), 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-arcade-mic-enable.is-error-action:hover {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.75);
}

.btn-arcade-mic-skip {
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-arcade-mic-skip:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15), 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.btn-arcade-mic-skip:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 13px 24px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ============================================================
   Responsive Arcade Layout
   ============================================================ */

@media (max-width: 960px) {
  .arcade-bezel-top {
    padding: 0 14px;
    height: 48px;
  }

  .arcade-stage {
    padding: 10px 12px;
    gap: 10px;
  }

  .arcade-deck {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }

  .deck-track-selector {
    order: 1;
    flex: 1;
    min-width: 220px;
  }

  .deck-action-center {
    order: 2;
  }

  .deck-tools-cluster {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 640px) {
  .arcade-bezel-top {
    height: 46px;
    padding: 0 10px;
    gap: 6px;
  }


  .btn-arcade-key {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .btn-arcade-key .key-tag {
    display: none;
  }

  .mode-tabs {
    padding: 2px;
    gap: 2px;
  }

  .tab-btn {
    padding: 5px 8px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .mode-text {
    display: none;
  }

  .btn-arcade-mic {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
    padding: 0;
  }

  .btn-arcade-mic .status-dot {
    top: 0px;
    right: 0px;
    width: 7px;
    height: 7px;
  }

  .btn-arcade-icon {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
  }

  .arcade-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 6px 8px 8px;
    gap: 8px;
    min-height: 0;
    justify-content: flex-start;
  }

  .highway-container {
    flex: 1;
    height: auto;
    min-height: 0;
    max-height: none;
    width: 100%;
    border-radius: 16px;
  }

  .arcade-deck {
    flex: 0 0 auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    gap: 8px;
    border-radius: 14px;
    min-height: auto;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: auto;
  }

  .deck-track-selector {
    order: 1;
    flex: 1 1 0%;
    min-width: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    gap: 5px;
    height: 36px;
  }

  .btn-track-arrow {
    width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    font-size: 0.9rem;
    border-radius: 10px;
    flex-shrink: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  .track-select-box {
    height: 36px;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 0%;
    display: flex;
    align-items: center;
  }

  .arcade-song-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0 8px;
    font-size: 0.82rem;
    border-radius: 10px;
    box-sizing: border-box;
    margin: 0;
    line-height: 33px;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .deck-action-center {
    order: 2;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    display: flex;
    align-items: center;
  }

  .btn-arcade-play {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    flex-shrink: 0;
  }


  .btn-field-play {
    width: 66px;
    height: 66px;
  }

  .btn-field-play .field-play-triangle {
    font-size: 1.95rem;
    margin-left: 4px;
  }

  /* Mobile Mic Modal Specifics */
  .modal-overlay {
    padding: 12px;
  }

  .mic-modal-content {
    max-width: 380px;
    width: 100%;
    padding: 22px 18px 20px;
    border-radius: 20px;
  }

  .mic-modal-badge {
    padding: 3px 10px;
    font-size: 0.62rem;
    margin-bottom: 12px;
  }

  .mic-modal-icon-wrap {
    width: 58px;
    height: 58px;
    font-size: 1.8rem;
    margin-bottom: 12px;
  }

  .mic-modal-content .modal-title {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  .mic-modal-content .modal-subtitle {
    font-size: 0.82rem;
    margin-bottom: 14px;
    line-height: 1.45;
  }

  .mic-feature-tags {
    gap: 6px;
    margin-bottom: 16px;
  }

  .mic-tag {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .mic-error-box {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .mic-error-title {
    font-size: 0.88rem;
    margin-bottom: 4px;
  }

  .mic-error-msg {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .error-step-item {
    font-size: 0.78rem;
    gap: 6px;
  }

  .step-num {
    width: 16px;
    height: 16px;
    font-size: 0.68rem;
  }

  .btn-arcade-mic-enable,
  .btn-arcade-mic-skip {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 16px;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: 14px;
    box-sizing: border-box;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .action-text {
    display: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .arcade-stage {
    padding: 4px 8px 6px;
    gap: 6px;
  }

  .highway-container {
    height: auto !important;
    min-height: 200px !important;
    flex: 1 !important;
  }

  .arcade-deck {
    flex-direction: row !important;
    min-height: auto !important;
    padding: 6px 12px !important;
    gap: 8px !important;
  }

  .deck-track-selector {
    width: auto !important;
    flex: 1 !important;
  }

  .deck-action-center {
    width: auto !important;
  }

  .btn-arcade-play {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    padding: 8px 12px !important;
  }

  .deck-tools-cluster {
    width: auto !important;
    border-top: none !important;
    padding-top: 0 !important;
  }

  .modal-overlay {
    padding: 8px !important;
    align-items: flex-start !important;
  }

  .mic-modal-content {
    max-height: 94vh !important;
    overflow-y: auto !important;
    padding: 14px 18px !important;
  }

  .mic-modal-icon-wrap {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.4rem !important;
    margin-bottom: 6px !important;
  }
}
