/*#version 1768645000*/
/* ============================================================
   index-v2.php styles — tile-grid redesign with sticky player.
   Loaded only by /index-v2.php; lives alongside style.css so
   the original homepage is untouched during staging.
   ============================================================ */

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

:root {
  --bg: #0a0e14;
  --bg-elevated: #161b22;
  --fg: #e6edf3;
  --fg-dim: #8b949e;
  --fg-muted: #c5c5cd;
  --accent: #5cd6ff;
  --accent-warm: #ffb454;
  --accent-green: #4ade80;
  --border: rgba(255, 255, 255, 0.08);
  --tile-radius: 12px;
  --gap: 14px;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
               'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

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

/* ─── Page wrapper ──────────────────────────────────────────────── */
.wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px 120px 24px;
}

/* ─── Header ────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.site-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: contain;
  /* logo5.png is a circular dark-disc icon with transparent corners,
     so it renders correctly against the page background without any
     extra wrapping or border-radius. */
}

.site-title-block { flex: 1; min-width: 200px; }

.site-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.site-subtitle {
  font-size: 13px;
  color: var(--fg-dim);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge.accent {
  color: var(--accent);
  border-color: rgba(92, 214, 255, 0.3);
  background: rgba(92, 214, 255, 0.08);
}

/* ─── Live-updates toggle (header) ───────────────────────────────── */
.live-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.live-toggle-label .label-status {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.8px;
  font-weight: 500;
}

.live-toggle input { display: none; }

.live-toggle .switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 180ms ease;
  flex-shrink: 0;
}

.live-toggle .switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms ease, background 180ms ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.live-toggle input:checked + .switch {
  background: var(--accent);
}

.live-toggle input:checked + .switch::after {
  transform: translateX(18px);
}

.live-toggle .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  display: none;
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse 1.6s ease-in-out infinite;
}

.live-toggle input:checked ~ .pulse-dot { display: inline-block; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (max-width: 720px) {
  .badges { display: none; }
}

/* ─── Section title ─────────────────────────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 8px 0 16px 0;
}

.section-title .count {
  color: var(--accent);
  background: rgba(92, 214, 255, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* ─── Filter chip row ───────────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}
.filter-row::-webkit-scrollbar { height: 4px; }
.filter-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.chip {
  flex-shrink: 0;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
  user-select: none;
}
.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}
.chip.active {
  background: rgba(92, 214, 255, 0.15);
  border-color: rgba(92, 214, 255, 0.4);
  color: var(--accent);
}

/* ─── Station grid ──────────────────────────────────────────────── */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--gap);
}

/* ─── Tile ──────────────────────────────────────────────────────── */
.tile {
  aspect-ratio: 1 / 1;
  border-radius: var(--tile-radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--bg-elevated);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
  border: 1px solid transparent;
}

.tile:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.tile.is-current {
  border-color: rgba(92, 214, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(92, 214, 255, 0.25);
}

.tile-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    hsl(var(--g-h, 220), 30%, 35%) 0%,
    hsl(var(--g-h, 220), 30%, 15%) 100%);
}

.tile-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 220ms ease;
  /* `loading="lazy"` on the <img> tells the browser to skip downloading
     this image until it scrolls into the viewport. Without that hint the
     browser would request all 100 covers on first paint. */
}

/* "Playing" indicator — only on currently-streaming tile. */
.playing-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  padding: 5px 8px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  z-index: 3;
}
.playing-indicator .bar {
  width: 3px;
  background: #fff;
  border-radius: 2px;
  animation: eqbar 1.4s ease-in-out infinite;
}
.playing-indicator .bar:nth-child(1) { animation-delay: 0s; }
.playing-indicator .bar:nth-child(2) { animation-delay: 0.2s; }
.playing-indicator .bar:nth-child(3) { animation-delay: 0.4s; }
.playing-indicator .bar:nth-child(4) { animation-delay: 0.1s; }
@keyframes eqbar {
  0%, 100% { height: 4px; }
  50%      { height: 12px; }
}

.tile-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 12px 10px 12px;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0)    0%,
    rgba(0, 0, 0, 0.53) 55%,
    rgba(0, 0, 0, 0.87) 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tile-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.tile-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  letter-spacing: 0.4px;
  margin-top: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tile-track {
  color: var(--fg-muted);
  font-size: 11px;
  letter-spacing: 0.3px;
  margin-top: 4px;
  min-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ─── Articles section ──────────────────────────────────────────── */
.articles { margin-top: 64px; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.article-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 180ms;
}
.article-card:hover {
  border-color: rgba(92, 214, 255, 0.4);
}

.article-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.article-subtitle {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.article-date {
  font-size: 11px;
  color: var(--fg-dim);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.article-excerpt {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Sticky player bar ─────────────────────────────────────────── */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(22, 27, 34, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateY(100%);
  transition: transform 220ms ease-out;
  z-index: 100;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.45);
}
.player-bar.visible { transform: translateY(0); }

.player-cover {
  width: 64px; height: 64px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
  flex-shrink: 0;
}
.player-info { flex: 1; min-width: 0; }
.player-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-track {
  font-size: 14px;
  color: var(--accent-green);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Open full" link → dedicated station page (PlayerScreen-style).
   On desktop it's a labelled pill; on phones the text is hidden so the
   icon doesn't push the play button off-screen. */
.player-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.player-open-link:hover {
  background: rgba(92, 214, 255, 0.1);
  border-color: rgba(92, 214, 255, 0.3);
  color: var(--accent);
}
.player-open-link svg { width: 14px; height: 14px; }

.player-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0a0e14;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(92, 214, 255, 0.35);
}
.player-btn:hover { transform: scale(1.08); }
.player-btn svg { width: 22px; height: 22px; }

.player-bar audio { display: none; }

@media (max-width: 720px) {
  .player-bar { padding: 14px 16px; gap: 12px; }
  .player-cover { width: 56px; height: 56px; }
  .player-name { font-size: 15px; }
  .player-track { font-size: 12px; }
  .player-open-link span { display: none; }
  .player-open-link { padding: 8px 10px; }
}

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  color: var(--fg-dim);
  font-size: 12px;
  padding: 48px 0 24px 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--fg-muted);
  margin: 0 6px;
}
.footer a:hover { color: var(--accent); }

/* ─── Station page (PlayerScreen-style) ─────────────────────────
   Layout: top-bar (back link + format chip), centered big cover,
   station name, format meta, now-playing card, large play button,
   secondary actions (share / external), About + tech details.
   Shares the dark-tinted gradient stage with the rest of the
   homepage CSS via :root variables. */

.stage-tint {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top, hsl(var(--stage-h, 220), 35%, 22%) 0%, transparent 55%),
    linear-gradient(to bottom, hsl(var(--stage-h, 220), 25%, 12%) 0%, #050810 100%);
  z-index: -1;
}

.station-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 720px;
  margin: 0 auto;
  gap: 12px;
  flex-wrap: wrap;
}
.station-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-dim);
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 120ms, color 120ms;
}
.station-back:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
}
.station-back svg { width: 16px; height: 16px; }

.station-format-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.station-stage {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.station-cover {
  width: min(320px, 80vw);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  margin: 24px 0;
  background-color: var(--bg-elevated);
  transition: background-image 220ms ease;
}

.station-name-big {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.station-meta-line {
  font-size: 13px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.station-np {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 32px;
  text-align: left;
}
.station-np-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-green);
  margin-bottom: 6px;
  font-weight: 700;
}
.station-np-artist {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--fg);
}
.station-np-title {
  font-size: 14px;
  color: var(--fg-muted);
}

.station-controls {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
}
.station-play-btn {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0a0e14;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms;
  box-shadow: 0 12px 32px rgba(92, 214, 255, 0.4);
}
.station-play-btn:hover { transform: scale(1.04); }
.station-play-btn svg { width: 34px; height: 34px; }

.station-secondary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}
.station-secondary-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 120ms, background 120ms;
}
.station-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
}
.station-secondary-btn svg { width: 18px; height: 18px; }

.station-details {
  width: 100%;
  max-width: 520px;
  text-align: left;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
}
.station-details h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-dim);
}
.station-details p { margin-bottom: 16px; color: var(--fg-muted); }
.station-details-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.station-details-row > div { flex: 1; min-width: 140px; }
.station-details-row strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fg-dim);
  margin-bottom: 2px;
  font-weight: 600;
}
.station-details-row span { color: var(--fg); font-size: 14px; }

.station-stream audio {
  margin-top: 16px;
  width: 100%;
  max-width: 520px;
}

@media (max-width: 600px) {
  .station-name-big { font-size: 22px; }
  .station-np-artist { font-size: 16px; }
  .station-controls { gap: 18px; }
  .station-play-btn { width: 70px; height: 70px; }
  .station-play-btn svg { width: 28px; height: 28px; }
}

/* ─── App-only support ──────────────────────────────────────────
   HTTP-only stations are visually marked with a small badge and
   hidden by default (via .is-app-only-hidden). The header toggle
   reveals them; clicking one shows the app-download modal. */

.is-app-only-hidden { display: none; }

.app-only-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  z-index: 4;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.apponly-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 180ms ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.apponly-modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 20px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.apponly-modal-emoji {
  font-size: 42px;
  margin-bottom: 8px;
}

.apponly-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
}

.apponly-modal-body {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.apponly-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apponly-modal-btn {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}
.apponly-modal-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}
.apponly-modal-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0e14;
}
.apponly-modal-btn.primary:hover {
  filter: brightness(1.1);
}

/* Utility (matches style.css convention for inline-style replacements) */
.is-hidden { display: none; }
