:root {
  --bg: #07122b;
  --bg-soft: #0d1937;
  --panel: rgba(255, 255, 255, 0.09);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(95, 151, 255, 0.38);
  --text: #f4f7ff;
  --muted: #b4c0de;
  --accent: #77d9ff;
  --accent-dark: #07122b;
  --danger: #ffb5b5;
  --radius: 18px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-width: 320px;
  margin: 0;
  padding-bottom: 116px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(circle at top, rgba(91, 140, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #061028 0%, var(--bg) 42%, #09152f 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 18, 43, 0.82);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand img {
  width: auto;
  height: 56px;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.98rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.page {
  padding: 54px 0 32px;
}

.intro {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 9px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: #d5e2ff;
  background: rgba(91, 140, 255, 0.12);
  font-size: 0.92rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.intro p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.06rem;
}

.toolbar {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.search-label {
  color: var(--muted);
  font-weight: 700;
}

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: var(--panel);
}

.search-input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(119, 217, 255, 0.08);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.link-button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.chip {
  padding: 0 14px;
}

.chip.is-active,
.link-button[aria-pressed="true"] {
  border-color: rgba(119, 217, 255, 0.45);
  color: var(--text);
  background: rgba(119, 217, 255, 0.14);
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 16px;
}

.results-head h2 {
  font-size: 1.2rem;
}

.link-button {
  padding: 0 16px;
}

.radio-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.radio-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel);
}

.radio-card.is-active {
  border-color: rgba(119, 217, 255, 0.5);
  background: var(--panel-strong);
}

.radio-select {
  display: contents;
  text-align: left;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.radio-logo,
.player-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #dce7ff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.radio-logo {
  width: 56px;
  height: 56px;
}

.radio-logo img,
.player-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.radio-meta {
  min-width: 0;
}

.radio-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.radio-category {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.favorite-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.favorite-button[aria-pressed="true"] {
  border-color: rgba(119, 217, 255, 0.45);
  color: var(--accent);
}

.empty-state {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 320px;
  padding: 12px max(20px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--border);
  background: rgba(7, 18, 43, 0.96);
  backdrop-filter: blur(14px);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-logo {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
}

.player-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.player-text strong,
.player-text a,
.player-error {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-text a {
  width: fit-content;
  max-width: 100%;
  color: var(--accent);
  font-size: 0.9rem;
}

.player-error {
  color: var(--danger);
  font-size: 0.88rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.play-button,
.reload-button {
  min-width: 92px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.play-button {
  border: 0;
  color: var(--accent-dark);
  background: linear-gradient(135deg, #8db5ff, var(--accent));
}

.reload-button {
  border: 1px solid rgba(119, 217, 255, 0.35);
  color: var(--text);
  background: rgba(119, 217, 255, 0.12);
}

.play-button:disabled,
.reload-button:disabled {
  color: rgba(244, 247, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.volume-control input {
  width: 132px;
}

@media (max-width: 720px) {
  body {
    padding-bottom: 168px;
  }

  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .header-inner,
  .results-head {
    align-items: flex-start;
  }

  .header-inner,
  .player {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .page {
    padding-top: 38px;
  }

  .player {
    gap: 10px;
    padding: 10px 14px;
  }

  .player-controls {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .play-button {
    min-width: 104px;
  }

  .reload-button {
    min-width: 96px;
  }

  .volume-control {
    flex: 1;
    justify-content: flex-end;
  }

  .volume-control input {
    width: min(42vw, 160px);
  }
}

@media (max-width: 420px) {
  body {
    padding-bottom: 184px;
  }

  .brand img {
    height: 48px;
  }

  .radio-list {
    grid-template-columns: 1fr;
  }

  .player-logo {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .volume-control span {
    display: none;
  }
}
