/* ============================================
   The Scattered Stethoscope - Theme
   Bright, vibrant, neurodivergent-friendly
   ============================================ */

:root {
  --bg-main: #1A1A2E;
  --bg-surface: #16213E;
  --bg-elevated: #0F3460;
  --pink: #E91E8C;
  --coral: #FF6B6B;
  --teal: #4ECDC4;
  --yellow: #FFD93D;
  --purple: #7B68EE;
  --blue: #4A90D9;
  --text-body: #E8E8E8;
  --text-heading: #FFFFFF;
  --text-muted: #9CA3AF;
  --border: #2D3748;
  --radius: 12px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-body);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--pink);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--teal); }
a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 3px solid var(--pink);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-logo .accent { color: var(--pink); }
.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.site-nav a {
  color: var(--text-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-surface);
  border-top: 3px solid var(--pink);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--pink); }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}
.hero h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--pink), var(--coral), var(--yellow), var(--teal), var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 1rem auto;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}
.card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
}
.card-artwork {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.card-body {
  padding: 1.25rem;
}
.card-body h3 { margin-bottom: 0.25rem; }
.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-coral { background: var(--coral); color: #fff; }
.badge-teal { background: var(--teal); color: #1A1A2E; }
.badge-yellow { background: var(--yellow); color: #1A1A2E; }
.badge-purple { background: var(--purple); color: #fff; }

/* --- Episode List --- */
.episode-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 0;
}
.episode-item {
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: border-color 0.2s;
}
.episode-item:hover { border-color: var(--pink); }
.episode-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pink);
  min-width: 2.5rem;
  text-align: center;
}
.episode-info { flex: 1; }
.episode-info h3 { margin-bottom: 0.15rem; font-size: 1.1rem; }
.episode-info p { margin-bottom: 0; color: var(--text-muted); font-size: 0.9rem; }
.episode-duration {
  color: var(--purple);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* --- Audio Player --- */
.player-container {
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 2px solid var(--pink);
  padding: 2rem;
  margin: 2rem 0;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.player-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.player-btn:hover { background: var(--purple); transform: scale(1.05); }
.player-btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.player-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 4px;
  width: 0%;
  transition: width 0.1s;
}
.player-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.player-extras {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}
.speed-select {
  background: var(--bg-elevated);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.speed-select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
.download-btn {
  background: none;
  border: 1px solid var(--pink);
  color: var(--pink);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.download-btn:hover { background: var(--pink); color: #fff; }

/* --- Volume --- */
.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: #c4177a; color: #fff; }
.btn-secondary { background: var(--teal); color: var(--bg-main); }
.btn-secondary:hover { background: #3dbdb5; color: var(--bg-main); }
.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-body);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-body);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

/* --- Admin --- */
.admin-header {
  background: var(--bg-surface);
  border-bottom: 3px solid var(--purple);
  padding: 1rem 0;
}
.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-title {
  font-weight: 800;
  color: var(--purple);
  font-size: 1.25rem;
}
.admin-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.admin-nav a {
  color: var(--text-body);
  font-weight: 600;
}
.admin-nav a:hover { color: var(--purple); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}
.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--pink);
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* --- Table --- */
.table-container {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}
td { font-size: 0.95rem; }
tr:hover td { background: rgba(233, 30, 140, 0.08); }

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Alert --- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #EF4444;
  color: #FCA5A5;
}
.alert-success {
  background: rgba(78, 205, 196, 0.15);
  border: 1px solid var(--teal);
  color: var(--teal);
}

/* --- Login --- */
.login-container {
  max-width: 400px;
  margin: 8rem auto;
  padding: 2rem;
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.login-container h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--pink);
}

/* --- RSS Badge --- */
.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: var(--pink);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.rss-link:hover { background: var(--purple); color: #FFFFFF; }

/* --- Upload area --- */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover {
  border-color: var(--teal);
  background: rgba(78, 205, 196, 0.05);
}
.upload-area.dragover {
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.1);
}
.upload-progress {
  margin-top: 1rem;
}
.upload-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  background: var(--teal);
  width: 0%;
  transition: width 0.3s;
}

/* --- Grid Layout Classes --- */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.awareness-banner { border-radius: var(--radius); overflow: hidden; position: relative; min-height: 300px; }
.awareness-banner img { width: 100%; height: 300px; display: block; object-fit: cover; }
.awareness-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.25rem 1.5rem; background: linear-gradient(transparent, rgba(0,0,0,0.85)); }

/* --- Hamburger Menu --- */
.nav-toggle {
  display: none;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: none;
  width: 26px;
  height: 3px;
  background: var(--text-body);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.nav-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.nav-active span:nth-child(2) { opacity: 0; }
.nav-toggle.nav-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- Responsive: Desktop (>1024px) --- */
@media (min-width: 1025px) {
  .awareness-banner img { height: 320px; }
}

/* --- Responsive: Tablet (<1024px) --- */
@media (max-width: 1024px) {
  .grid-2col { gap: 1rem; }
  .awareness-banner img { height: 250px; }
  .awareness-banner { min-height: 250px; }
}

/* --- Responsive: Mobile (<768px) --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.75rem; }
  .card-grid { grid-template-columns: 1fr; }
  .episode-item { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: 1fr 1fr; }

  /* Hamburger nav */
  .nav-toggle { display: flex; visibility: visible; width: auto; height: auto; overflow: visible; padding: 0.5rem; }
  .nav-toggle span { display: block; }
  .site-header .container { position: relative; }
  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0;
  }
  .site-nav.nav-open { display: flex; }
  .site-nav li { width: 100%; }
  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .site-nav .rss-link { display: inline-flex; margin: 0.5rem 0; }

  /* Grids stack */
  .grid-2col { grid-template-columns: 1fr; }
  .grid-3col { grid-template-columns: 1fr; }

  /* Awareness banner */
  .awareness-banner img { height: 140px; }
  .awareness-banner { min-height: 140px; }
  .awareness-overlay { padding: 0.75rem 1rem; }
  .awareness-overlay h3 { font-size: 0.95rem; }
  .awareness-overlay p { font-size: 0.75rem; }

  /* Player touch targets */
  .progress-bar { height: 20px; border-radius: 10px; }
  .progress-fill { border-radius: 10px; }
  .volume-slider { height: 20px; }
  .volume-slider::-webkit-slider-thumb { width: 24px; height: 24px; }
  .speed-select { font-size: 1rem; padding: 0.5rem; }
  .player-extras { flex-wrap: wrap; gap: 0.75rem; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; }
}

/* --- Responsive: Small Phone (<480px) --- */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero img { max-width: 100%; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.35rem; }
  .player-btn { width: 48px; height: 48px; font-size: 1.25rem; }
  .awareness-banner img { height: 120px; }
  .awareness-banner { min-height: 120px; }
  .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .episode-number { font-size: 1.2rem; min-width: 2rem; }
  .admin-nav { flex-wrap: wrap; gap: 0.75rem; }
}

/* --- Persistent Bottom Player Bar --- */
.player-bar {
  position: fixed;
  bottom: -80px;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  z-index: 1000;
  transition: bottom 0.3s ease-out;
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.player-bar.player-visible { bottom: 0; }
body.has-player { padding-bottom: 80px; }

.pb-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
}
.pb-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.pb-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 0 180px;
}
.pb-title {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-heading);
}
.pb-series {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-controls { flex-shrink: 0; }
.pb-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}
.pb-play-btn:hover { background: var(--purple); transform: scale(1.05); }
.pb-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.pb-progress {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.pb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s;
}
.pb-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 35px;
  text-align: center;
}
.pb-speed {
  background: var(--bg-elevated);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pb-info { flex: 0 0 100px; }
  .pb-progress-wrap { display: none; }
  .pb-speed { display: none; }
  .player-bar { height: 56px; }
  .pb-inner { gap: 0.5rem; }
  .pb-thumb { width: 40px; height: 40px; }
  .pb-play-btn { width: 36px; height: 36px; font-size: 0.9rem; }
  .pb-title { font-size: 0.75rem; }
  .pb-series { font-size: 0.65rem; }
  body.has-player { padding-bottom: 64px; }
}

/* --- Toast Notifications --- */
.toast-notification {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-surface);
  color: var(--text-heading);
  border: 1px solid var(--pink);
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast-notification.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Play Button on Episode List --- */
.play-episode-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}
.play-episode-btn:hover { background: var(--purple); transform: scale(1.1); }

/* --- Glassmorphism Cards --- */
.card-glass {
  background: rgba(22, 33, 62, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-glass:hover {
  transform: translateY(-4px);
  border-color: var(--pink);
  box-shadow: 0 8px 32px rgba(233, 30, 140, 0.15);
}

/* --- Dark/Light Mode --- */
[data-theme="light"] {
  --bg: #F8F9FA;
  --bg-main: #F8F9FA;
  --bg-secondary: #F0F0F5;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F0F0F5;
  --card-bg: #FFFFFF;
  --text: #2D2D3F;
  --text-body: #2D2D3F;
  --text-heading: #1A1A2E;
  --text-muted: #6B7280;
  --border: #E5E7EB;
}
[data-theme="light"] .header-search input {
  background: #FFFFFF;
  color: var(--text-body);
}
[data-theme="light"] .chapter-item:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .card-glass {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .player-bar {
  background: rgba(255, 255, 255, 0.95);
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-body);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--pink); }

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 1em; margin-bottom: 0.5em; }
.skeleton-thumb { width: 60px; height: 60px; border-radius: 8px; }
.skeleton-card { height: 200px; }

/* --- Loading Bar (top of page) --- */
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--teal));
  z-index: 9999;
  transition: width 0.3s;
}

/* --- Comments Section --- */
.comments-section { margin-top: 2rem; }
.comments-section h2 { margin-bottom: 1rem; }
.comment {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.comment-author {
  font-weight: 700;
  color: var(--pink);
  font-size: 0.9rem;
}
.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comment-body {
  font-size: 0.95rem;
  line-height: 1.6;
}
.comment-reply {
  margin-left: 2rem;
  border-left: 2px solid var(--pink);
}
.comment-form {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.comment-form textarea {
  min-height: 80px;
}

/* --- Enhanced Episode Cards --- */
.episode-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.episode-card:hover { transform: translateY(-2px); }
.episode-card-artwork {
  position: relative;
  overflow: hidden;
}
.episode-card-artwork img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.3s;
}
.episode-card:hover .episode-card-artwork img { transform: scale(1.05); }
.episode-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.8));
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.episode-card:hover .episode-card-overlay { opacity: 1; }
.episode-card-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.episode-card-play:hover { transform: scale(1.1); }
.episode-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
}
.episode-card-progress-fill {
  height: 100%;
  background: var(--pink);
}

/* --- Smooth page transitions --- */
.page-enter { animation: pageIn 0.3s ease-out; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Save/Bookmark Button --- */
.save-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s;
}
.save-btn:hover { transform: scale(1.2); }
.save-btn.saved { color: var(--pink); }

/* --- Header Search --- */
.header-search {
  flex: 0 1 240px;
  margin: 0;
}
.header-search input {
  width: 100%;
  padding: 0.45rem 0.85rem;
  background: var(--bg-elevated);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.header-search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}
@media (max-width: 768px) {
  .header-search { display: none; }
}

/* --- Chapters --- */
.chapter-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid var(--border);
  margin-bottom: 0.35rem;
}
.chapter-item:hover { background: rgba(233, 30, 140, 0.08); border-color: var(--pink); }
.chapter-ts-badge {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--purple);
  font-weight: 700;
  font-size: 0.8rem;
}
.chapter-title-text { color: var(--text-body); font-weight: 500; }

/* --- Bookmark note input --- */
.bookmark-note-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-main);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.9rem;
}

/* --- Transcript section --- */
#transcript-section details {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
}
#transcript-section details[open] { padding-bottom: 1.1rem; }
#transcript-section summary { list-style: none; }
#transcript-section summary::-webkit-details-marker { display: none; }

/* --- Player skip buttons --- */
.player-skip-btn {
  background: var(--bg-elevated);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.player-skip-btn:hover { border-color: var(--teal); color: var(--teal); }
