/* ============================================================
   AUDIO NEWS PLATFORM — app.css
   Design: Dark Editorial  |  Fonts: DM Serif Display / DM Sans
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0d0d0d;
  --bg2:         #141414;
  --bg3:         #1c1c1c;
  --bg4:         #242424;
  --border:      rgba(255,255,255,0.08);
  --border-md:   rgba(255,255,255,0.14);

  --text:        #f0ede6;
  --text-muted:  #8a8680;
  --text-dim:    #5a5754;

  --accent:      #e8a020;
  --accent-dim:  rgba(232,160,32,0.18);
  --accent-glow: rgba(232,160,32,0.35);

  --player-h:    72px;
  --nav-h:       60px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.5);
  --shadow-md:   0 6px 24px rgba(0,0,0,0.6);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.7);

  --trans:       0.18s ease;
  --trans-md:    0.28s ease;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg:          #fdfcfb;
  --bg2:         #f4f1ea;
  --bg3:         #ebe6df;
  --bg4:         #ded9d0;
  --border:      rgba(0,0,0,0.08);
  --border-md:   rgba(0,0,0,0.14);

  --text:        #1a1918;
  --text-muted:  #5a5754;
  --text-dim:    #8a8680;

  --accent:      #d68d18;
  --accent-dim:  rgba(214,141,24,0.18);
  --accent-glow: rgba(214,141,24,0.35);

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.05);
  --shadow-md:   0 6px 24px rgba(0,0,0,0.1);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.15);

  --nav-bg: rgba(253,252,251,0.95);
  --nav-bg-mobile: rgba(253,252,251,0.98);
  --hero-g1: rgba(254,248,240,0.92);
  --hero-g2: rgba(253,252,251,0.85);
  --hero-g3: rgba(214,141,24,0.1);
  --player-bg: rgba(245,242,238,0.97);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: calc(var(--player-h) + 16px);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Layout ────────────────────────────────────────────────── */
.container   { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm{ width: 100%; max-width: 760px;  margin: 0 auto; padding: 0 20px; }

.site-main { padding-top: var(--nav-h); min-height: 60vh; }

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--nav-bg, rgba(13,13,13,0.95));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  height: 100%; padding: 0 20px;
  display: flex; align-items: center; gap: 24px;
}

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.2rem;
  flex-shrink: 0;
}
.logo-icon { color: var(--accent); font-size: 1rem; }

/* Dark/light logo switching */
.logo-img--light { display: none; }
[data-theme="light"] .logo-img--dark  { display: none !important; }
[data-theme="light"] .logo-img--light { display: block !important; }

.nav-links {
  display: flex; align-items: center; list-style: none; gap: 4px;
}
.nav-link {
  padding: 6px 12px; border-radius: var(--radius-full);
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  transition: color var(--trans), background var(--trans);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg3);
}

.nav-auth {
  display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0;
}

.theme-toggle {
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans), color var(--trans);
  margin-right: 4px;
}
.theme-toggle:hover {
  background: var(--bg4);
  color: var(--text);
}
.theme-toggle .sun-icon { display: none; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* Mobile hamburger */
.nav-menu-btn {
  display: none; flex-direction: column; gap: 5px; padding: 6px;
  margin-left: auto;
}
.nav-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform var(--trans);
}

/* User dropdown */
.nav-user { position: relative; }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg4); border: 2px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  overflow: hidden; transition: border-color var(--trans);
}
.nav-avatar:hover  { border-color: var(--accent); }
.nav-avatar img    { width: 100%; height: 100%; object-fit: cover; }

.nav-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 200px; background: var(--bg3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity var(--trans), transform var(--trans);
}
.nav-dropdown.open { opacity: 1; pointer-events: auto; transform: none; }
.nav-dropdown-header { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.nav-dropdown-header strong { display: block; font-size: 0.875rem; }
.nav-dropdown-header small  { color: var(--text-muted); font-size: 0.75rem; }
.nav-dropdown a {
  display: block; padding: 10px 16px;
  font-size: 0.875rem; color: var(--text-muted);
  transition: background var(--trans), color var(--trans);
}
.nav-dropdown a:hover { background: var(--bg4); color: var(--text); }
.nav-dropdown a.danger:hover { color: #e84444; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-accent, .btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-full);
  font-size: 0.875rem; font-weight: 500;
  transition: background var(--trans), color var(--trans), box-shadow var(--trans);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #0d0d0d;
}
.btn-primary:hover { background: #f0b030; box-shadow: 0 0 16px var(--accent-glow); }

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-md);
}
.btn-ghost:hover { background: var(--bg4); color: var(--text); }

.btn-accent {
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(232,160,32,0.3);
}
.btn-accent:hover { background: var(--accent); color: #0d0d0d; }

.btn-danger { background: rgba(232,68,68,0.15); color: #e84444; }
.btn-danger:hover { background: rgba(232,68,68,0.3); }

.btn-play-all {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: var(--radius-full);
  background: var(--accent); color: #0d0d0d;
  font-size: 1rem; font-weight: 600;
  box-shadow: 0 0 24px var(--accent-glow);
  transition: transform var(--trans), box-shadow var(--trans);
}
.btn-play-all:hover { transform: scale(1.04); box-shadow: 0 0 36px var(--accent-glow); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.card:hover { border-color: var(--border-md); box-shadow: var(--shadow-sm); }

/* Episode card */
.episode-card {
  display: flex; gap: 14px; padding: 16px;
  align-items: flex-start;
  cursor: pointer;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--trans), border-color var(--trans);
}
.episode-card:hover { background: var(--bg3); border-color: var(--border-md); }

.episode-card .cover {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; background: var(--bg4);
  position: relative;
}
.episode-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.episode-card .cover-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
  opacity: 0; transition: opacity var(--trans);
}
.episode-card:hover .cover-play { opacity: 1; }
.cover-play svg { width: 24px; height: 24px; color: #fff; }

.episode-card .ep-info { flex: 1; min-width: 0; min-height: 88px; }
.episode-card .ep-show { font-size: 0.7rem; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.episode-card .ep-title { font-size: 0.925rem; font-weight: 500; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .ep-title    { -webkit-line-clamp: 2; }
.episode-card .ep-meta  { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }

.episode-card .ep-actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.ep-action-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--trans), color var(--trans);
}
.ep-action-btn:hover { background: var(--bg4); color: var(--text); }
.ep-action-btn svg   { width: 16px; height: 16px; transition: transform 0.2s, fill 0.2s; }

/* Inline card play/pause icon toggle */
.ep-play-btn .icon-play  { display: block; }
.ep-play-btn .icon-pause { display: none; }
.ep-play-btn.playing .icon-play  { display: none; }
.ep-play-btn.playing .icon-pause { display: block; }

/* Golden circle play button — prominent and glaring */
.ep-play-btn {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #0d0d0d;
  box-shadow: 0 0 14px var(--accent-glow);
  flex-shrink: 0;
  transition: background var(--trans), box-shadow var(--trans), transform var(--trans), color var(--trans);
}
.ep-play-btn:hover {
  background: #f0b030;
  color: #0d0d0d;
  box-shadow: 0 0 26px var(--accent-glow);
  transform: scale(1.1);
}
.ep-play-btn svg { width: 18px; height: 18px; }
.ep-play-btn.playing {
  color: #0d0d0d;
  box-shadow: 0 0 20px var(--accent-glow);
}

.ep-favorite-btn.active {
  color: #e84444;
}
.ep-favorite-btn.active svg {
  fill: currentColor;
  transform: scale(1.1);
}

/* Show card */
.show-card {
  display: flex; flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--trans), transform var(--trans);
}
.show-card:hover { border-color: var(--border-md); transform: translateY(-2px); }
.show-card .show-cover {
  aspect-ratio: 16/9; overflow: hidden; background: var(--bg4);
}
.show-card .show-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.show-card:hover .show-cover img { transform: scale(1.04); }
.show-card .show-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.show-card .show-cat  { font-size: 0.68rem; color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.show-card .show-title { font-size: 1rem; font-weight: 500; line-height: 1.3; }
.show-card .show-host  { font-size: 0.78rem; color: var(--text-muted); }

/* Playlist card */
.playlist-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.playlist-card:hover { border-color: var(--border-md); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.playlist-card .pl-cover {
  aspect-ratio: 16/9; background: var(--bg4); position: relative; overflow: hidden;
}
.playlist-card .pl-cover img  { width: 100%; height: 100%; object-fit: cover; }
.playlist-card .pl-cover-grid {
  display: grid; grid-template-columns: 1fr 1fr; height: 100%;
}
.playlist-card .pl-cover-grid .grid-cell {
  background: var(--bg3); overflow: hidden;
}
.playlist-card .pl-cover-grid .grid-cell img { width: 100%; height: 100%; object-fit: cover; }
.playlist-card .pl-editorial-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #0d0d0d;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 8px;
  border-radius: var(--radius-full);
}
.pl-hover-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0; transition: opacity var(--trans);
}
.playlist-card:hover .pl-hover-play { opacity: 1; }
.pl-hover-play-btn {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); color: #0d0d0d;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.pl-hover-play-btn svg { width: 24px; height: 24px; }

.playlist-card .pl-body  { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.playlist-card .pl-title { font-size: 1rem; font-weight: 500; line-height: 1.3; }
.playlist-card .pl-desc  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.playlist-card .pl-meta  { font-size: 0.75rem; color: var(--text-dim); display: flex; gap: 12px; margin-top: auto; padding-top: 8px; }

/* ── Episode sidebar (narrow related episodes panel) ─────────── */
.ep-sidebar .grid-episodes {
  grid-template-columns: 1fr;
}
.ep-sidebar .episode-card .ep-action-btn:not(.ep-play-btn) {
  display: none;
}

/* ── Section layout ─────────────────────────────────────────── */
.section {
  padding: 48px 0;
}
.section + .section { border-top: 1px solid var(--border); }

.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.section-header .section-title { font-family: var(--font-display); font-size: 1.6rem; }
.section-header a { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.section-header a:hover { color: var(--accent); }

/* Grid layouts */
.grid-episodes  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.grid-episodes > * { min-width: 0; }
.grid-shows     { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.grid-playlists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* Horizontal scroll container */
.scroll-row {
  display: flex; gap: 16px;
  overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .show-card     { min-width: 240px; flex-shrink: 0; }
.scroll-row .playlist-card { min-width: 240px; flex-shrink: 0; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 480px; position: relative;
  display: flex; align-items: center;
  padding: 80px 0 64px;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(60px); opacity: 0.15; transform: scale(1.15);
  pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, var(--hero-g1, rgba(26,16,6,0.92)) 0%, var(--hero-g2, rgba(13,13,13,0.85)) 60%);
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, var(--hero-g3, rgba(232,160,32,0.1)), transparent 60%);
}
.hero-content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: center;
}
.hero-body   { display: flex; flex-direction: column; gap: 14px; }
.hero-eyebrow { }
.hero-title   { color: var(--text); }
.hero-desc    { color: var(--text-muted); font-size: 1rem; line-height: 1.65; }
.hero-meta    { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-show-link {
  font-size: 0.78rem; color: var(--text-muted);
  border: 1px solid var(--border-md); border-radius: var(--radius-full);
  padding: 3px 12px;
  transition: color var(--trans), border-color var(--trans);
}
.hero-show-link:hover { color: var(--accent); border-color: rgba(232,160,32,0.45); }
.hero-duration { font-size: 0.75rem; color: var(--text-dim); }
.hero-artwork {
  width: 260px; height: 260px; flex-shrink: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(0,0,0,0.5);
}
.hero-artwork img { width: 100%; height: 100%; object-fit: cover; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.form-group label .optional { font-weight: 400; opacity: 0.7; }

.form-input {
  background: var(--bg4); border: 1px solid var(--border-md);
  color: var(--text); border-radius: var(--radius);
  padding: 10px 14px; font-size: 0.9rem;
  transition: border-color var(--trans), box-shadow var(--trans);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder { color: var(--text-dim); }

/* Auth page form */
.auth-page   { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card   { width: 100%; max-width: 420px; background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius-lg); padding: 40px 36px; }
.auth-logo   { text-align: center; margin-bottom: 32px; }
.auth-title  { font-family: var(--font-display); font-size: 1.6rem; text-align: center; margin-bottom: 6px; }
.auth-sub    { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 28px; }
.auth-form   { display: flex; flex-direction: column; gap: 16px; }
.auth-submit { width: 100%; justify-content: center; padding: 12px; font-size: 0.95rem; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.8rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); }
.auth-error   { background: rgba(232,68,68,0.12); border: 1px solid rgba(232,68,68,0.3); border-radius: var(--radius); padding: 12px 14px; color: #f87171; font-size: 0.85rem; line-height: 1.5; }
.auth-success { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); border-radius: var(--radius); padding: 12px 14px; color: #34d399; font-size: 0.85rem; line-height: 1.5; }

/* ── Progress bar (listening) ───────────────────────────────── */
.progress-bar {
  height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 8px;
}
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ── Playlist page ──────────────────────────────────────────── */
.playlist-page { padding: 40px 0; }
.playlist-hero {
  display: flex; gap: 32px; align-items: flex-start;
  padding-bottom: 36px; border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.playlist-hero-cover {
  width: 200px; height: 200px; flex-shrink: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg4); box-shadow: var(--shadow-lg);
}
.playlist-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.playlist-hero-meta { display: flex; flex-direction: column; gap: 10px; }
.playlist-hero-meta .eyebrow { margin-bottom: 4px; }
.playlist-hero-meta h1 { margin-bottom: 4px; }
.playlist-hero-desc { color: var(--text-muted); font-size: 0.9rem; max-width: 480px; }
.playlist-stats { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-dim); }
.playlist-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }

/* ── My Playlists page ──────────────────────────────────────── */
.my-playlists-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 36px 0 28px;
}
.my-playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.my-playlist-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.my-playlist-card .mpl-cover {
  aspect-ratio: 1; background: var(--bg4); position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--text-dim);
  overflow: hidden;
}
.my-playlist-card .mpl-cover img { width: 100%; height: 100%; object-fit: cover; }
.my-playlist-card .mpl-body  { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.my-playlist-card .mpl-title { font-size: 0.95rem; font-weight: 500; }
.my-playlist-card .mpl-meta  { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.my-playlist-card .mpl-actions {
  display: flex; gap: 8px; margin-top: 14px;
}

/* ── Player Bar ─────────────────────────────────────────────── */
.player-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  height: var(--player-h);
  background: var(--player-bg, rgba(18,18,18,0.97));
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-md);
  display: flex; align-items: center;
  padding: 0 16px; gap: 16px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.6);
}

.player-info {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; flex: 1; max-width: 280px;
}
.player-cover {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
  background: var(--bg4); position: relative;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 1rem;
  background: var(--bg4);
}
.player-meta { min-width: 0; flex: 1; }
.player-title { display: block; font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-show  { display: block; font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-save-btn {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color var(--trans), background var(--trans);
}
.player-save-btn svg { width: 16px; height: 16px; }
.player-save-btn:hover { color: var(--accent); background: var(--accent-dim); }

.player-controls {
  display: flex; align-items: center; gap: 8px;
  flex: 2; min-width: 0;
}
.player-btn {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color var(--trans), background var(--trans);
}
.player-btn svg { width: 18px; height: 18px; }
.player-btn:hover { color: var(--text); background: var(--bg4); }

.player-btn-main {
  width: 42px; height: 42px;
  background: var(--accent); color: #0d0d0d;
}
.player-btn-main:hover { background: #f0b030; color: #0d0d0d; }
.player-btn-main .icon-pause { display: none; }
.player-btn-main.playing .icon-play  { display: none; }
.player-btn-main.playing .icon-pause { display: block; }

.player-btn-sm  { width: 28px; height: 28px; font-size: 0.7rem; }

.player-seek-btn { position: relative; }
.player-seek-btn svg { width: 16px; height: 16px; }
.player-seek-label {
  position: absolute; bottom: 3px;
  font-size: 0.42rem; font-weight: 700; line-height: 1;
  color: inherit; pointer-events: none; letter-spacing: -.01em;
}

.player-progress-wrap {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
}
.player-time { font-size: 0.68rem; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.player-progress-bar {
  flex: 1; height: 4px; background: var(--bg4);
  border-radius: 2px; position: relative; cursor: pointer;
  transition: height var(--trans);
}
.player-progress-bar:hover { height: 6px; }
.player-progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; pointer-events: none; width: 0%;
}
.player-progress-thumb {
  position: absolute; top: 50%; right: 0; transform: translate(50%, -50%);
  width: 12px; height: 12px; background: var(--accent);
  border-radius: 50%; pointer-events: none;
  opacity: 0; transition: opacity var(--trans);
}
.player-progress-bar:hover .player-progress-thumb { opacity: 1; }

.player-volume { display: flex; align-items: center; gap: 4px; }
.player-volume-slider {
  width: 70px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  height: 3px; background: var(--bg4);
  border-radius: 2px;
}
.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: var(--text);
}

.player-speed-btn {
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  padding: 0 6px; width: auto; min-width: 28px;
}

/* ── Spinner keyframe ─────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Player loading state ─────────────────────────────────────── */
.player-bar.player-loading .player-btn-main {
  cursor: wait;
  background: var(--bg4);
}
/* Overlay a spinner on the main play button while loading */
.player-bar.player-loading .player-btn-main::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.player-bar.player-loading .player-btn-main svg { opacity: 0; }
.player-btn-main { position: relative; overflow: visible; }

/* ── Episode card play button loading state ───────────────────── */
.ep-play-btn { position: relative; overflow: hidden; }
.ep-play-btn.loading svg { opacity: 0; }
.ep-play-btn.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Queue Panel ─────────────────────────────────────────────── */
.queue-panel {
  position: fixed; right: 0; bottom: var(--player-h); z-index: 290;
  width: 320px; max-height: 420px;
  background: var(--bg3); border: 1px solid var(--border-md);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--trans-md);
}
.queue-panel.open  { transform: none; }
.queue-header {
  padding: 14px 16px; display: flex; justify-content: space-between;
  align-items: center; font-size: 0.85rem; font-weight: 600;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.queue-close { color: var(--text-muted); font-size: 0.9rem; }
.queue-list  { flex: 1; overflow-y: auto; padding: 8px 0; scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; }
.queue-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; cursor: pointer;
  transition: background var(--trans);
}
.queue-item:hover { background: var(--bg4); }
.queue-item.active { background: var(--accent-dim); }
.queue-item .qi-num { width: 20px; text-align: center; font-size: 0.7rem; color: var(--text-dim); flex-shrink: 0; }
.queue-item .qi-cover { width: 36px; height: 36px; border-radius: 4px; background: var(--bg4); overflow: hidden; flex-shrink: 0; }
.queue-item .qi-cover img { width: 100%; height: 100%; object-fit: cover; }
.queue-item .qi-info { flex: 1; min-width: 0; }
.queue-item .qi-title { font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .qi-show  { font-size: 0.7rem; color: var(--text-muted); }
.queue-item .qi-dur   { font-size: 0.65rem; color: var(--text-dim); margin-top: 1px; }
.queue-item .qi-remove {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  opacity: 0; transition: opacity var(--trans), color var(--trans), background var(--trans);
}
.queue-item:hover .qi-remove { opacity: 1; }
.queue-item .qi-remove:hover { color: var(--text); background: var(--bg4); }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay[hidden] { display: none; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity var(--trans);
}
.modal-overlay.visible { opacity: 1; }
.modal-card {
  background: var(--bg3); border: 1px solid var(--border-md);
  border-radius: var(--radius-lg); width: 100%; max-width: 440px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96); transition: transform var(--trans);
}
.modal-overlay.visible .modal-card { transform: scale(1); }
.modal-card-sm { max-width: 360px; }
.modal-header {
  padding: 20px 24px; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-header h2 { font-size: 1.1rem; }
.modal-close     { color: var(--text-muted); font-size: 1rem; }
.modal-close:hover { color: var(--text); }
.modal-body    { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer  { padding: 16px 24px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* Playlist select list in modal */
.pl-select-list { display: flex; flex-direction: column; gap: 4px; }
.pl-select-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius); cursor: pointer;
  transition: background var(--trans);
  border: 1px solid transparent;
}
.pl-select-item:hover { background: var(--bg4); }
.pl-select-item.selected { background: var(--accent-dim); border-color: rgba(232,160,32,0.3); }
.pl-select-item .psi-cover {
  width: 40px; height: 40px; border-radius: 6px; background: var(--bg); overflow: hidden; flex-shrink: 0;
}
.pl-select-item .psi-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-select-item .psi-name { font-size: 0.85rem; font-weight: 500; }
.pl-select-item .psi-count{ font-size: 0.72rem; color: var(--text-muted); }
.pl-select-item .psi-check { margin-left: auto; color: var(--accent); display: none; }
.pl-select-item.selected .psi-check { display: block; }

/* ── Admin layout ───────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 230px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  position: fixed; top: var(--nav-h); bottom: 0; left: 0; overflow-y: auto;
  padding: 24px 0;
}
.admin-sidebar .sidebar-section { margin-bottom: 24px; }
.admin-sidebar .sidebar-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
  padding: 0 20px; margin-bottom: 6px;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; font-size: 0.875rem; color: var(--text-muted);
  transition: background var(--trans), color var(--trans);
  border-right: 2px solid transparent;
}
.admin-sidebar a:hover { background: var(--bg3); color: var(--text); }
.admin-sidebar a.active {
  background: var(--accent-dim); color: var(--accent);
  border-right-color: var(--accent);
}
.admin-sidebar svg { width: 16px; height: 16px; flex-shrink: 0; }

.admin-content { margin-left: 230px; flex: 1; padding: 36px; }
.admin-page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
}
.admin-page-header h1 { font-family: var(--font-display); font-size: 1.8rem; }

/* Admin table */
.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.admin-table th {
  text-align: left; padding: 12px 16px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 16px; font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg3); }

/* Admin form */
.admin-form { max-width: 680px; display: flex; flex-direction: column; gap: 24px; }
.admin-form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
}
.admin-form-card h3 { font-family: var(--font-display); font-size: 1.1rem; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600;
}
.badge-green   { background: rgba(52,211,153,0.15); color: #34d399; }
.badge-yellow  { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.badge-red     { background: rgba(248,113,113,0.15); color: #f87171; }
.badge-blue    { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.badge-accent  { background: var(--accent-dim);      color: var(--accent); }

/* ── Alerts / Flash ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 0.875rem; margin-bottom: 16px;
}
.alert-success { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.25); color: #34d399; }
.alert-error   { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.25); color: #f87171; }

/* ── Misc ───────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-accent{ color: var(--accent); }
.loading-text { color: var(--text-dim); text-align: center; padding: 20px; font-size: 0.875rem; }
.empty-state  { text-align: center; padding: 64px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--nav-bg-mobile, rgba(13,13,13,0.98)); backdrop-filter: blur(12px);
    padding: 16px 20px; gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 199;
  }
  .nav-menu-btn { display: flex; }
  .nav-auth { gap: 6px; }
  .nav-auth .btn-ghost { display: none; }

  .player-volume { display: none; }
  .player-speed-btn { display: none; }
  .player-info { max-width: 200px; }
  .player-progress-wrap { min-width: 80px; }

  .hero { min-height: auto; padding: 56px 0 48px; }
  .hero-content { grid-template-columns: 1fr; gap: 28px; }
  .hero-artwork { width: 120px; height: 120px; order: -1; }

  .grid-playlists  { grid-template-columns: 1fr 1fr; }
  .grid-shows      { grid-template-columns: repeat(3, 1fr); }
  .grid-episodes   { grid-template-columns: 1fr; }
  .grid-news-cats  { grid-template-columns: repeat(2, 1fr); }

  .playlist-hero { flex-direction: column; gap: 20px; }
  .playlist-hero-cover { width: 140px; height: 140px; }

  .admin-sidebar  { display: none; }
  .admin-content  { margin-left: 0; padding: 20px; }
  .form-row       { grid-template-columns: 1fr; }

  .queue-panel { width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

@media (max-width: 480px) {
  .grid-playlists { grid-template-columns: 1fr; }
  .grid-shows     { grid-template-columns: 1fr 1fr; }
  .player-controls { gap: 4px; }
  .player-info    { max-width: 140px; }
}

/* ── Ad Zones ──────────────────────────────────────────────────── */
.ad-zone {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg3);
  border: 1px solid var(--border-md);
  line-height: 0;
}
.ad-zone a { display: block; line-height: 0; }
.ad-zone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}
.ad-label {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
  background: rgba(0,0,0,0.5);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Leaderboard — full-width under hero */
.ad-zone--home_top,
.ad-zone--home_mid {
  width: 100%;
  min-height: 90px;
  margin-bottom: 32px;
}
.ad-zone--home_mid {
  margin-top: 0;
}

/* Hero side box — sits beside artwork */
.hero-side-ads {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
  flex-shrink: 0;
}
.ad-zone--home_hero_side {
  width: 300px;
  min-height: 250px;
}
.ad-zone--home_hero_side img {
  min-height: 250px;
  object-fit: cover;
}

/* Shows page sidebar */
.shows-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.shows-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.ad-zone--shows_sidebar {
  width: 100%;
  min-height: 250px;
}

/* Episode page zones */
.ad-zone--episode_top {
  width: 100%;
  min-height: 90px;
  margin-bottom: 24px;
}
.ad-zone--episode_sidebar {
  width: 100%;
  min-height: 250px;
  margin-top: 20px;
}

/* Sticky bottom bar — sits above the player bar */
.ad-zone--sticky_bottom {
  position: fixed;
  bottom: var(--player-h);
  left: 0;
  right: 0;
  z-index: 89;
  height: 56px;
  border-radius: 0;
  background: var(--bg2);
  border: none;
  border-top: 1px solid var(--border);
  justify-content: center;
}
.ad-zone--sticky_bottom:empty { display: none; }
.ad-zone--sticky_bottom img {
  height: 56px;
  width: auto;
  object-fit: contain;
  border-radius: 0;
}

/* Player audio-ad overlay */
.player-ad-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 20;
  font-size: .8rem;
  color: var(--text-muted);
  border-radius: inherit;
}
.player-ad-overlay[hidden] { display: none; }
.player-ad-skip {
  background: var(--bg4);
  border: 1px solid var(--border-md);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: .75rem;
  cursor: pointer;
  transition: opacity var(--trans);
}
.player-ad-skip:disabled { opacity: 0.35; cursor: not-allowed; }
.player-ad-skip:not(:disabled):hover { background: var(--bg3); }

/* Responsive: collapse shows sidebar on narrow screens */
@media (max-width: 900px) {
  .shows-page-layout {
    grid-template-columns: 1fr;
  }
  .shows-sidebar { position: static; }
  .ad-zone--shows_sidebar { max-height: 250px; }
  .hero-side-ads { align-items: center; }
  .ad-zone--home_hero_side { width: 100%; max-width: 300px; }
}
@media (max-width: 600px) {
  .ad-zone--sticky_bottom { height: 50px; bottom: var(--player-h); }
  .ad-zone--sticky_bottom img { height: 50px; }
}

/* ============================================================
   SHARING & VIRAL LOOPS
   ============================================================ */

/* ── Share button on episode cards ─────────────────────────── */
.ep-share-btn {
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans), background var(--trans);
  flex-shrink: 0;
}
.ep-share-btn:hover { color: var(--accent); background: var(--accent-dim); }
.ep-share-btn svg   { width: 16px; height: 16px; }

/* ── Share modal ─────────────────────────────────────────────── */
#shareModal .modal-card { max-width: 440px; }

.share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans), transform var(--trans);
  text-decoration: none;
}
.share-option-btn:hover  { background: var(--bg4); border-color: var(--border-md); transform: translateY(-2px); }
.share-option-btn svg    { width: 28px; height: 28px; }
.share-option-btn.whatsapp svg { color: #25d366; }
.share-option-btn.twitter  svg { color: #1d9bf0; }
.share-option-btn.instagram svg { color: #e1306c; }
.share-option-btn.copy-link svg { color: var(--accent); }

.share-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.share-copy-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: .8rem;
  font-family: var(--font-body);
  min-width: 0;
  cursor: text;
}
.share-copy-row input:focus { outline: none; border-color: var(--accent); }
.share-copy-row .btn-copy   { flex-shrink: 0; }

.share-copy-feedback {
  font-size: .78rem;
  color: #34d399;
  min-height: 18px;
  margin-top: 6px;
  text-align: center;
}

/* ── End-of-play share prompt ────────────────────────────────── */
#shareEndPrompt {
  position: fixed;
  bottom: calc(var(--player-h) + 12px);
  right: 16px;
  z-index: 310;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  max-width: 320px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideUpIn 0.25s ease;
}
#shareEndPrompt[hidden] { display: none; }
.sep-label   { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.sep-title   { font-size: .88rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.sep-actions { display: flex; gap: 8px; }
.sep-share-btn {
  flex: 1;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--trans);
}
.sep-share-btn:hover { opacity: 0.85; }
.sep-dismiss {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 8px 12px;
  font-size: .8rem;
  cursor: pointer;
}
.sep-dismiss:hover { color: var(--text); }

@keyframes slideUpIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Episode page share row ──────────────────────────────────── */
.ep-share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.ep-share-label {
  font-size: .75rem;
  color: var(--text-muted);
  align-self: center;
  margin-right: 4px;
}
.ep-share-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-md);
  background: var(--bg3);
  color: var(--text);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--trans), border-color var(--trans);
}
.ep-share-pill:hover          { background: var(--bg4); border-color: var(--accent); }
.ep-share-pill svg            { width: 15px; height: 15px; }
.ep-share-pill.wa-pill svg    { color: #25d366; }
.ep-share-pill.tw-pill svg    { color: #1d9bf0; }
.ep-share-pill.copy-pill svg  { color: var(--accent); }

/* ── Show social follow links ────────────────────────────────── */
.show-social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.show-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: .78rem;
  text-decoration: none;
  transition: color var(--trans), border-color var(--trans);
}
.show-social-link:hover { color: var(--text); border-color: var(--border-md); }
.show-social-link svg   { width: 14px; height: 14px; }

/* ── Listener count / trending badge ────────────────────────── */
.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.listener-count {
  font-size: .72rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.listener-count svg { width: 12px; height: 12px; }

/* ── Referral dashboard card ─────────────────────────────────── */
.referral-card {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 36px;
}
.referral-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.referral-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.referral-stat {
  font-size: 2rem;
  font-family: var(--font-display);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.referral-link-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.referral-link-row input {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border-md);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .82rem;
  font-family: var(--font-body);
}
.referral-link-row input:focus { outline: none; border-color: var(--accent); }

/* ── Embed widget snippet ────────────────────────────────────── */
.embed-snippet {
  background: var(--bg);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: monospace;
  font-size: .75rem;
  color: var(--text-muted);
  word-break: break-all;
  cursor: text;
  margin-top: 8px;
  line-height: 1.6;
}

/* ── Embed player page (no nav) ──────────────────────────────── */
.embed-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.embed-player-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.embed-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.embed-branding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.embed-branding a {
  color: var(--accent);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.embed-branding a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .share-options { grid-template-columns: repeat(2, 1fr); }
  .ep-share-row  { gap: 6px; }
  #shareEndPrompt { left: 16px; max-width: none; right: 16px; }
}

/* ============================================================
   USER PROFILE PAGE
   ============================================================ */

/* ── Hero block ──────────────────────────────────────────────── */
.profile-hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-avatar-img,
.profile-avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  background: var(--accent-dim);
  border: 2px solid var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
}

.profile-hero-name  { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 2px; }
.profile-hero-email { font-size: .85rem; color: var(--text-muted); margin-bottom: 4px; }
.profile-hero-since { font-size: .75rem; color: var(--text-dim); margin-bottom: 16px; }

.profile-stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.profile-stat { display: flex; flex-direction: column; gap: 2px; }
.profile-stat-num   { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); line-height: 1; }
.profile-stat-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Sections ─────────────────────────────────────────────────── */
.profile-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.profile-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── Edit form layout ─────────────────────────────────────────── */
.profile-form { display: flex; flex-direction: column; gap: 16px; }

.profile-form-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.profile-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.profile-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg4);
  border: 2px solid var(--border-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Danger zone ──────────────────────────────────────────────── */
.profile-danger-zone {
  border-color: rgba(229, 62, 62, 0.25);
}

.btn-danger-outline {
  background: none;
  border: 1px solid var(--error, #e53e3e);
  color: var(--error, #e53e3e);
  border-radius: var(--radius-full);
  padding: 9px 20px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans), color var(--trans);
}
.btn-danger-outline:hover {
  background: rgba(229,62,62,0.1);
}

.deletion-pending-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
  flex-wrap: wrap;
}

/* ── Admin deletion requests badge ─────────────────────────────── */
.deletion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--error, #e53e3e);
  color: #fff;
  border-radius: 9999px;
  font-size: .68rem;
  font-weight: 700;
  margin-left: 6px;
}

.deletion-request-row {
  background: rgba(229,62,62,0.05);
  border: 1px solid rgba(229,62,62,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.deletion-request-row + .deletion-request-row {
  margin-top: 0;
}

@media (max-width: 640px) {
  .profile-hero      { padding: 20px; gap: 20px; }
  .profile-form-row  { flex-direction: column; }
  .profile-avatar-upload { flex-direction: row; width: 100%; justify-content: flex-start; }
  .profile-stat-row  { gap: 16px; }
}

/* ── Discover page ──────────────────────────────────────────── */
.discover-hero {
  padding: 52px 0 36px;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.discover-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 6px 0 12px;
  line-height: 1.15;
}
.discover-title em {
  font-style: italic;
  color: var(--accent);
}
.discover-sub {
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
}
.discover-signin-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.discover-signin-link:hover { text-decoration: underline; }

.section-title em {
  font-style: italic;
  color: var(--accent);
}

/* ── NEWS NAV DROPDOWN ─────────────────────────────────────── */
.nav-item-dropdown { position: relative; display: flex; align-items: center; }
.nav-item-dropdown > .nav-link { display: flex; align-items: center; gap: 4px; }
.nav-arrow { transition: transform .15s; flex-shrink: 0; }
.nav-item-dropdown:hover .nav-arrow { transform: rotate(180deg); }
.nav-sub-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 180px; background: var(--bg3);
  border: 1px solid var(--border-md); border-radius: 8px;
  padding: 6px 0; list-style: none; margin: 0;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 200;
}
.nav-item-dropdown:hover .nav-sub-dropdown,
.nav-item-dropdown.open   .nav-sub-dropdown {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-sub-dropdown li { display: block; }
.nav-sub-dropdown li a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; font-size: 0.85rem;
  color: var(--text-muted); text-decoration: none;
  transition: background .1s, color .1s;
}
.nav-sub-dropdown li a:hover { background: var(--bg4); color: var(--text); }
.nav-sub-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.nav-sub-dot--breaking { background: #f87171; }
.nav-sub-dot--business { background: var(--accent); }
.nav-sub-dot--politics { background: #93c5fd; }

/* ── NEWS BADGES ───────────────────────────────────────────── */
.news-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .6rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 3px;
  line-height: 1.4;
}
.news-badge--breaking { background: rgba(220,38,38,.18); color: #f87171; }
.news-badge--business { background: var(--accent-dim); color: var(--accent); }
.news-badge--politics { background: rgba(59,130,246,.15); color: #93c5fd; }
.news-badge--world    { background: rgba(220,38,38,.18); color: #f87171; }

/* ── NEWS CARD WRAPPER (badge overlay) ─────────────────────── */
.news-card-wrap { position: relative; }
.news-badge-overlay {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  pointer-events: none;
}
/* hide cards filtered out via JS */
.news-card-wrap.news-hidden { display: none; }

/* ── NEWS CATEGORY PILLS ───────────────────────────────────── */
.news-pills {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px; margin-top: -4px;
}
.news-pill {
  padding: 5px 14px; border-radius: 20px; font-size: .8rem;
  font-weight: 500; cursor: pointer; border: 1px solid var(--border-md);
  background: transparent; color: var(--text-muted);
  transition: background .15s, color .15s, border-color .15s;
}
.news-pill:hover { background: var(--bg4); color: var(--text); }
.news-pill.active { background: var(--accent); color: #0d0d0d; border-color: var(--accent); }
.news-pill--breaking.active { background: #f87171; border-color: #f87171; color: #0d0d0d; }
.news-pill--politics.active { background: #93c5fd; border-color: #93c5fd; color: #0d0d0d; }

/* ── NEWS PAGE HERO ────────────────────────────────────────── */
.news-hero {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 36px;
}
.news-hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.news-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 0 3px rgba(248,113,113,.25);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 3px rgba(248,113,113,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(248,113,113,.08); }
}
.news-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.15; margin: 0 0 10px;
}
.news-hero-show { color: var(--text-muted); font-size: .875rem; margin-bottom: 16px; }
.news-hero-show a { color: var(--accent); text-decoration: none; }
.news-hero-show a:hover { text-decoration: underline; }
.news-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── NEWS PAGE TABS ────────────────────────────────────────── */
.news-tabs-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 28px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.news-tabs-bar::-webkit-scrollbar { display: none; }
.news-tab {
  padding: 10px 20px; font-size: .875rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  border: none; background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.news-tab:hover { color: var(--text); }
.news-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.news-tab--breaking.active { border-bottom-color: #f87171; color: #f87171; }
.news-tab--politics.active { border-bottom-color: #93c5fd; color: #93c5fd; }

/* ── NEWS ITEM DETAIL PAGE ─────────────────────────────────── */
.news-item-layout { display: flex; flex-direction: column; gap: 32px; max-width: 780px; }
.news-item-body {
  font-size: 1.05rem; line-height: 1.8; color: var(--text);
  max-width: 680px;
}
.news-item-body p { margin-bottom: 1.2em; }

/* ── NEWS EMPTY STATE ──────────────────────────────────────── */
.news-empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.news-empty p { margin-top: 8px; font-size: .875rem; }

/* ── NEWS CATEGORY CARDS ───────────────────────────────────── */
.grid-news-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.grid-news-cats > * { min-width: 0; }

.news-cat-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 160px; border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none;
  background: var(--bg2);
  border: 1px solid var(--border);
  transition: border-color var(--trans), transform var(--trans);
}
.news-cat-card:hover { border-color: var(--border-md); transform: translateY(-2px); }

.news-cat-bg {
  position: absolute; inset: 0;
}
.news-cat-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.8; transition: opacity var(--trans);
}
.news-cat-card:hover .news-cat-bg img { opacity: 0.9; }

/* dark gradient overlay so text is always readable */
.news-cat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
}

.news-cat-body {
  position: relative; z-index: 1;
  padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}

/* Always white text — card always has a dark gradient overlay */
.news-cat-name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 400;
  color: #fff; line-height: 1.2; margin: 0;
}

.news-cat-count {
  font-size: 0.75rem; color: rgba(255,255,255,0.75); margin: 0;
}

/* ── Search UI Styles ────────────────────────────────────────── */
.nav-search {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 12px;
}

.search-form {
  width: 100%;
  max-width: 380px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color var(--trans), box-shadow var(--trans), background var(--trans);
}

.nav-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg3);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans), background var(--trans);
}

.search-clear-btn:hover {
  background: var(--bg4);
  color: var(--text);
}

.search-clear-btn svg { width: 14px; height: 14px; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 500;
  max-height: 480px;
  overflow-y: auto;
}

.search-res-group {
  padding: 8px 0;
}

.search-res-group + .search-res-group {
  border-top: 1px solid var(--border);
}

.search-res-header {
  padding: 8px 16px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.search-res-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  transition: background var(--trans);
}

.search-res-item:hover {
  background: var(--bg3);
}

.search-res-img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg4);
  overflow: hidden;
}

.search-res-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-res-info {
  flex: 1;
  min-width: 0;
}

.search-res-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-res-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.search-res-footer {
  padding: 10px 16px;
  background: var(--bg3);
  text-align: center;
  border-top: 1px solid var(--border);
}

.search-res-footer a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
}

.search-no-res {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .nav-search {
    display: none; /* Hide on mobile by default, we'll handle with JS if needed */
  }
}
