:root {
  --base: #141414;
  --text: #f3f3f3;
  --kicker: #9a9a9a;
  --aura-a: #5b5bff;
  --aura-b: #c8ff4d;
  --accent: #c8ff4d;
  --font-display: "Syne", "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-body);
}

.film-grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.065;
  z-index: 40;
  mix-blend-mode: overlay;
}

#app {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--base);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#app[data-slide="0"] { --aura-a: #5b5bff; --aura-b: #c8ff4d; --accent: #c8ff4d; }
#app[data-slide="1"] { --aura-a: #3b4cca; --aura-b: #ff6f61; --accent: #ff8a7a; }
#app[data-slide="2"] { --aura-a: #9b5cff; --aura-b: #29e8ff; --accent: #7ae9ff; }
#app[data-slide="3"] { --aura-a: #e06d53; --aura-b: #ffd166; --accent: #ffd166; }
#app[data-slide="4"] { --aura-a: #5b5bff; --aura-b: #29e8ff; --accent: #89a8ff; }
#app[data-slide="5"] { --aura-a: #ff3fa4; --aura-b: #ffd166; --accent: #ffd166; }
#app[data-slide="6"] { --aura-a: #c8ff4d; --aura-b: #9b5cff; --accent: #c8ff4d; }

.thermal-aura {
  position: absolute;
  left: 50%;
  width: 145vw;
  max-width: 960px;
  height: 28vh;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  filter: blur(36px);
  opacity: 0.85;
  transition: background 0.7s ease;
}

.thermal-top {
  top: -12vh;
  background: repeating-radial-gradient(
    ellipse at 50% 0%,
    var(--aura-a) 0%,
    var(--aura-b) 18%,
    transparent 42%,
    var(--aura-a) 58%,
    transparent 76%
  );
}

.thermal-bottom {
  bottom: -12vh;
  background: repeating-radial-gradient(
    ellipse at 50% 100%,
    var(--aura-b) 0%,
    var(--aura-a) 18%,
    transparent 42%,
    var(--aura-b) 58%,
    transparent 76%
  );
}

.landing-screen {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 28px;
  text-align: center;
}

.landing-actions {
  margin-top: 28px;
}

.preload-bar-wrap {
  margin: 24px auto 8px;
  width: 220px;
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  border-radius: 2px;
}

.preload-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.preload-pct {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--kicker);
  font-weight: 700;
}

.story-viewport {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 16px) 20px calc(env(safe-area-inset-bottom, 16px) + 12px);
}

.top-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  z-index: 20;
}

.circle-glass-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.circle-glass-btn:active { transform: scale(0.92); }
.circle-glass-btn[disabled] { opacity: 0.35; pointer-events: none; }

.track-pill {
  height: 34px;
  max-width: calc(100% - 96px);
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #f3f3f3;
}

.track-pill-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  flex-shrink: 0;
}

.eq-bars i {
  display: block;
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.eq-bars.playing i:nth-child(1) { animation: eqBounce 0.75s ease-in-out infinite; }
.eq-bars.playing i:nth-child(2) { animation: eqBounce 0.55s ease-in-out 0.15s infinite; }
.eq-bars.playing i:nth-child(3) { animation: eqBounce 0.85s ease-in-out 0.3s infinite; }

@keyframes eqBounce {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

.slide-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 4px;
  overflow: hidden;
}

.slide-enter-up { animation: swipeUpIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.slide-enter-down { animation: swipeDownIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

@keyframes swipeUpIn {
  from { opacity: 0; transform: translateY(42px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes swipeDownIn {
  from { opacity: 0; transform: translateY(-42px); }
  to { opacity: 1; transform: translateY(0); }
}

.kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kicker);
  font-weight: 700;
}

.hero-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 9vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.punchline {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
}

/* Slide 1: Acoustic ripples */
.slide1-wrap {
  position: relative;
  text-align: center;
  padding: 28px 0;
}

.acoustic-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(200, 255, 77, 0.25);
  transform: translate(-50%, -50%) scale(0.7);
  animation: ripplePulse 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
  pointer-events: none;
}

.acoustic-ripple.r2 { border-color: rgba(91, 91, 255, 0.32); animation-delay: 1.1s; }
.acoustic-ripple.r3 { border-color: rgba(200, 255, 77, 0.16); animation-delay: 2.1s; }

@keyframes ripplePulse {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.65); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.75); }
}

/* Slide 2: Heavy Chapter Full-bleed-to-Portrait + Overlapping 1:1 Album Art */
.morph-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.morph-media-row {
  position: relative;
  height: 232px;
}

.entry-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: radial-gradient(circle at 30% 25%, rgba(59, 76, 202, 0.4), rgba(255, 111, 97, 0.24) 60%, #1d1d1d 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0.65;
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry-cover-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
}

.entry-cover-overlay {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.morph-media-row.morphed .entry-cover {
  width: 178px;
  height: 224px;
  border-radius: 16px;
  opacity: 1;
}

.song-overlap {
  position: absolute;
  left: 136px;
  bottom: -6px;
  width: 112px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid #141414;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: scale(0.75) translateY(14px);
  transition: all 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.morph-media-row.morphed .song-overlap {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.odometer-date {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--accent);
}

/* Slide 3: Turning Point + Kinetic Counter */
.turning-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.turning-media-frame {
  width: 100%;
  height: 175px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.turning-media-frame img,
.turning-media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tally-reaction {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kicker);
  min-height: 18px;
}

.tally-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 15vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  transition: color 0.25s ease;
}

/* Slide 4: Interactive Vibe Quiz */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.quiz-pill {
  width: 100%;
  padding: 16px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.22s ease;
}

.quiz-pill:hover { border-color: var(--accent); }
.quiz-pill.correct { border-color: #c8ff4d; background: rgba(200, 255, 77, 0.16); color: #c8ff4d; }
.quiz-pill.wrong { border-color: #ff6f61; background: rgba(255, 111, 97, 0.14); }
.quiz-reveal { margin-top: 20px; animation: swipeUpIn 0.35s ease forwards; }

/* Slide 5: Hairline Ranked List */
.hairline-list {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hairline-row {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 12px 2px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}

.hairline-rank {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--kicker);
  width: 22px;
  flex-shrink: 0;
}

.hairline-row.active .hairline-rank { color: var(--accent); }
.hairline-main { flex: 1; min-width: 0; }

.hairline-title {
  font-weight: 700;
  font-size: 15px;
  color: #e2e2e2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hairline-row.active .hairline-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.hairline-sub {
  font-size: 12px;
  color: var(--kicker);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slide 6: Happier Moments + 6-Col Mosaic Zoom */
.mosaic-stage {
  position: relative;
  height: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mosaic-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  transition: filter 0.8s ease;
}

.mosaic-stage.zoomed .mosaic-grid {
  filter: blur(8px) brightness(0.42);
}

.mosaic-tile {
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  overflow: hidden;
  background: #202020;
  opacity: 0.45;
  transform: scale(0.96);
  animation: tileRipple 1.1s ease forwards;
}

.mosaic-tile img,
.mosaic-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes tileRipple {
  0% { opacity: 0.25; transform: scale(0.94); }
  45% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0.72; transform: scale(1); }
}

.mosaic-hero-frame {
  position: absolute;
  width: 196px;
  height: 196px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.mosaic-hero-frame img,
.mosaic-hero-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mosaic-stage.zoomed .mosaic-hero-frame {
  opacity: 1;
  transform: scale(1);
}

/* Slide 7: Aura Archetype & Unrelated Quote */
.archetype-wrap { text-align: center; }

.aura-emblem {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aura-a) 0%, var(--aura-b) 48%, transparent 72%);
  box-shadow: 0 0 48px rgba(200, 255, 77, 0.35);
  animation: emblemBreath 3.5s ease-in-out infinite;
}

@keyframes emblemBreath {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.06); }
}

.traits-line {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.pin-btn {
  margin-top: 18px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bottom-chrome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  z-index: 20;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.bottom-chrome[data-settled="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.next-circle-btn {
  position: absolute;
  left: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.pill-cta-white {
  padding: 13px 26px;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #141414;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.pill-cta-white:active { transform: scale(0.97); }

.razor-progress-track {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 4px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border-radius: 2px;
  transition: opacity 0.45s ease;
}

.razor-progress-track.faded { opacity: 0; }
.razor-progress-fill { width: 0%; height: 100%; background: #ffffff; }

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 60;
}
