/* ─────────────────────────────────────────────
   DOWNTIME WITH SEAN
   Palette: deep warm dark / amber gold / cream
───────────────────────────────────────────── */

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

:root {
  --bg:          #0c0a08;
  --surface:     #181310;
  --surface-hi:  #201a14;
  --gold:        #c8921e;
  --gold-lt:     #e8b848;
  --gold-glow:   rgba(200, 146, 30, 0.15);
  --cream:       #ede2ce;
  --dim:         #7a6b56;
  --border:      #2a2018;
  --player-bg:   #100d0a;
  --radius:      10px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Lato', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 100px;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ──────────────────────────────── */

header {
  padding: 3rem 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* warm atmospheric glow behind logo */
header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(200, 146, 30, 0.07) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

.header-inner a:has(.logo) { line-height: 0; }

.logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow:
    0 0 0 6px var(--gold-glow),
    0 8px 32px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.header-text h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--cream);
}

.header-text h1 em {
  font-style: italic;
  color: var(--gold-lt);
  font-weight: 400;
}

.tagline {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── MAIN / EPISODES ────────────────────── */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-header {
  margin-bottom: 1.25rem;
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--dim);
  font-weight: 700;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* ── EPISODE CARD ────────────────────────── */

.episode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.episode-card:hover {
  background: var(--surface-hi);
  border-color: rgba(200, 146, 30, 0.35);
}

.episode-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-glow), inset 0 0 40px rgba(200, 146, 30, 0.03);
}

/* ── PLAY BUTTON (in card) ─────────────── */

.ep-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.ep-play-btn:hover {
  background: rgba(200, 146, 30, 0.12);
}

.ep-play-btn.is-playing {
  background: var(--gold);
  color: var(--bg);
}

.ep-play-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

/* EQ animated bars — shown inside btn when episode is actively playing */
.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.eq-bars span {
  display: block;
  width: 3px;
  background: currentColor;
  border-radius: 1px;
  animation: eq 0.65s ease-in-out infinite alternate;
}

.eq-bars span:nth-child(1) { animation-delay: 0s;    height: 6px;  }
.eq-bars span:nth-child(2) { animation-delay: 0.18s; height: 12px; }
.eq-bars span:nth-child(3) { animation-delay: 0.35s; height: 4px;  }

@keyframes eq {
  0%   { height: 3px; }
  100% { height: 13px; }
}

/* ── EPISODE INFO ───────────────────────── */

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

.ep-meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.2rem;
}

.ep-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ep-date {
  font-size: 0.68rem;
  color: var(--dim);
}

.ep-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-desc {
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-duration {
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 300;
  letter-spacing: 0.03em;
}

/* ── PLAYER BAR ──────────────────────────── */

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--player-bg);
  border-top: 1px solid var(--border);
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}

.player-bar.is-visible {
  transform: translateY(0);
}

.player-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.6rem 1.5rem 0.85rem;
}

.player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 0 160px;
  max-width: 160px;
}

.player-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 700;
}

.player-title {
  font-size: 0.8rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--serif);
  font-style: italic;
}

.player-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--gold);
  color: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
  padding: 0;
}

.player-play-btn:hover { opacity: 0.82; }

.player-play-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.player-seek-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem 0;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.player-time {
  font-size: 0.68rem;
  color: var(--dim);
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.seek-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s;
}

.seek-bar:hover { height: 8px; }

.seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 4px;
  pointer-events: none;
}

/* ── FOOTER ───────────────────────────── */

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.05em;
}

.footer-inner a {
  color: var(--dim);
  text-decoration: none;
  margin-left: 1rem;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.footer-inner a:hover { opacity: 1; }

/* ── Empty state ─────────────────────────── */

.empty-state {
  text-align: center;
  color: var(--dim);
  font-style: italic;
  padding: 3rem 0;
  font-size: 0.9rem;
}

/* ── EPISODE THUMBNAIL (card) ───────────── */

.ep-thumb {
  width: 64px;
  height: 64px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.ep-thumb-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 7px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ep-thumb-placeholder span {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── SKIP BUTTONS ────────────────────────── */

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.player-skip-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(122, 107, 86, 0.45);
  background: none;
  color: var(--dim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}

.player-skip-btn:hover { color: var(--cream); border-color: var(--dim); }
.player-skip-btn svg   { width: 16px; height: 16px; }
.player-skip-btn span  {
  font-size: 0.44rem;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
}

/* ── DETAIL VIEW ─────────────────────────── */

.hidden { display: none !important; }

#detailView {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
}

.detail-back-btn {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0;
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.detail-back-btn:hover { color: var(--cream); }

.detail-hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.detail-thumb {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.detail-thumb-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--border);
  letter-spacing: 0.05em;
}

.detail-hero-info {
  flex: 1;
  min-width: 0;
  padding-top: 0.25rem;
}

.detail-hero-info .ep-meta {
  margin-bottom: 0.5rem;
}

.detail-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.detail-desc {
  font-size: 0.88rem;
  color: var(--dim);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.detail-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 24px;
  padding: 0.65rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
}

.detail-play-btn:hover   { opacity: 0.85; }
.detail-play-btn svg     { width: 16px; height: 16px; }

/* ── Download button (card) ──────────────── */

.ep-download-btn {
  color: var(--dim);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.ep-download-btn:hover {
  color: var(--cream);
  background: rgba(255,255,255,0.06);
}

.ep-download-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Detail page actions ─────────────────── */

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.65rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.detail-download-btn:hover { color: var(--cream); border-color: var(--cream); }
.detail-download-btn svg   { width: 15px; height: 15px; }

.detail-notes {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  color: var(--cream);
  font-size: 0.9rem;
  line-height: 1.8;
}

.detail-notes p              { margin-bottom: 0.85rem; }
.detail-notes p:last-child   { margin-bottom: 0; }

/* ── MOBILE ──────────────────────────────── */

@media (max-width: 600px) {
  header {
    padding: 2rem 1.25rem 1.75rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .logo {
    width: 80px;
    height: 80px;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .ep-desc {
    display: none;
  }

  .player-info {
    flex: 0 0 100px;
    max-width: 100px;
  }

  .player-inner {
    gap: 0.6rem;
    padding: 0.5rem 0.75rem 0.75rem;
  }

  .player-seek-row {
    padding: 0.5rem 0.5rem 0;
  }

  .ep-thumb,
  .ep-thumb-placeholder {
    width: 50px;
    height: 50px;
  }

  /* Prevent "EP 01", date, and duration from breaking mid-word */
  .ep-num,
  .ep-date,
  .ep-duration {
    white-space: nowrap;
  }

  .detail-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .detail-thumb,
  .detail-thumb-placeholder {
    width: 150px;
    height: 150px;
  }

  .detail-hero-info .ep-meta {
    justify-content: center;
  }

  #detailView {
    padding: 1rem 1rem 5rem;
  }
}
