/* AI生成 */
/* 声波集 · 深色广播主题 */
:root {
  --bg: #141416;
  --bg-soft: #1b1b1f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f0eeea;
  --text-dim: #a09d96;
  --accent: #e8a25a;
  --accent-soft: rgba(232, 162, 90, 0.14);
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Outfit", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(40rem 24rem at -10% 30%, rgba(120, 140, 93, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer, .hero, .filter-bar { position: relative; z-index: 1; }

button { font-family: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 20, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; color: var(--text); }
.brand-text strong { font-size: 1.15rem; letter-spacing: 0.02em; font-weight: 700; }
.brand-text small { font-size: 0.62rem; letter-spacing: 0.28em; color: var(--text-dim); }

.header-clock {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}
.clock-date { font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.04em; }
.clock-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex: none;
}
.clock-time {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) { .header-clock { display: none; } }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 0;
  flex: 0 1 340px;
  transition: border-color 0.25s var(--ease);
}
.search-box:focus-within { border-color: rgba(232, 162, 90, 0.55); }
.search-box .icon { width: 16px; height: 16px; color: var(--text-dim); flex: none; }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  width: 100%;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--text-dim); }

/* ── Hero ── */
.hero {
  overflow: hidden;
  padding: 72px 24px 84px;
  text-align: center;
  color: var(--text);
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 46ch;
  margin: 0 auto;
}
.hero-wave {
  margin-top: 34px;
  color: rgba(232, 162, 90, 0.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-wave svg { width: 100%; height: 48px; display: block; }
.hero-wave .wave-delay { color: rgba(160, 157, 150, 0.25); }

/* ── Filter bar ── */
.filter-bar {
  position: sticky;
  top: 62px;
  z-index: 15;
  background: rgba(20, 20, 22, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.filter-scroll {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #141416;
  font-weight: 600;
}
.chip-fav.active { background: var(--accent); }

.region-select {
  flex: none;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
}
.region-select option { background: var(--bg-soft); color: var(--text); }

/* ── Grid ── */
main { max-width: 1280px; margin: 0 auto; padding: 36px 24px 140px; }
.station-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}
.station-meta h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.count-pill {
  font-size: 0.75rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.station-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  animation: card-in 0.5s var(--ease) both;
  animation-delay: calc(var(--index, 0) * 40ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.station-card:hover {
  background: var(--surface-hover);
  border-color: rgba(232, 162, 90, 0.4);
  transform: translateY(-3px);
}
.station-card:active { transform: scale(0.98); }
.station-card.playing { border-color: var(--accent); background: var(--accent-soft); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.card-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.fav-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s, transform 0.2s var(--ease);
}
.fav-btn:hover { color: var(--accent); transform: scale(1.1); }
.fav-btn svg { width: 18px; height: 18px; display: block; }
.fav-btn.on { color: var(--accent); }
.fav-btn.on svg path { fill: var(--accent); }

.card-name { font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; }
.card-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  letter-spacing: 0.04em;
}
.tag-freq { color: var(--accent); border-color: rgba(232, 162, 90, 0.35); }
.tag-plays {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.plays-icon { width: 11px; height: 11px; flex: none; }

/* ── 分页导航 ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.page-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(232, 162, 90, 0.5);
  background: var(--surface-hover);
}
.page-btn:active:not(:disabled) { transform: scale(0.95); }
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #141416;
  font-weight: 700;
}
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-edge { padding: 0 16px; }
.page-ellipsis {
  color: var(--text-dim);
  padding: 0 4px;
  letter-spacing: 0.15em;
}
.page-info {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── 空态 ── */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-state svg { color: rgba(232, 162, 90, 0.4); }
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 22px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ── Player bar ── */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(24, 24, 28, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  animation: bar-in 0.4s var(--ease);
}
@keyframes bar-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.player-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.now-playing { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-badge {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  display: grid;
  place-items: center;
}
.np-text { min-width: 0; }
.np-text strong {
  display: block;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 等化器动画 */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; margin-left: 6px; opacity: 0.35; }
.eq i {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  height: 30%;
}
.player-bar.is-playing .eq { opacity: 1; }
.player-bar.is-playing .eq i { animation: eq-bounce 1s ease-in-out infinite; }
.player-bar.is-playing .eq i:nth-child(2) { animation-delay: 0.18s; }
.player-bar.is-playing .eq i:nth-child(3) { animation-delay: 0.36s; }
.player-bar.is-playing .eq i:nth-child(4) { animation-delay: 0.54s; }
@keyframes eq-bounce {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}
.eq.buffering i { animation-duration: 0.45s; }

.player-controls { display: flex; align-items: center; gap: 10px; }
.ctl-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.ctl-btn:hover { background: var(--surface-hover); border-color: rgba(255, 255, 255, 0.22); }
.ctl-btn:active { transform: scale(0.94); }
.ctl-btn svg { width: 18px; height: 18px; }
.play-main {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-color: var(--accent);
  color: #141416;
}
.play-main:hover { background: #f0b473; border-color: #f0b473; }
.play-main svg { width: 22px; height: 22px; }

.player-volume { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

.fav-toggle { color: var(--text-dim); }
.fav-toggle.on { color: var(--accent); }
.fav-toggle.on svg path { fill: var(--accent); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.85rem;
  z-index: 40;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.3s var(--ease);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ── 响应式 ── */
@media (max-width: 860px) {
  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "np controls" "vol vol";
    row-gap: 10px;
  }
  .now-playing { grid-area: np; }
  .player-controls { grid-area: controls; }
  .player-volume { grid-area: vol; justify-content: center; }
  .fav-toggle { display: none; }
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; gap: 12px; padding: 12px 16px; }
  .search-box { flex: 1 1 auto; width: 100%; }
  .hero { padding: 48px 16px 56px; }
  .filter-bar { top: 104px; }
  .filter-scroll { padding: 10px 16px; }
  main { padding: 24px 16px 150px; }
  .station-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .station-card { padding: 14px; }
  .card-icon { width: 34px; height: 34px; }
  .card-desc { min-height: 0; display: none; }
  .region-select { margin-left: 0; }
}

@media (max-width: 420px) {
  .station-grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
