:root {
  color-scheme: dark;
  --cyan: #18b7cf;
  --cyan-dark: #0f91a7;
  --gold: #f59e0b;
  --gold-dark: #c97408;
  --cream: #fff3d6;
  --ink: #05090c;
  --panel: rgba(7, 14, 18, 0.93);
  --panel-soft: rgba(13, 24, 29, 0.82);
  --line: rgba(255, 255, 255, 0.11);
  --muted: #9aa7ad;
  --white: #f6fbfd;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  font-family: Inter, Montserrat, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #071116;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(5, 11, 15, 0.52), rgba(5, 10, 13, 0.94)),
    radial-gradient(circle at 18% 20%, rgba(24, 183, 207, 0.15), transparent 34%),
    radial-gradient(circle at 86% 72%, rgba(245, 158, 11, 0.12), transparent 32%),
    #071116;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
  content: "";
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-cyan {
  top: 12%;
  left: -170px;
  background: var(--cyan);
}

.ambient-gold {
  right: -190px;
  bottom: 5%;
  background: var(--gold);
}

.site-header,
.radio-shell,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 106px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(24, 183, 207, 0.24));
}

.brand-copy {
  display: grid;
  line-height: 0.92;
}

.brand-kicker {
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3em;
}

.brand-name {
  background: linear-gradient(90deg, var(--cyan), var(--cream) 54%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.signal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.signal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.09);
}

.signal-status.connected .signal-dot {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(24, 183, 207, 0.1), 0 0 14px rgba(24, 183, 207, 0.7);
}

.radio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  gap: 22px;
  min-height: 650px;
}

.player-panel,
.station-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(13, 24, 29, 0.96), rgba(5, 9, 12, 0.95));
  box-shadow: var(--shadow);
}

.player-panel::after,
.station-panel::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045);
  content: "";
  pointer-events: none;
}

.player-panel {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  padding: 27px 30px 28px;
}

.player-topline,
.section-heading,
.controls,
.volume-control,
.station-card,
.station-meta,
.site-footer {
  display: flex;
  align-items: center;
}

.player-topline {
  justify-content: space-between;
}

.live-pill,
.frequency,
.station-count {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.live-pill {
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(245, 158, 11, 0.1);
}

.live-pill.is-live {
  border-color: rgba(24, 183, 207, 0.5);
  background: rgba(24, 183, 207, 0.1);
}

.frequency {
  color: var(--muted);
}

.player-visual {
  position: relative;
  display: grid;
  width: min(390px, 78%);
  aspect-ratio: 1;
  margin: 20px auto 3px;
  place-items: center;
}

.player-visual::before {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 183, 207, 0.14), rgba(245, 158, 11, 0.055) 45%, transparent 72%);
  box-shadow: 0 0 70px rgba(24, 183, 207, 0.12);
  content: "";
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.orbit::before {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 15px var(--cyan);
  content: "";
}

.orbit-one {
  inset: 5%;
  animation: spin 14s linear infinite;
}

.orbit-one::before {
  top: 16%;
  right: 9%;
}

.orbit-two {
  inset: 17%;
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.27);
  animation: spin 20s linear infinite reverse;
}

.orbit-two::before {
  right: 1%;
  bottom: 35%;
  width: 6px;
  height: 6px;
  background: var(--gold);
  box-shadow: 0 0 15px var(--gold);
}

.logo-core {
  z-index: 1;
  display: grid;
  width: 54%;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 243, 214, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle at 48% 35%, rgba(255, 243, 214, 0.12), rgba(4, 8, 10, 0.88) 70%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42), inset 0 0 35px rgba(24, 183, 207, 0.1);
}

.logo-core img {
  width: 87%;
  height: 87%;
  object-fit: contain;
}

.equalizer {
  position: absolute;
  right: 5%;
  bottom: 17%;
  display: flex;
  height: 34px;
  align-items: flex-end;
  gap: 4px;
}

.equalizer span {
  width: 3px;
  height: 20%;
  border-radius: 99px;
  background: linear-gradient(to top, var(--cyan), var(--cream), var(--gold));
  opacity: 0.35;
}

.is-playing .equalizer span {
  opacity: 1;
  animation: meter 0.9s ease-in-out infinite alternate;
}

.is-playing .equalizer span:nth-child(2n) { animation-duration: 0.55s; }
.is-playing .equalizer span:nth-child(3n) { animation-duration: 1.2s; }

.now-playing {
  text-align: center;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.now-playing h1,
.section-heading h2 {
  margin: 0;
  color: var(--cream);
  letter-spacing: -0.04em;
}

.now-playing h1 {
  font-size: clamp(2.15rem, 4.7vw, 3.55rem);
  line-height: 1.02;
}

.now-playing > p:last-child {
  min-height: 1.5em;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.controls {
  justify-content: center;
  gap: 22px;
  margin-top: 26px;
}

.play-button,
.icon-button {
  display: grid;
  flex: 0 0 auto;
  cursor: pointer;
  place-items: center;
  border: 0;
}

.play-button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #061013;
  background: linear-gradient(135deg, var(--cyan), var(--cream) 58%, var(--gold));
  box-shadow: 0 8px 28px rgba(24, 183, 207, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.play-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 11px 34px rgba(24, 183, 207, 0.3);
}

.play-button:focus-visible,
.icon-button:focus-visible,
.station-card:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.play-button svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.pause-icon,
.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.volume-control {
  width: min(260px, 58%);
  gap: 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: var(--cream);
}

input[type="range"] {
  width: 100%;
  height: 5px;
  cursor: pointer;
  accent-color: var(--cyan);
}

.volume-control output {
  min-width: 34px;
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.player-message {
  min-height: 1.35em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.station-panel {
  padding: 30px;
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 25px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.station-count {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(24, 183, 207, 0.28);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(24, 183, 207, 0.07);
}

.station-list {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.station-card {
  position: relative;
  width: 100%;
  min-height: 90px;
  gap: 15px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 17px;
  padding: 15px 16px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.station-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--cyan), var(--cream), var(--gold));
  opacity: 0;
  content: "";
  transition: opacity 160ms ease;
}

.station-card:hover {
  transform: translateX(3px);
  border-color: rgba(24, 183, 207, 0.23);
  background: rgba(24, 183, 207, 0.04);
}

.station-card.is-selected {
  border-color: rgba(24, 183, 207, 0.48);
  background: linear-gradient(90deg, rgba(24, 183, 207, 0.095), rgba(245, 158, 11, 0.035));
}

.station-card.is-selected::before {
  opacity: 1;
}

.station-index {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  font-weight: 900;
}

.station-info {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.station-name {
  overflow: hidden;
  color: var(--white);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-description {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-meta {
  flex: 0 0 auto;
  gap: 10px;
}

.station-state {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.station-state.is-live {
  color: var(--cyan);
}

.station-meta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-footer {
  min-height: 88px;
  justify-content: center;
  gap: 12px;
  color: #77858c;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.footer-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes meter {
  from { height: 18%; }
  to { height: 100%; }
}

@media (max-width: 900px) {
  .radio-shell {
    grid-template-columns: 1fr;
  }

  .player-panel {
    min-height: 610px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .radio-shell,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 88px;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .signal-status span:last-child {
    display: none;
  }

  .player-panel,
  .station-panel {
    border-radius: 22px;
  }

  .player-panel {
    min-height: 560px;
    padding: 22px 18px 24px;
  }

  .player-visual {
    width: 92%;
    margin-top: 14px;
  }

  .controls {
    gap: 15px;
  }

  .volume-control {
    width: calc(100% - 78px);
  }

  .station-panel {
    padding: 22px 16px;
  }

  .station-card {
    gap: 11px;
    min-height: 82px;
    padding: 13px 12px;
  }

  .station-index {
    width: 34px;
    height: 34px;
  }

  .station-state {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
