/* ============================================================================
   hero.css — SINGLE SOURCE OF TRUTH for the hero player + bottom mini-player.
   Loaded LAST on every page (index, /ep, /pod) so it governs the look
   everywhere. Edit the hero/bottom-player appearance HERE and nowhere else.
   (Positioning of #player is left to each page: the front page uses a flex
   app-shell, the ep/pod pages use a fixed bar — but all VISUALS live here.)
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --primary: #1E2A38;
  --secondary: #4A627A;
  --tertiary: #D64545;
  --neutral: #717882;
  --font-head: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  --bg: #0f0f0f; --bg2: #181818; --bg3: #272727; --border: #303030;
  --text: #f1f1f1; --text2: #aaa; --accent: #D64545; --brand: #e7ecf2;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
}
html[data-theme="light"] {
  --bg: #E9EDF3; --bg2: #ffffff; --bg3: #EDF1F6; --border: #E1E6EC;
  --text: #1E2A38; --text2: #6C7784; --accent: #D64545; --brand: #1E2A38;
  --shadow: 0 1px 3px rgba(30,42,56,0.08), 0 1px 2px rgba(30,42,56,0.04);
}

/* ── HERO ──────────────────────────────────────────────────────────────── */
#hero { background: var(--bg2); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
#hero-inner { position: relative; }
/* Muted <video> that mirrors the audio to show the picture when decodable. */
#hero-video { display: none; }
html.has-video #hero-video {
  display: block; position: absolute; top: 0; left: 0; width: 300px; height: 300px;
  object-fit: contain; background: #000; z-index: 2;
}
html.has-video #hero-art, html.has-video #hero-art-fallback { visibility: hidden; }
#hero-fs-btn { display: none; position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 34px; height: 34px; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; }
#hero-fs-btn:hover { background: rgba(0,0,0,0.75); }
html.has-video #hero-fs-btn { display: flex; }
#hero-bird-mark { position: absolute; right: -10px; bottom: -24px; height: 310px; width: auto; opacity: 0.07; pointer-events: none; transform: scaleX(-1); }
#hero-inner { display: flex; min-height: 260px; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
#hero-art { width: 260px; min-width: 260px; height: auto; min-height: 260px; align-self: stretch; object-fit: cover; display: block; background: var(--bg3); flex-shrink: 0; }
#hero-art-fallback { width: 260px; min-width: 260px; min-height: 260px; align-self: stretch; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 5rem; flex-shrink: 0; }
#hero-body { flex: 1; padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#hero-show { font-size: 0.8rem; color: var(--text2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-head); }
#hero-title { font-size: 1.3rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-head); color: var(--text); }
#hero-meta  { font-size: 0.8rem; color: var(--text2); display: flex; align-items: center; flex-wrap: wrap; }
#hero-desc  { font-size: 0.82rem; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
#hero-controls { display: flex; flex-direction: column; gap: 12px; }

.hbtn, .cbtn, #hero-pp, #mobile-pp, .hbtn-skip, .speed-btn, .hero-more-btn, .mode-opt, #hero-seinna-btn, #hero-overlay-star {
  -webkit-tap-highlight-color: transparent; outline: none; -webkit-touch-callout: none; user-select: none;
}
/* Refined press/focus feedback (replaces the default blue tap rectangle) */
.hbtn-skip:active, .hbtn-skip:focus-visible { background: var(--border); }
.speed-btn:active, .speed-btn:focus-visible,
.hero-more-btn:active, .hero-more-btn:focus-visible,
.mode-opt:focus-visible, #hero-seinna-btn:active, #hero-seinna-btn:focus-visible {
  background: color-mix(in srgb, var(--secondary) 12%, var(--bg3)); border-color: var(--secondary);
}
#hero-pp:active, #mobile-pp:active { filter: brightness(0.9); transform: scale(0.96); }
#hero-pp:focus-visible, #mobile-pp:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.hbtn { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1rem; padding: 4px 6px; display: flex; align-items: center; justify-content: center; }
.hbtn:hover { color: var(--accent); }
.hbtn:disabled, .cbtn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
#hero-btns { display: flex; gap: 18px; align-items: center; justify-content: center; }
#hero-pp { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; padding: 0; line-height: 1; box-shadow: 0 6px 18px rgba(30,42,56,0.28); transition: transform 0.12s, filter 0.12s; }
#hero-pp:hover { color: #fff; transform: scale(1.05); filter: brightness(1.08); }
.hbtn-skip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 50px; height: 50px; border-radius: 50%; background: var(--bg3); color: var(--text); }
.hbtn-skip:hover { color: var(--text); background: var(--border); }
.hbtn-skip .skip-ic { font-size: 1.15rem; line-height: 1; }
.hbtn-skip .skip-lbl { font-size: 0.58rem; font-weight: 700; color: var(--text2); }

#hero-prog-row { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text2); }
#hero-prog { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: var(--bg3); cursor: pointer; outline: none; }
#hero-prog::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); }

#hero-prog-row .speed-btn { flex-shrink: 0; margin-left: 4px; }
.speed-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--secondary); font-size: 0.72rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; cursor: pointer; transition: all 0.15s; }
.speed-btn:hover { color: var(--text); border-color: var(--secondary); }

#hero-actions { display: flex; flex-direction: column; gap: 12px; }
#hero-more-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-more-btn { border: 1px solid var(--border); color: var(--text); background: var(--bg2); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 0.8rem; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.2; }
.hero-more-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
#hero-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#hero-mode-wrap { display: flex; background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 2px; width: fit-content; }
.mode-opt { background: none; border: none; color: var(--text2); font-size: 0.78rem; padding: 5px 13px; border-radius: 18px; cursor: pointer; transition: background 0.15s, color 0.15s; line-height: 1.2; }
.mode-opt.active { background: var(--bg2); color: var(--text); box-shadow: var(--shadow); font-weight: 700; }
#hero-seinna-btn { background: none; border: 1px solid var(--border); border-radius: 999px; color: var(--text2); cursor: pointer; font-size: 0.75rem; padding: 7px 14px; font-weight: 600; white-space: nowrap; transition: all 0.15s; }
#hero-seinna-btn.active { color: var(--accent); border-color: var(--accent); }

.ep-pill { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--secondary) 14%, transparent); color: var(--secondary); font-size: 0.7rem; font-weight: 700; vertical-align: middle; }

/* Hero image overlay (shown on mobile/tablet) */
#hero-overlay { display: none; }
#hero-nowplaying .np-dot, .live-dot { display: inline-block; }

/* ── BOTTOM MINI-PLAYER (visuals only; positioning stays page-specific) ──── */
#player { background: var(--bg2); border-top: 1px solid var(--border); }
#player-thumb { width: 58px; height: 58px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg3); }
#player-title { font-size: 0.83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-head); color: var(--text); }
#player-show  { font-size: 0.73rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbtn { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1rem; padding: 4px 6px; display: flex; align-items: center; justify-content: center; }
.cbtn:hover { color: var(--accent); }
#pp-btn { font-size: 1.5rem; }
#prog { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: var(--bg3); cursor: pointer; outline: none; }
#prog::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }

/* ── MOBILE / TABLET (≤1024): stacked hero, image overlay, circular play ── */
@media (max-width: 1024px) {
  #hero-inner { flex-direction: column; padding: 0; min-height: unset; }
  #hero { border-radius: 0 0 22px 22px; }
  #hero-art, #hero-art-fallback { width: 100%; min-width: unset; height: 168px; }
  /* Video fills the screen width and keeps its own aspect ratio */
  html.has-video #hero-art, html.has-video #hero-art-fallback { display: none; }
  html.has-video #hero-video { position: static; width: 100%; height: auto; max-height: 62vh; }
  #hero-fs-btn { top: 12px; right: 12px; left: auto; }
  #hero-body { padding: 12px 16px 14px; gap: 7px; background: var(--bg2); position: relative; z-index: 2; }
  #hero-controls { gap: 9px; }
  #hero-title { font-size: 1.12rem; -webkit-line-clamp: 2; }
  #hero-desc { display: none; }
  #hero-body, #hero-controls, #hero-more-row, #hero-bottom-row { max-width: 100%; min-width: 0; }
  #hero-more-row { overflow: hidden; }
  #hero-more-row .hero-more-btn { flex: 1 1 0; min-width: 0; text-align: center; padding: 11px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #hero-overlay { display: flex; align-items: center; justify-content: space-between; position: absolute; top: 0; left: 0; right: 0; padding: 14px; z-index: 3; pointer-events: none; }
  #hero-overlay > * { pointer-events: auto; }
  #hero-nowplaying { display: inline-flex; align-items: center; gap: 7px; background: rgba(15,20,28,0.72); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
  #hero-nowplaying .np-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tertiary); animation: live-blink 1.4s ease-in-out infinite; }
  #hero-overlay-star { width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(15,20,28,0.72); color: #fff; font-size: 1rem; cursor: pointer; backdrop-filter: blur(6px); }
  #hero-overlay-star.starred { color: #f5c518; }
  #hero-prog { height: 6px; }
  #hero-prog::-webkit-slider-thumb { width: 20px; height: 20px; }
  #mobile-pp { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.1rem; padding: 0; flex-shrink: 0; }
  #mobile-pp:hover { color: #fff; }
}
@keyframes live-blink { 0%,100%{opacity:1} 50%{opacity:0.15} }

/* ── DESKTOP (≥1025): left-aligned controls, actions on one row ─────────── */
@media (min-width: 1025px) {
  #hero-art, #hero-art-fallback { width: 300px; min-width: 300px; min-height: 300px; height: auto; }
  #hero-body { padding: 28px 36px; }
  #hero-btns { justify-content: flex-start; }
  #hero-actions { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; column-gap: 16px; }
  #hero-more-row, #hero-bottom-row { flex: 0 0 auto; }
}

/* ── HEADER (nav + search) — SINGLE SOURCE for every page ─────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: var(--bg); border-top: 5px solid var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 10px; z-index: 200;
}
.site-logo { height: 75px; width: auto; cursor: pointer; flex-shrink: 0; margin: 0 0 0 -20px; }
.nav-spacer { flex: 1; }
.ep-back { font-size: 0.82rem; color: var(--text2); white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.ep-back:hover { color: var(--text); text-decoration: none; }
.search-wrap { display: flex; align-items: stretch; width: 220px; flex-shrink: 0; }
.search-wrap input {
  flex: 1; min-width: 0; padding: 0 11px; border: 1px solid var(--border); border-right: none;
  border-radius: 8px 0 0 8px; background: var(--bg2); color: var(--text);
  font-size: 0.82rem; outline: none; height: 32px; box-sizing: border-box;
}
.search-wrap:focus-within input, .search-wrap:focus-within button { border-color: var(--text2); }
.search-wrap input::placeholder { color: var(--text2); }
.search-wrap button {
  width: 34px; height: 32px; flex-shrink: 0; background: var(--bg2);
  border: 1px solid var(--border); border-left: none; border-radius: 0 8px 8px 0;
  color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.search-wrap button:hover { background: var(--bg3); color: var(--text); }
.search-wrap .search-close-btn { display: none; }
#search-toggle {
  width: 32px; height: 32px; flex-shrink: 0; padding: 0; display: none;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text2); cursor: pointer; align-items: center; justify-content: center;
  transition: border-color 0.12s, color 0.12s;
}
#search-toggle:hover { color: var(--text); border-color: var(--text2); }
#theme-toggle {
  width: 32px; height: 32px; flex-shrink: 0; padding: 0;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.12s, color 0.12s;
}
#theme-toggle:hover { color: var(--text); border-color: var(--text2); }
.auth-btn {
  height: 32px; padding: 0 10px; display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text2); font-size: 0.82rem; cursor: pointer; transition: all 0.12s;
  white-space: nowrap; flex-shrink: 0;
}
.auth-btn:hover { border-color: var(--text2); color: var(--text); }
.auth-btn.logged-in { color: var(--text); }
.nav-count { font-size: 0.82rem; color: var(--text2); white-space: nowrap; }

@media (max-width: 1024px) {
  .search-wrap { display: none; width: 0; }
  #search-toggle { display: flex; }
  nav.search-open { position: fixed; }
  nav.search-open .search-wrap {
    display: flex; align-items: center; position: absolute; left: 12px; right: 12px;
    top: 50%; transform: translateY(-50%); height: 38px; width: auto;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 999px;
    overflow: hidden; padding: 0 4px; z-index: 10;
  }
  nav.search-open .search-wrap input {
    flex: 1; min-width: 0; height: 100%; border: none; background: transparent;
    border-radius: 0; padding: 0 8px; box-shadow: none;
  }
  nav.search-open .search-wrap input:focus { border: none; }
  nav.search-open .search-wrap button, nav.search-open .search-close-btn {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 38px; height: 100%; border: none; background: transparent; border-radius: 50%;
    color: var(--text2); cursor: pointer;
  }
  nav.search-open .search-wrap button:hover, nav.search-open .search-close-btn:hover { background: var(--bg3); color: var(--text); }
  nav.search-open #search-toggle, nav.search-open .nav-spacer, nav.search-open #theme-toggle,
  nav.search-open #auth-btn, nav.search-open .site-logo, nav.search-open .nav-count, nav.search-open .ep-back { display: none; }
  nav.search-open .search-close-btn { display: flex; }
}
