:root {
  --bg: #0b0e0c;
  --ink: #dfe6df;
  --dim: #6f7a6f;
  --accent: #7ee2a8;
  --accent-dim: rgba(126, 226, 168, 0.35);
  --font: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#viz {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.deck {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 20px;
  text-align: center;
}

/* ---- brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--dim);
}
.brand-mark {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---- airport ---- */
.airport { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.icao {
  font-size: clamp(56px, 12vw, 104px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 32px rgba(126, 226, 168, 0.18);
}

.airport-meta { color: var(--dim); max-width: 70ch; }

.feed-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.4s;
}
.dot.live {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2.2s ease-in-out infinite;
}
.dot.dead { background: #d06a5a; }
@keyframes blink { 50% { opacity: 0.35; } }

#airportSelect {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(126, 226, 168, 0.25);
  border-radius: 3px;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  padding: 6px 12px;
  max-width: min(80vw, 340px);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, color 0.2s;
}
#airportSelect:hover, #airportSelect:focus {
  border-color: var(--accent);
  color: var(--ink);
  outline: none;
}
#airportSelect option { background: var(--bg); color: var(--ink); }

/* ---- controls ---- */
.btn-play {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  background: rgba(126, 226, 168, 0.06);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-play:hover { background: rgba(126, 226, 168, 0.14); border-color: var(--accent); }
.btn-play:active { transform: scale(0.95); }
.btn-play svg { width: 34px; height: 34px; fill: var(--accent); grid-area: 1/1; }
.btn-play .ic-pause { display: none; }
body.playing .btn-play .ic-play { display: none; }
body.playing .btn-play .ic-pause { display: block; }

/* ---- track ---- */
.track { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 90px; }
.track-title { font-size: 17px; letter-spacing: 0.04em; }
.track-sub { color: var(--dim); font-size: 12px; letter-spacing: 0.1em; }

.btn-ghost {
  background: none;
  border: none;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--accent); background: rgba(126, 226, 168, 0.07); }

/* ---- mixers ---- */
.mixers {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.mixer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.mixer input[type="range"] {
  appearance: none;
  width: 130px;
  height: 2px;
  background: rgba(126, 226, 168, 0.25);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}
.mixer input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.mixer input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- credits ---- */
.credits {
  position: fixed;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(111, 122, 111, 0.7);
}
.credits a { color: inherit; text-decoration-color: rgba(126, 226, 168, 0.3); }
.credits a:hover { color: var(--accent); }

@media (max-width: 520px) {
  .deck { gap: 20px; }
  .mixers { gap: 16px; flex-direction: column; }
}
