/* ============================================================
   Note Podcast — revision podcast overlay + player
   ============================================================ */

body.podcast-open { overflow: hidden; }

.podcast-stage {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(124, 58, 237, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
    linear-gradient(160deg, #0f0a1e 0%, #1a1033 45%, #0d1526 100%);
  opacity: 0;
  transition: opacity 280ms ease;
}

.podcast-stage.is-open { opacity: 1; }

.podcast-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
}

.podcast-close:hover { background: rgba(255, 255, 255, 0.2); }

.podcast-subject {
  position: absolute;
  top: 24px;
  left: 24px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.podcast-wrap {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* ── Setup ─────────────────────────────────────────────────── */

.podcast-setup {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  color: #f8f4ff;
}

.podcast-setup__icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.podcast-setup__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
}

.podcast-setup__note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1rem;
}

.podcast-setup__desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 1.5rem;
}

.podcast-setup__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  margin-bottom: 0.75rem;
}

.podcast-setup__field span {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.podcast-setup__select {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 0.95rem;
}

.podcast-setup__hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1.25rem;
}

.podcast-setup__btn {
  width: 100%;
}

/* ── Loading ─────────────────────────────────────────────── */

.podcast-loading {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #f3eefb;
}

.podcast-loading__waves {
  display: flex;
  justify-content: center;
  gap: 4px;
  height: 40px;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.podcast-loading__waves span {
  display: block;
  width: 4px;
  background: linear-gradient(180deg, #a855f7, #ec4899);
  border-radius: 2px;
  animation: podcast-wave 0.9s ease-in-out infinite;
}

.podcast-loading__waves span:nth-child(1) { animation-delay: 0s; height: 12px; }
.podcast-loading__waves span:nth-child(2) { animation-delay: 0.1s; height: 22px; }
.podcast-loading__waves span:nth-child(3) { animation-delay: 0.2s; height: 32px; }
.podcast-loading__waves span:nth-child(4) { animation-delay: 0.3s; height: 22px; }
.podcast-loading__waves span:nth-child(5) { animation-delay: 0.4s; height: 12px; }

@keyframes podcast-wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

.podcast-loading h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.podcast-loading p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* ── Error ───────────────────────────────────────────────── */

.podcast-error {
  text-align: center;
  padding: 2rem;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.podcast-error p { margin: 0 0 1rem; }

.podcast-error .btn { margin: 0 0.25rem; }

/* ── Player ──────────────────────────────────────────────── */

.podcast-player {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.5rem;
  color: #f8f4ff;
  backdrop-filter: blur(14px);
}

.podcast-player__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4b5fd;
  margin-bottom: 0.5rem;
}

.podcast-player__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.podcast-player__subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 0.35rem;
}

.podcast-player__meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1.25rem;
}

.podcast-player__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
}

.podcast-player__play {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
  transition: transform 150ms ease;
}

.podcast-player__play:hover { transform: scale(1.05); }

.podcast-player__progress-wrap {
  flex: 1;
  min-width: 0;
}

.podcast-player__progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.podcast-player__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 2px;
  transition: width 300ms ease;
}

.podcast-player__time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.podcast-player__speed {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.podcast-player__speed select {
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.8rem;
}

.podcast-player__transcript h3,
.podcast-player__takeaways h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.65rem;
}

.podcast-transcript {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-right: 4px;
}

.podcast-line {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}

.podcast-line:hover {
  background: rgba(255, 255, 255, 0.08);
}

.podcast-line.is-active {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(167, 139, 250, 0.4);
}

.podcast-line--host .podcast-line__name { color: #c4b5fd; }
.podcast-line--expert .podcast-line__name { color: #f9a8d4; }

.podcast-line__name {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.podcast-line__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.podcast-takeaways {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
}

.podcast-player__tip {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.25);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.podcast-player__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
  .podcast-player__controls {
    flex-wrap: wrap;
  }

  .podcast-player__speed {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
