@charset "UTF-8";
/* ============ WorldRadio - light theme (TuneIn-style) ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f2f3f5;
  --card: #ffffff;
  --card-hover: #f6f7f9;
  --border: #e5e7ec;
  --text: #1a1b1f;
  --text-dim: #6b6e7c;
  --accent: #e5141a;
  --accent-soft: rgba(229, 20, 26, 0.08);
  --navy: #17181c;
  --danger: #e5141a;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.07), 0 1px 2px rgba(16, 24, 40, 0.05);
  --radius: 14px;
  --player-h: 62px;
  --header-h: 64px;
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: var(--player-h);
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

[hidden] { display: none !important; }

/* ============ Header ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-img { display: block; border-radius: 8px; }
.logo-text { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em; }
.logo-text b { color: var(--accent); font-weight: 800; }

.search-wrap { position: relative; flex: 1; max-width: 480px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
#search-input {
  width: 100%; height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
#search-input:focus { border-color: var(--accent); }
#search-input::placeholder { color: var(--text-dim); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-btn {
  padding: 8px 14px; border-radius: 20px;
  color: var(--text-dim); font-weight: 600; font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.nav-btn:hover { color: var(--text); background: var(--bg-soft); }
.nav-btn.active { color: var(--accent); background: var(--accent-soft); }
.badge {
  background: var(--accent); color: #ffffff;
  font-size: 0.72rem; font-weight: 700;
  border-radius: 10px; padding: 1px 7px;
}

/* ============ News ticker ============ */
.ticker {
  position: sticky; top: var(--header-h); z-index: 40;
  display: flex; align-items: center;
  height: 42px;
  background: var(--navy);
  overflow: hidden;
}
.ticker-label {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 7px;
  height: 100%;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 1.5px;
  z-index: 2;
}
.tk-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: tk-pulse 1.6s ease-in-out infinite;
}
@keyframes tk-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}
.ticker-viewport {
  position: relative;
  flex: 1; overflow: hidden; height: 100%;
  display: flex; align-items: center;
}
/* soft fade at both edges so headlines glide in and out */
.ticker-viewport::before,
.ticker-viewport::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 36px;
  z-index: 1; pointer-events: none;
}
.ticker-viewport::before { left: 0; background: linear-gradient(90deg, var(--navy), transparent); }
.ticker-viewport::after { right: 0; background: linear-gradient(270deg, var(--navy), transparent); }
.ticker-track {
  display: inline-flex; align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: tk-scroll 120s linear infinite;
}
.ticker:hover .ticker-track,
.ticker.tk-paused .ticker-track { animation-play-state: paused; }
@keyframes tk-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  color: #f2f4fa; text-decoration: none;
  font-size: 1rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 9px;
}
.ticker-item::after {
  content: "\2022";
  color: rgba(255, 255, 255, 0.22);
  margin: 0 19px;
}
.ticker-item:hover { color: #fff; text-decoration: underline; }
.tk-src {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 10px; color: #fff;
  flex-shrink: 0;
}
.tk-bbc { background: #b80000; }
.tk-voa { background: #20558a; }
.tk-dw { background: #0098db; }
.tk-arewa { background: #0f7a3d; }
.tk-ago { color: #9aa1c2; font-size: 0.78rem; font-weight: 600; }
.ticker-pause {
  flex-shrink: 0;
  width: 34px; height: 100%;
  color: #8b93b8; font-size: 0.8rem;
  transition: color 0.15s;
}
.ticker-pause:hover { color: #fff; }
/* reduced-motion mode: one headline at a time, gently fading in */
.ticker.tk-static .ticker-track { animation: none; width: 100%; }
.ticker.tk-static .ticker-item { animation: tk-fade 0.5s ease; }
.ticker.tk-static .ticker-item::after { content: none; }
@keyframes tk-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) {
  .tk-label-text { display: none; }
  .ticker-label { padding: 0 12px; }
}

/* ============ Main layout ============ */
.main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 40px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(120deg, #7c0b0f 0%, #a5100f 55%, #17181c 100%);
  padding: 44px 40px;
  margin-bottom: 26px;
  color: #ffffff;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 10px; }
.hero p { color: #f2cfcf; max-width: 560px; line-height: 1.55; }
.hero-glow {
  position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 130, 130, 0.3), transparent 70%);
  pointer-events: none;
}

/* Genre chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip {
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg-soft); border: 1px solid transparent;
  color: var(--text); font-weight: 600; font-size: 0.9rem;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* Shelves */
.shelf { margin-bottom: 36px; }
.shelf-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}
.shelf-head h2 { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.015em; }
.view-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.view-head h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.back-btn {
  padding: 6px 12px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-dim); font-weight: 600;
}
.back-btn:hover { color: var(--text); }

.select {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font: inherit; font-size: 0.9rem;
  outline: none; max-width: 220px;
}

/* ============ Station cards - artwork tiles ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 22px 16px;
}
.station-card {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.station-card { text-decoration: none; color: inherit; }

.station-art {
  position: relative;
  width: 100%; aspect-ratio: 1;
  border-radius: 14px;
  background: var(--bg-soft);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.station-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.station-card:hover .station-art {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.16);
}
.station-card.playing .station-art {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

/* Initials tile when a station has no logo */
.art-initials {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; font-weight: 800; letter-spacing: 0.5px;
  color: #fff; user-select: none;
}
.art-g0 { background: linear-gradient(135deg, #e5141a, #c11117); }
.art-g1 { background: linear-gradient(135deg, #2b3468, #171b33); }
.art-g2 { background: linear-gradient(135deg, #c2410c, #7c2d12); }
.art-g3 { background: linear-gradient(135deg, #0e7490, #164e63); }
.art-g4 { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.art-g5 { background: linear-gradient(135deg, #be123c, #881337); }

.station-info { padding: 9px 2px 0; min-width: 0; }
.station-name {
  font-weight: 600; font-size: 0.89rem; line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.station-sub {
  color: var(--text-dim); font-size: 0.76rem; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* overlays live inside .station-art */
.card-fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.25);
  opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.card-fav svg { display: block; }
.station-card:hover .card-fav { opacity: 1; }
.card-fav.faved { opacity: 1; color: var(--danger); }

.card-info {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 4px 9px; border-radius: 8px;
  background: rgba(28, 32, 60, 0.78); color: #fff;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.3px;
  text-decoration: none;
  opacity: 0; transition: opacity 0.15s;
}
.station-card:hover .card-info { opacity: 1; }
.card-info:hover { background: var(--accent); }

/* Equalizer pill on the playing tile */
.eq {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  display: none; align-items: flex-end; gap: 2.5px;
  height: 26px; padding: 5px 8px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.25);
}
.station-card.playing .eq { display: flex; }
.eq span {
  width: 3px; background: var(--accent); border-radius: 2px;
  animation: eq-bounce 0.9s ease-in-out infinite;
}
.eq span:nth-child(1) { animation-delay: 0s; }
.eq span:nth-child(2) { animation-delay: 0.25s; }
.eq span:nth-child(3) { animation-delay: 0.5s; }
@keyframes eq-bounce {
  0%, 100% { height: 5px; }
  50% { height: 15px; }
}
.station-card.playing.paused .eq span { animation-play-state: paused; height: 5px; }

/* ============ Station detail view ============ */
.station-hero {
  display: flex; align-items: center; gap: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.station-hero-art {
  width: 112px; height: 112px; flex-shrink: 0;
  border-radius: 16px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.station-hero-art img { width: 100%; height: 100%; object-fit: cover; }
.station-hero-info { min-width: 0; flex: 1; }
.station-hero-info h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.station-hero-sub { color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; }
.listen-btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 0.95rem;
  padding: 12px 24px; border-radius: 24px;
  transition: transform 0.12s, background 0.15s;
}
.listen-btn:hover { transform: scale(1.03); background: #c11117; }
.station-desc { max-width: 720px; margin-bottom: 36px; line-height: 1.65; font-size: 0.95rem; }
.station-desc p { margin-bottom: 16px; }

/* ============ Site footer (crawlable station directory) ============ */
.site-footer {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line, var(--border));
}
.site-footer h2 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.01em; }
.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 7px 20px;
  margin-bottom: 20px;
}
.footer-links a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.84rem; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.footer-links a:hover { color: var(--accent); }
.footer-note { color: var(--text-dim); font-size: 0.78rem; line-height: 1.6; max-width: 640px; }
.footer-contact { margin-top: 10px; font-size: 0.82rem; color: var(--text-dim); }
.footer-contact a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-contact a:hover { color: var(--accent); }

/* ============ Empty & loader ============ */
.empty { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 1.05rem; }
.loader { display: flex; justify-content: center; padding: 40px; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Player bar ============ */
.player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  height: var(--player-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(16, 24, 40, 0.06);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}
.player-station { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-soft); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.player-art img { width: 100%; height: 100%; object-fit: cover; }
.player-art .art-initials { font-size: 0.85rem; }
.player-art > svg { width: 18px; height: 18px; }
.player-meta { min-width: 0; }
.player-name { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { color: var(--text-dim); font-size: 0.74rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-controls { display: flex; align-items: center; gap: 12px; justify-self: center; }
.play-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s, opacity 0.15s;
}
.play-btn svg { width: 18px; height: 18px; }
.play-btn:hover:not(:disabled) { transform: scale(1.06); }
.play-btn:disabled { opacity: 0.35; cursor: default; }
.btn-spinner {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent; border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}
.live-tag {
  display: flex; align-items: center; gap: 6px;
  color: var(--danger); font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.player-volume { display: flex; align-items: center; gap: 8px; justify-self: end; }
#volume { width: 90px; accent-color: var(--accent); cursor: pointer; }

.icon-btn {
  font-size: 1.15rem; padding: 6px; border-radius: 8px;
  color: var(--text-dim); transition: color 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); }
.icon-btn.faved { color: var(--danger); }

/* Error state on player */
.player[data-state="error"] .player-sub { color: var(--danger); }

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .header-inner { gap: 10px; padding: 0 12px; }
  .logo-text { display: none; }
  .nav-btn { padding: 8px 10px; font-size: 0.85rem; }
  .main { padding: 16px 12px 40px; }
  .hero { padding: 28px 22px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; }
  .player { grid-template-columns: 1fr auto; }
  .player-volume { display: none; }
}
