/**
 * Vocal Highway - Dedicated Sight-Singing & Pitch Matching Arcade Stylesheet
 * Responsive 2x Retina Canvas, Dual-State Highway Lighting, Intonation Cent Reticle.
 */

.vocal-highway-arena {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* Highway Container Card */
.highway-viewport-card {
  width: 100%;
  background: var(--eb-card-bg);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  box-shadow: var(--eb-card-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  margin-bottom: 12px;
}

/* Dual-State Highway Lighting Header */
.highway-phase-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--eb-font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* State 1: Listen Phase (Cold Electric Blue) */
.highway-phase-banner.phase-listen {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border-bottom-color: rgba(0, 240, 255, 0.4);
  color: var(--eb-cyan);
}

/* State 2: Sing Phase (Vibrant Neon Green) */
.highway-phase-banner.phase-sing {
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.22) 0%, rgba(0, 240, 255, 0.18) 100%);
  border-bottom-color: rgba(0, 255, 136, 0.5);
  color: var(--eb-green);
  animation: phasePulseGreen 1.6s infinite alternate ease-in-out;
}
@keyframes phasePulseGreen {
  0% { box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.2); }
  100% { box-shadow: inset 0 0 24px rgba(0, 255, 136, 0.5); }
}

.phase-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--eb-radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.phase-listen .phase-indicator-pill {
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid var(--eb-cyan);
}
.phase-sing .phase-indicator-pill {
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid var(--eb-green);
}

/* Canvas Area */
.canvas-stage-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: radial-gradient(circle at 25% 50%, rgba(26, 17, 54, 0.6) 0%, rgba(8, 6, 20, 0.95) 100%);
}
@media (max-width: 680px) {
  .canvas-stage-wrapper { height: 180px; }
}

#highwayCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Laser Hit Gate */
.target-laser-gate {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 200px;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 240, 255, 0.8) 20%, rgba(0, 255, 136, 0.9) 80%, transparent 100%);
  box-shadow: 0 0 12px var(--eb-cyan);
  pointer-events: none;
  z-index: 6;
}
.gate-reticle-diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: rgba(0, 255, 136, 0.85);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px var(--eb-green);
  transition: top 0.08s ease;
}

/* Pitch Cent Intonation Meter */
.micro-tuner-badge {
  position: absolute;
  bottom: 8px;
  left: 215px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--eb-radius-sm);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--eb-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  z-index: 10;
  pointer-events: none;
}
.micro-tuner-badge.in-tune {
  color: var(--eb-green);
  border-color: var(--eb-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}
.micro-tuner-badge.sharp {
  color: var(--eb-cyan);
  border-color: var(--eb-cyan);
}
.micro-tuner-badge.flat {
  color: var(--eb-coral);
  border-color: var(--eb-coral);
}

/* Staff Target Pills Tracker */
.staff-target-tracker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--eb-font-heading);
}
.tracker-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--eb-text-dim);
  text-transform: uppercase;
}
.tracker-pills-row {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
}
.target-note-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--eb-radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--eb-font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--eb-text-dim);
  transition: all 0.2s ease;
}
.target-note-pill.active {
  border-color: var(--eb-cyan);
  color: var(--eb-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}
.target-note-pill.perfect {
  background: rgba(0, 255, 136, 0.18);
  border-color: var(--eb-green);
  color: var(--eb-green);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}
.target-note-pill.great {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--eb-cyan);
  color: var(--eb-cyan);
}
.target-note-pill.miss {
  background: rgba(255, 94, 87, 0.18);
  border-color: var(--eb-coral);
  color: var(--eb-coral);
}

/* ========================================================================= */
/* VOCAL RANGE & INPUT CONTROLS BAR                                          */
/* ========================================================================= */
.vocal-controls-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--eb-card-bg);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-md);
  padding: 8px 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.range-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.range-group-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--eb-text-dim);
  text-transform: uppercase;
}
.range-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--eb-text-dim);
  padding: 4px 12px;
  border-radius: var(--eb-radius-pill);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.range-pill-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.range-pill-btn.active {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.3) 0%, rgba(0, 240, 255, 0.1) 100%);
  border-color: var(--eb-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Live Mic Calibrator / VU Level Meter */
.mic-meter-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meter-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--eb-text-dim);
  text-transform: uppercase;
}
.vu-meter-track {
  width: 90px;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--eb-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  position: relative;
}
.vu-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ff88 0%, #ffbe0b 70%, #ff5e57 100%);
  border-radius: var(--eb-radius-pill);
  transition: width 0.05s ease;
}

/* ========================================================================= */
/* TACTILE 3D SYNTH PIANO KEYBOARD                                           */
/* ========================================================================= */
.keyboard-card {
  width: 100%;
  background: var(--eb-card-bg);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-lg);
  padding: 12px 16px 16px;
  box-shadow: var(--eb-card-shadow);
  backdrop-filter: blur(14px);
  margin-bottom: 24px;
}
.keyboard-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.keyboard-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--eb-font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}
.piano-surface {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  height: 110px;
  user-select: none;
  touch-action: manipulation;
}
.piano-key {
  position: relative;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 6px;
  font-family: var(--eb-font-mono);
  font-weight: 800;
  transition: transform 0.06s ease, background 0.06s ease;
}
.piano-key.white {
  flex: 1 1 0;
  width: 12.5%;
  height: 100%;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 85%, #cbd5e1 100%);
  border: 1px solid #94a3b8;
  color: #1e293b;
  box-shadow: 0 4px 0 #64748b, 0 6px 12px rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.piano-key.white:active, .piano-key.white.pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #64748b, 0 2px 4px rgba(0, 0, 0, 0.5);
  background: #00f0ff;
  color: #032b30;
}
.piano-key.black {
  position: absolute;
  width: 7.5%;
  height: 65%;
  background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
  border: 1px solid #475569;
  color: #94a3b8;
  box-shadow: 0 3px 0 #020617, 0 4px 8px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.piano-key.black:active, .piano-key.black.pressed {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #020617;
  background: #ff007f;
  color: #fff;
}
.key-note-name { font-size: 11px; line-height: 1; }
.key-kbd-shortcut {
  font-size: 9px;
  color: inherit;
  opacity: 0.65;
  margin-top: 2px;
}

@media (max-width: 680px) {
  .vocal-highway-arena { padding: 0 8px; }
  .highway-viewport-card { margin-bottom: 6px; }
  .canvas-stage-wrapper { height: 180px; }
  .vocal-controls-strip {
    padding: 6px 8px;
    margin-bottom: 6px;
    gap: 6px 8px;
    justify-content: space-between;
  }
  .range-select-group {
    gap: 4px;
  }
  .range-pill-btn {
    padding: 3px 7px;
    font-size: 11px;
  }
  .vu-meter-track {
    width: 65px;
  }
  .keyboard-card {
    padding: 8px 10px 10px;
    margin-bottom: 14px;
  }
  .piano-surface {
    height: 92px;
  }
  .key-kbd-shortcut {
    display: none;
  }
  .key-note-name {
    font-size: 10px;
  }
}
