:root {
  --mm-red: #ee252e;
  --font-app: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 60px 1.5rem 3rem;
  background-color: #f6f6f7;
  color: #1a1a1a;
  font-family: var(--font-app);
  -webkit-font-smoothing: antialiased;
}

.content {
  width: 100%;
  max-width: 600px;
  text-align: center;
  opacity: 0;
  animation: fade-in 1.6s ease-out forwards;
}

.logo {
  width: 160px;
  max-width: 60vw;
  height: auto;
  transform-origin: center center;
}

.spin-target {
  transform-origin: center center;
}

.spin-target.is-spinning {
  animation: mm-spin 10s linear infinite;
}

.spin-target.is-landing {
  transition: transform var(--land-dur, 1.2s) cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header translúcido que aparece al hacer scroll (con el logo pequeño centrado) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.site-header.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.logo-sticky {
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.logo-sticky img {
  display: block;
  width: 100%;
  height: auto;
}

.intro {
  margin: 2rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
}

.intro p {
  margin: 0 0 0.6rem;
}

.intro p:last-child {
  margin: 0;
}

.intro-es {
  color: #4d4d4d;
}

.intro-en {
  margin-top: 1.4rem;
  color: #8a8a8a;
}

.tagline {
  margin: 1.4rem 0 0;
  font-weight: 700;
  line-height: 1.6;
  color: #1a1a1a;
}

.card {
  max-width: 560px;
  margin: 2.25rem auto 0;
  padding: 1.75rem 1.5rem;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
}

/* Aparición al hacer scroll */
.card.in-view {
  opacity: 1;
  transform: none;
}

/* Card que se está reproduciendo: anillo fino + resplandor rojo (distinto de la especial) */
.card.is-playing-card {
  box-shadow: 0 0 0 2px var(--mm-red), 0 8px 28px rgba(238, 37, 46, 0.28), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Cabecera de card: título a la izquierda, botón compartir a la derecha */
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.card-head .album,
.card-head .episode-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: left;
}

.share-btn {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  margin: -2px -4px 0 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: #b3b3b3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.share-btn:hover {
  color: var(--mm-red);
  background: rgba(238, 37, 46, 0.08);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transform: rotate(-35deg); /* avión apuntando arriba-derecha */
}

.share-btn::after {
  content: "¡Copiado!";
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.share-btn.copied::after {
  opacity: 1;
}

.album {
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

.album-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
}

.album-artist {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: #777;
}

audio {
  display: none;
}

.player {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.play-btn {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--mm-red);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.play-btn:hover {
  filter: brightness(1.08);
}

.play-btn:active {
  transform: scale(0.95);
}

.play-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

.icon-play {
  margin-left: 3px; /* centrado óptico del triángulo */
}

.play-btn .icon-pause {
  display: none;
}

.play-btn.is-playing .icon-play {
  display: none;
}

.play-btn.is-playing .icon-pause {
  display: block;
  margin-left: 0;
}

.time {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #888;
  min-width: 3.2ch;
  text-align: center;
}

.seek {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--mm-red) var(--p, 0%), #e6e6e6 var(--p, 0%));
  cursor: pointer;
  outline: none;
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mm-red);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--mm-red);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.seek::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: transparent;
}

.seek::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: transparent;
}

.seek:focus-visible {
  box-shadow: 0 0 0 3px rgba(238, 37, 46, 0.25);
}

.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.service-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.service-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.service-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.service-spotify {
  background: #1db954;
}

.service-apple {
  background: #fa243c;
}

/* ---------- Timeline de episodios ---------- */
.timeline {
  position: relative;
  margin-top: 2.5rem;
}

.episode {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.75rem;
  scroll-margin-top: 90px; /* deja hueco para el header al saltar por URL */
}

.episode:last-child {
  padding-bottom: 0;
}

/* Línea vertical que conecta los marcadores */
.episode:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: #e6e6e6;
  z-index: 0;
}

.episode-marker {
  position: relative;
  z-index: 1;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mm-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
}

.episode-marker-special {
  font-size: 1.05rem;
}

.episode .card {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.card-featured {
  border: 5px solid var(--mm-red);
}

.episode-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
}

/* ---------- Tracklist ---------- */
.tracklist {
  margin-top: 1.4rem;
  text-align: left;
}

.tracklist-items {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: track;
}

.tracklist-items li {
  counter-increment: track;
  display: none; /* oculto por defecto; se muestra al desplegar */
  gap: 0.55rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #333;
  border-top: 1px solid #eee;
}

.tracklist.is-expanded .tracklist-items li {
  display: flex;
}

.tracklist-items li:first-child {
  border-top: none;
}

.tracklist-items li::before {
  content: counter(track, decimal-leading-zero);
  flex: none;
  color: var(--mm-red);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tracklist-toggle {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--mm-red);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.tracklist-toggle:hover {
  text-decoration: underline;
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes mm-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .content {
    opacity: 1;
    animation: none;
  }
  .card {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    padding-top: 28px;
  }
  .logo {
    width: 100px;
  }
  .intro {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
  }
  .tagline {
    margin-top: 1.5rem;
    font-size: 0.875rem;
  }
  .timeline {
    margin-top: 2rem;
  }
  .episode {
    gap: 0.7rem;
  }
  .episode-marker {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
  .episode-marker-special {
    font-size: 0.95rem;
  }
  .episode:not(:last-child)::before {
    left: 16px;
    top: 17px;
  }
  .card {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  .album-title,
  .episode-title {
    font-size: 1rem;
    text-wrap: balance;
  }
}
