:root {
  color-scheme: dark;
  --bg: #080f1a;
  --surface: #111e2d;
  --surface-raised: #18293a;
  --stroke: #32495d;
  --text: #f7fafc;
  --muted: #b0c3d1;
  --mint: #8af0c4;
  --sky: #8dcaff;
  --focus: #b9f7dd;
  --danger: #ffc0c8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 82% -4%, #274b5e66, transparent 42%),
    radial-gradient(ellipse at 0% 35%, #193d4140, transparent 37%),
    var(--bg);
  padding-bottom: 20px;
}
body.has-player { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.layout { width: min(100%, 1320px); margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }
.site-header {
  min-height: 79px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-bottom: 1px solid #ffffff17;
}
.brand {
  text-decoration: none; display: flex; gap: 11px; align-items: center;
  font-weight: 900; font-size: 23px; line-height: 1;
  letter-spacing: -.055em; white-space: nowrap;
}
.brand-symbol {
  display: grid; place-items: center; flex: none;
  width: 41px; height: 41px; border-radius: 13px;
  background: linear-gradient(130deg, var(--mint), var(--sky));
  box-shadow: 0 8px 30px #7eedd029;
  color: #0a2230; font-size: 28px;
}
.brand-accent { color: var(--mint); }
.brand-caption { color: var(--muted); font-size: 13px; line-height: 1.3; }
.ui-locale { margin-inline-start: auto; }
.ui-locale select {
  background: #162637; color: var(--text);
  border: 1px solid #516679; border-radius: 12px;
  min-height: 45px; max-width: 160px; padding: 9px 10px;
  font-weight: 700; cursor: pointer;
}
.hero { padding: 35px 0 23px; max-width: 890px; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .16em;
}
.live-dot {
  width: 8px; height: 8px; flex: none;
  background: var(--mint); border-radius: 50%;
  box-shadow: 0 0 0 3px #78e6bc22, 0 0 15px #78e6bc55;
}
.hero h1 {
  font-size: clamp(37px, 5.4vw, 65px); font-weight: 850;
  line-height: 1.08; letter-spacing: -.055em;
  overflow-wrap: anywhere; margin: 13px 0 10px;
}
.hero p {
  font-size: clamp(14px, 1.45vw, 17px);
  color: var(--muted); line-height: 1.6;
  margin: 0; max-width: 750px;
}
.finder {
  padding: 20px;
  border: 1px solid var(--stroke);
  border-radius: 23px;
  background: linear-gradient(145deg, #142638ec, #101d2bec);
  box-shadow: 0 22px 60px #0003, inset 0 1px #ffffff0c;
}
.search-box {
  min-height: 61px; display: flex; align-items: center; gap: 11px;
  background: #081625; border: 1px solid #4a6172;
  border-radius: 15px; padding: 6px 7px 6px 17px;
}
.search-box:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px #8af0c41a;
}
.search-icon { color: var(--mint); flex: none; width: 22px; height: 22px; }
.search-box input {
  min-width: 0; flex: 1; min-height: 42px;
  color: var(--text); background: transparent; border: none;
  outline: none; font-size: 16px; padding: 6px 0;
}
.search-box input::placeholder { color: #9eafc1; opacity: 1; }
.search-submit {
  flex: none; min-height: 47px; min-width: 90px;
  padding: 9px 18px; border: 0; border-radius: 11px;
  color: #092331; background: var(--mint);
  font-size: 14px; font-weight: 850;
}
.search-submit:hover, .load-more:hover, .player-toggle:hover { background: #b2fbd8; }
.filter-line {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 13px; margin-top: 16px;
}
.filter-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.filter-field label { font-size: 12px; font-weight: 750; color: var(--muted); }
.filter-field select, .filter-field input {
  width: 100%; min-width: 0; min-height: 48px;
  background: #0a1928; color: var(--text);
  border: 1px solid #41586b; border-radius: 11px;
  padding: 10px 12px; font-size: 15px;
}
.filter-field select option { color: #f3f6fb; background: #122337; }
.reset-filters {
  justify-self: end; grid-column: 1 / -1;
  padding: 9px 14px; min-height: 42px;
  color: var(--mint); background: transparent;
  border: 1px solid #527d7a; border-radius: 11px;
  font-size: 13px; font-weight: 750;
}
.reset-filters:hover { background: #224342; }
.mobile-filter-bar, .genres-toggle { display: none; }
.genre-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.genre-heading { margin: 18px 0 11px; font-size: 12px; font-weight: 850; color: var(--muted); }
.genres { display: flex; flex-wrap: wrap; gap: 8px; }
.genre {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 9px 14px;
  color: #d7e8f3; font-size: 13px; font-weight: 750;
  border: 1px solid #425970; border-radius: 999px; background: #21354a;
  white-space: nowrap; transition: border-color .14s, background-color .14s;
}
.genre:hover, .genre:focus-visible { border-color: var(--mint); }
.genre[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: #08252e; }
.results { margin-top: 29px; }
.results-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tab {
  padding: 11px 14px; min-height: 48px;
  color: var(--muted); background: #122538;
  border: 1px solid #365069; border-radius: 12px;
  font-size: 16px; font-weight: 800;
}
.tab.active { background: #214837; border-color: #69cda7; color: #ecfff5; }
.result-hint { margin: 10px 0 17px; color: var(--muted); font-size: 13px; }
.powered { font-size: 12px; color: var(--muted); padding-top: 11px; }
.powered a { color: #e0f8fa; }
.station-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.station-card {
  min-width: 0; min-height: 199px;
  display: flex; flex-direction: column; gap: 12px;
  padding: 17px; border-radius: 18px;
  border: 1px solid #354b5f;
  background: linear-gradient(151deg, #1a3042, #112235);
  box-shadow: 0 12px 28px #0002;
  transition: transform .16s, border-color .16s;
}
.station-card:hover { border-color: #649c95; transform: translateY(-2px); }
.station-top { display: flex; align-items: center; min-width: 0; gap: 12px; }
.station-art {
  width: 60px; height: 60px; flex: none;
  object-fit: contain; border-radius: 13px;
  padding: 5px; background: #294054;
}
.station-name {
  font-size: 16px; line-height: 1.3; font-weight: 850;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.station-sub {
  margin-top: 6px; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-line { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.tag {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 5px 9px; border-radius: 999px;
  background: #2d4255; color: #d5e5f0; font-size: 11px; font-weight: 700;
}
.station-metric { margin: 0; color: var(--mint); font-size: 12px; font-weight: 800; }
.card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.play-card {
  flex: 1; min-width: 118px; min-height: 49px;
  border: 1px solid #74c9a9; border-radius: 12px;
  color: #0b2a27; background: var(--mint);
  padding: 11px 13px; font-size: 14px; font-weight: 850;
}
.play-card:hover { background: #c6ffe3; }
.play-card:disabled { opacity: .5; cursor: not-allowed; }
.fav-button {
  width: 49px; height: 49px; flex: none;
  border: 1px solid #58748a; border-radius: 12px;
  color: #f1eafa; background: #2b4059; font-size: 22px;
}
.fav-button[aria-pressed="true"] { color: #ffc0da; border-color: #e694b2; }
.video-button {
  width: 100%; min-height: 44px; padding: 9px 13px;
  border: 1px solid #6a78a2; border-radius: 11px;
  background: #283d66; color: white; font-size: 13px; font-weight: 800;
}
.load-more-wrap { display: flex; justify-content: center; margin: 28px 0; }
.load-more {
  border: 0; border-radius: 12px; min-height: 50px;
  background: var(--mint); color: #06252c;
  padding: 12px 24px; font-size: 14px; font-weight: 850;
}
 .loading-card {
  grid-column: 1 / -1; border: 1px solid #48657a; border-radius: 16px;
  background: linear-gradient(120deg, #172b3a, #213649);
  color: var(--muted); padding: 30px 20px; text-align: center; font-size: 14px;
  min-height: 110px; display: grid; place-items: center;
}
.empty {
  grid-column: 1/-1; text-align: center;
  border: 1px dashed #566f86; border-radius: 16px;
  padding: 38px 18px; color: var(--muted);
}
.site-footer {
  padding: 36px 0 32px; color: #a9b9c7;
  font-size: 12px; line-height: 1.7;
}
.site-footer p { margin: 6px 0; }
.player {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 99;
  background: #102133f8; border-top: 1px solid #527284;
  padding: 13px max(20px, calc((100vw - 1240px)/2)) max(13px, env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(18px); box-shadow: 0 -14px 50px #0008;
}
.player-main { display: flex; align-items: center; gap: 13px; }
.player-art { width: 55px; height: 55px; flex: none; padding: 5px; object-fit: contain; border-radius: 12px; background: #30485d; }
.player-info { min-width: 0; flex: 1; }
.playing-label { display: flex; align-items: center; gap: 8px; color: var(--mint); font-size: 11px; font-weight: 850; }
.player-name { margin-top: 6px; font-size: 16px; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-toggle {
  width: 53px; height: 53px; flex: none; border: 0;
  border-radius: 50%; background: var(--mint); color: #09212c;
  font-size: 24px; font-weight: 900;
}
.volume-wrap { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.volume-wrap input { width: 115px; accent-color: var(--mint); }
.player-close {
  border: 1px solid #527085; border-radius: 12px; background: #22384a;
  width: 46px; height: 46px; flex: none; color: var(--text);
  font-size: 25px; line-height: 1;
}
.player-error { margin: 8px 0 0 68px; color: var(--danger); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.video-panel { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: #000d; padding: 16px; }
.video-box { width: min(900px, 100%); border: 1px solid #5f8095; background: #132234; padding: 16px; border-radius: 17px; }
.video-box iframe { display: block; width: 100%; aspect-ratio: 16/9; background: black; border: 0; }
.video-close { border: 0; border-radius: 11px; background: var(--mint); color: #12242e; padding: 11px 18px; font-weight: 850; }
.video-notice { font-size: 13px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1020px) {
  .station-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-line { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .brand-caption { display: none; }
}

@media (max-width: 640px) {
  .layout { padding-inline: 14px; }
  .site-header { min-height: 66px; gap: 8px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand-symbol { width: 34px; height: 34px; border-radius: 11px; font-size: 23px; }
  .ui-locale select { max-width: 112px; min-height: 44px; font-size: 13px; padding-inline: 6px; }
  .hero { padding: 25px 0 19px; }
  .hero .eyebrow { font-size: 10px; }
  .hero h1 { font-size: clamp(33px, 8vw, 43px); margin: 12px 0 9px; line-height: 1.12; }
  .hero p { font-size: 14px; line-height: 1.5; }
  .finder { padding: 12px; border-radius: 18px; }
  .search-box { min-height: 58px; padding-inline: 12px 6px; gap: 8px; border-radius: 13px; }
  .search-icon { width: 19px; height: 19px; }
  .search-box input { font-size: 16px; }
  .search-submit { min-height: 45px; min-width: 74px; padding: 8px 10px; }
  .mobile-filter-bar { display: block; margin-top: 11px; }
  .filters-toggle {
    width: 100%; display: flex; align-items: center; justify-content: start; gap: 10px;
    background: #213447; border: 1px solid #526e7f; border-radius: 12px;
    color: var(--text); padding: 10px 13px; min-height: 48px; font-size: 14px; font-weight: 800;
  }
  .filter-icon { color: var(--mint); font-size: 18px; line-height: 1; }
  .filter-chevron { margin-inline-start: auto; font-size: 20px; transition: transform .18s; line-height: 1; }
  .finder.filters-expanded .filter-chevron { transform: rotate(180deg); }
  .filter-count {
    display: inline-grid; place-items: center;
    min-width: 23px; height: 23px; border-radius: 50%;
    color: #07232b; background: var(--mint); font-size: 12px; font-weight: 900;
  }
  .filter-line { display: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
  .finder.filters-expanded .filter-line { display: grid; }
  .filter-field label { font-size: 12px; }
  .filter-field input, .filter-field select { font-size: 14px; min-height: 48px; padding-inline: 9px; }
  .filter-field:nth-child(3) { grid-column: 1/-1; }
  .reset-filters { width: 100%; min-height: 46px; grid-column: 1/-1; }
  .genre-heading-row { margin-top: 9px; }
  .genre-heading { margin: 11px 0 7px; }
  .genres-toggle {
    display: inline-flex; align-items: center;
    background: none; border: none; border-radius: 9px;
    color: var(--mint); padding: 7px 4px; min-height: 44px;
    font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px;
  }
  .genres {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity; overscroll-behavior-inline: contain;
    padding: 3px 1px 9px; scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .genres .genre { flex: 0 0 auto; scroll-snap-align: start; }
  .finder.genres-expanded .genres { flex-wrap: wrap; overflow: visible; }
  .genre { min-height: 46px; padding: 10px 14px; font-size: 13px; }
  .results { margin-top: 19px; }
  .tabs { flex-wrap: nowrap; gap: 7px; }
  .tab { min-height: 47px; padding: 10px 12px; font-size: 15px; }
  .result-hint { margin: 9px 0 14px; font-size: 12px; }
  .powered { display: none; }
  .station-grid { grid-template-columns: 1fr; gap: 11px; }
  .station-card { min-height: 169px; padding: 14px; gap: 10px; border-radius: 15px; }
  .station-art { width: 54px; height: 54px; }
  .station-name { font-size: 16px; }
  .station-sub { font-size: 12px; }
  .tag-line { gap: 5px; }
  .tag { padding: 4px 8px; }
  .play-card, .fav-button { min-height: 49px; }
  .load-more { min-height: 50px; }
  .site-footer { padding-top: 28px; }
  .player {
    padding: 10px 12px max(10px,env(safe-area-inset-bottom,0px));
    border-radius: 18px 18px 0 0;
  }
  .player-main { gap: 9px; }
  .player-art { width: 46px; height: 46px; }
  .player-name { font-size: 13px; }
  .playing-label { font-size: 10px; }
  .player-toggle { width: 52px; height: 52px; }
  .player-close { width: 45px; height: 45px; }
  .player-error { margin-inline-start: 0; font-size: 12px; }
  .volume-wrap { display: none; }
  body.has-player { padding-bottom: calc(126px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 360px) {
  .layout { padding-inline: 11px; }
  .brand { font-size: 17px; }
  .brand-symbol { width: 32px; height: 32px; }
  .ui-locale select { max-width: 100px; }
  .hero h1 { font-size: 33px; }
  .search-box { padding-inline: 9px 5px; }
  .search-submit { min-width: 70px; }
  .player { padding-inline: 9px; }
  .player-main { gap: 7px; }
  .player-art { width: 42px; height: 42px; }
  .player-toggle { width: 48px; height: 48px; }
  .player-close { width: 44px; height: 44px; }
}

html[dir="rtl"] .site-header,
html[dir="rtl"] .station-top { direction: rtl; }
html[dir="rtl"] .genre { direction: rtl; }
html[dir="rtl"] .search-box { direction: rtl; }
html[dir="rtl"] .station-name,
html[dir="rtl"] .station-sub,
html[dir="rtl"] .player-name { unicode-bidi: plaintext; }
@media (hover: none) and (pointer: coarse) {
  .station-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
