:root {
  color-scheme: dark;
  --bg: #080b14;
  --surface: #0e1423;
  --surface-2: #141c2e;
  --surface-3: #1a2439;
  --text: #f7f8fc;
  --muted: #98a6bd;
  --line: rgba(255, 255, 255, .09);
  --brand: #6657ff;
  --brand-2: #8e5cff;
  --orange: #ff7a1a;
  --green: #2dd87b;
  --danger: #ff5d6c;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 5%, rgba(102, 87, 255, .13), transparent 27rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  padding-bottom: 104px;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.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;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 64px);
  background: rgba(8, 11, 20, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.04em;
}
.brand img { border-radius: 12px; object-fit: contain; }
.brand > span > span { color: #978cff; }
.desktop-nav { display: flex; gap: 5px; padding: 5px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; }
.nav-link {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  cursor: pointer;
}
.nav-link.active, .nav-link:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.button, .icon-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover, .icon-button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .nav-link:focus-visible,
input:focus-visible, select:focus-visible, .station-play:focus-visible,
.favorite-button:focus-visible {
  outline: 3px solid rgba(142, 92, 255, .42);
  outline-offset: 2px;
}
.button { padding: 10px 16px; }
.button.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; }
.button.ghost { background: transparent; border: 1px solid var(--line); }
.button.subtle { background: var(--surface-2); border: 1px solid var(--line); }
.icon-button { padding: 9px 13px; background: var(--surface-2); border: 1px solid var(--line); }
.mobile-menu-button { display: none; font-size: 20px; }
.mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 18px;
  width: 190px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
}
.mobile-menu button {
  display: block;
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}
.mobile-menu button:hover { background: var(--surface-2); }

.hero {
  max-width: 1320px;
  min-height: 600px;
  margin: 0 auto;
  padding: 92px clamp(20px, 5vw, 78px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: center;
  gap: 56px;
}
.eyebrow {
  margin: 0 0 14px;
  color: #a9b5ca;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 850;
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(45, 216, 123, .12);
}
.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(50px, 7vw, 92px);
  line-height: .94;
  letter-spacing: -.065em;
}
.hero h1 span {
  color: transparent;
  background: linear-gradient(100deg, #fbfbff 10%, #8c7dff 65%, #ff8a2d);
  background-clip: text;
}
.hero-text { max-width: 660px; margin: 28px 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  max-width: 670px;
  padding: 8px 8px 8px 18px;
  background: rgba(19, 27, 44, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 17px;
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
}
.search-box > span { color: #9c90ff; font-size: 24px; }
.search-box input { min-width: 0; padding: 10px 4px; color: var(--text); background: transparent; border: 0; outline: 0; }
.search-box button { padding: 12px 19px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; font-weight: 800; cursor: pointer; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-tags button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.quick-tags button:hover { color: white; border-color: rgba(142,92,255,.55); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.logo-orbit {
  position: relative;
  z-index: 2;
  width: min(72%, 330px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102,87,255,.25), rgba(102,87,255,.04) 55%, transparent 70%);
  border: 1px solid rgba(142,92,255,.18);
  box-shadow: 0 0 100px rgba(102,87,255,.18);
}
.logo-orbit::before, .logo-orbit::after {
  content: "";
  position: absolute;
  inset: -28px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: inherit;
  transform-origin: center;
  will-change: transform, opacity;
  animation: speaker-wave-near 2.2s linear infinite;
}
.logo-orbit::after {
  inset: -70px;
  border-style: solid;
  opacity: .45;
  animation-name: speaker-wave-far;
}
.logo-orbit img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  border-radius: 32%;
  mix-blend-mode: screen;
  filter: drop-shadow(0 22px 28px rgba(0,0,0,.32));
  transform-origin: center;
  will-change: transform, filter;
  animation: speaker-beat 2.2s linear infinite;
}
@keyframes speaker-beat {
  0%, 56%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 22px 28px rgba(0,0,0,.32)) drop-shadow(0 0 0 rgba(142,92,255,0));
  }
  60% {
    transform: scale(.965);
  }
  65% {
    transform: scale(1.105);
    filter: drop-shadow(0 28px 38px rgba(0,0,0,.42)) drop-shadow(0 0 28px rgba(142,92,255,.48));
  }
  70% {
    transform: scale(.985);
  }
  75% {
    transform: scale(1.045);
    filter: drop-shadow(0 24px 32px rgba(0,0,0,.36)) drop-shadow(0 0 14px rgba(142,92,255,.28));
  }
  82% {
    transform: scale(1);
  }
}
@keyframes speaker-wave-near {
  0%, 56%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  65% {
    transform: scale(1.035);
    opacity: .9;
  }
  82% {
    transform: scale(1.14);
    opacity: 0;
  }
  83% {
    transform: scale(1);
    opacity: 0;
  }
  90% {
    opacity: 1;
  }
}
@keyframes speaker-wave-far {
  0%, 58%, 100% {
    transform: scale(1);
    opacity: .45;
  }
  68% {
    transform: scale(1.025);
    opacity: .38;
  }
  86% {
    transform: scale(1.11);
    opacity: 0;
  }
  87% {
    transform: scale(1);
    opacity: 0;
  }
  94% {
    opacity: .45;
  }
}
.signal { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 30px var(--orange); }
.signal-one { top: 18%; right: 12%; }
.signal-two { bottom: 16%; left: 16%; background: var(--brand-2); box-shadow: 0 0 30px var(--brand-2); }
.on-air-badge { position: absolute; z-index: 4; right: 7%; bottom: 20%; padding: 9px 13px; border-radius: 999px; background: #f4f5fb; color: #121522; font-size: 11px; font-weight: 900; letter-spacing: .12em; box-shadow: var(--shadow); }
.on-air-badge span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ff3d51;
  animation: on-air-pulse 1.5s ease-out infinite;
}
@keyframes on-air-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,61,81,.42); }
  50% { box-shadow: 0 0 0 6px rgba(255,61,81,0); }
}

.catalog-section, .benefits { max-width: 1320px; margin: 0 auto; padding: 64px clamp(20px, 5vw, 78px); }
.catalog-section { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-heading h2, .benefits h2 { margin: 0; font-size: clamp(29px, 4vw, 43px); letter-spacing: -.045em; }
.filters { display: flex; gap: 9px; }
.filters select {
  appearance: none;
  min-width: 170px;
  padding: 10px 36px 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: white;
}
.status-message { min-height: 24px; color: var(--muted); font-size: 14px; }
.radio-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.radio-card {
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(22,31,51,.96), rgba(12,17,29,.99));
  border: 1px solid var(--line);
  border-radius: 17px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.radio-card:hover {
  transform: translateY(-3px);
  border-color: rgba(142,92,255,.46);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}
.radio-card:focus-within {
  border-color: rgba(142,92,255,.7);
  box-shadow: 0 0 0 3px rgba(142,92,255,.13);
}
.station-art {
  position: relative;
  aspect-ratio: 1.7;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(52,65,92,.96), rgba(17,24,39,.98) 70%);
}
.station-art::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
}
.station-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  background: white;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
}
.favorite-button {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  background: rgba(7,11,20,.66);
  font-size: 18px;
  cursor: pointer;
}
.favorite-button:hover { background: rgba(255,255,255,.1); }
.favorite-button.active { color: #ff7180; background: rgba(255,93,108,.14); }
.station-country {
  position: absolute;
  left: 9px;
  bottom: 8px;
  max-width: calc(100% - 18px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(7,11,20,.74);
  color: #c8d1e1;
  font-size: 9px;
  font-weight: 800;
}
.station-content { padding: 12px; }
.station-name {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  letter-spacing: -.015em;
}
.station-tags {
  min-height: 18px;
  margin: 3px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.station-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.station-quality {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #7f8ca3;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.station-play {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: white;
  color: #111522;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.station-play:hover { background: #eceeff; }
.station-play span { margin-left: 4px; color: var(--brand); }
.load-more { display: block; margin: 28px auto 0; background: transparent; border: 1px solid var(--line); }
.empty-state { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.skeleton { min-height: 210px; background: linear-gradient(100deg, var(--surface) 20%, var(--surface-2) 38%, var(--surface) 56%); background-size: 250% 100%; animation: shimmer 1.35s infinite; }
@keyframes shimmer { to { background-position-x: -250%; } }

.benefits { display: grid; grid-template-columns: .7fr 1.3fr; gap: 50px; border-top: 1px solid var(--line); }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.benefits-grid article { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.025); }
.benefits-grid article > span { color: #8e83ff; font-size: 12px; font-weight: 900; }
.benefits-grid h3 { margin: 30px 0 8px; font-size: 18px; }
.benefits-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.site-footer { padding: 48px clamp(20px, 5vw, 78px) 120px; background: #060912; border-top: 1px solid var(--line); }
.footer-main, .footer-bottom { max-width: 1170px; margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; }
.footer-main p { max-width: 470px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-links button, .footer-links a { padding: 0; border: 0; background: none; color: var(--muted); text-decoration: none; cursor: pointer; font-size: 13px; }
.footer-links button:hover, .footer-links a:hover { color: white; }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: #69758a; font-size: 12px; }

.player {
  position: fixed;
  z-index: 80;
  left: clamp(12px, 3vw, 42px);
  right: clamp(12px, 3vw, 42px);
  bottom: max(12px, env(safe-area-inset-bottom));
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 24px;
  padding: 11px 16px;
  background: rgba(17, 24, 39, .94);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.player-station { min-width: 0; display: flex; align-items: center; gap: 13px; }
.player-station img { flex: 0 0 auto; border-radius: 14px; object-fit: contain; background: white; }
.player-station div { min-width: 0; }
.player-station strong, .player-station span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-station span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.player-controls { display: flex; align-items: center; gap: 15px; }
.play-toggle { width: 46px; height: 46px; border: 0; border-radius: 50%; background: white; color: #101421; font-weight: 900; cursor: pointer; }
.volume-control { display: flex; align-items: center; gap: 8px; }
.volume-control input { width: 100px; accent-color: var(--brand-2); }
.player-status { color: #aeb9cb; font-size: 12px; white-space: nowrap; }
.player-close { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(1,3,8,.78); backdrop-filter: blur(12px); }
.modal { position: relative; width: min(100%, 430px); max-height: min(760px, 90vh); overflow: auto; padding: 30px; background: linear-gradient(155deg, #151e31, #0c111d); border: 1px solid rgba(255,255,255,.13); border-radius: 26px; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 13px; right: 14px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.auth-modal > img { display: block; margin: 0 auto 14px; }
.auth-modal h2, .auth-modal > p { text-align: center; }
.auth-modal h2 { margin: 0; }
.auth-modal > p { margin: 7px 0 20px; color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin-bottom: 20px; background: #090e19; border-radius: 13px; }
.auth-tabs button { padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--surface-3); color: white; }
.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 6px; color: #c3ccdc; font-size: 12px; font-weight: 700; }
.stack-form input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0a101c;
  color: white;
}
.stack-form .checkbox { display: flex; grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.stack-form .checkbox input { width: auto; accent-color: var(--brand); }
.stack-form small, .auth-modal small { color: var(--muted); font-size: 11px; }
.form-alert { min-height: 20px; margin-top: 12px; padding: 0; color: var(--muted); font-size: 13px; text-align: center; }
.form-alert.error { padding: 9px; color: #ff97a1; background: rgba(255,93,108,.1); border-radius: 10px; }
.form-alert.success { padding: 9px; color: #75efa9; background: rgba(45,216,123,.1); border-radius: 10px; }
.legal-modal { width: min(100%, 720px); }
.legal-modal h2 { margin-top: 0; }
.legal-modal h3 { margin-top: 24px; }
.legal-modal p, .legal-modal li { color: #aeb8c9; font-size: 14px; }

.toast-region { position: fixed; top: 88px; right: 18px; z-index: 150; display: grid; gap: 9px; }
.toast { max-width: min(360px, calc(100vw - 36px)); padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #1a2438; box-shadow: var(--shadow); font-size: 13px; animation: toast-in .2s ease-out; }
.toast.error { border-color: rgba(255,93,108,.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.setup-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.setup-card { width: min(100%, 470px); padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.setup-card > img { display: block; margin: 0 auto; }
.setup-card h1, .setup-card > p { text-align: center; }
.setup-card .button { display: block; text-align: center; text-decoration: none; }

@media (max-width: 1180px) {
  .radio-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .benefits { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .mobile-menu-button { display: inline-block; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 65px; }
  .hero-art { min-height: 330px; }
  .radio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .benefits-grid { grid-template-columns: 1fr; }
  .player { grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; }
  .player-status { display: none; }
  .volume-control { display: none; }
}
@media (max-width: 680px) {
  .radio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body { padding-bottom: 96px; }
  .site-header { min-height: 64px; padding: 10px 14px; }
  .brand { font-size: 17px; }
  .brand img { width: 36px; height: 36px; }
  .header-actions .install-button { display: none; }
  .button.ghost { padding: 8px 11px; }
  .hero { padding: 50px 18px 48px; gap: 25px; }
  .hero h1 { font-size: clamp(45px, 15vw, 64px); }
  .search-box { grid-template-columns: auto 1fr; padding-right: 12px; }
  .search-box button { grid-column: 1 / -1; }
  .hero-art { min-height: 260px; }
  .logo-orbit { width: 62%; }
  .catalog-section, .benefits { padding: 48px 16px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .filters { width: 100%; }
  .filters label, .filters select { flex: 1; min-width: 0; width: 100%; }
  .radio-grid { gap: 10px; }
  .station-art { aspect-ratio: 1.38; }
  .station-logo { width: 56px; height: 56px; border-radius: 14px; }
  .station-content { padding: 10px; }
  .station-name { font-size: 13px; }
  .station-tags { margin-bottom: 8px; font-size: 10px; }
  .station-quality { display: none; }
  .station-footer { justify-content: flex-end; }
  .station-play { width: 100%; min-height: 36px; }
  .footer-main, .footer-bottom { flex-direction: column; }
  .site-footer { padding-inline: 20px; }
  .player { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); padding: 9px 10px; border-radius: 17px; }
  .player-station img { width: 48px; height: 48px; }
  .play-toggle { width: 42px; height: 42px; }
  .modal { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
