:root {
  --cosmic-black: #0a0a0f;
  --deep-space: #1a1a2e;
  --stellar-purple: #6b5b95;
  --nebula-blue: #4a90e2;
  --ancient-gold: #d4af37;
  --medieval-bronze: #8b6f47;
  --industrial-steel: #536878;
  --modern-cyan: #00d9ff;
  --info-bg: rgba(255, 255, 255, 0.03);
  --info-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: "Crimson Text", serif;
  background: var(--cosmic-black);
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.timeline-container {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Animated background particles */
.particle-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* Central timeline spine */
.timeline-spine {
  position: fixed;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 100vh,
    var(--stellar-purple) 100vh,
    var(--nebula-blue) calc(100vh + 25%),
    var(--ancient-gold) calc(100vh + 50%),
    var(--industrial-steel) calc(100vh + 75%),
    var(--modern-cyan) 100%
  );
  transform: translateX(-50%);
  z-index: 1;
}

/* Main content timeline bar */
.timeline-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: linear-gradient(
    to bottom,
    var(--stellar-purple) 0%,
    var(--nebula-blue) 20%,
    var(--ancient-gold) 50%,
    var(--industrial-steel) 75%,
    var(--modern-cyan) 100%
  );
  z-index: 1;
  border-radius: 2px;
}

/* Era sections */
.era-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 4rem;
  z-index: 2;
  opacity: 0.3;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  margin-bottom: 0;
}

.era-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.era-content {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.era-content.reverse {
  direction: rtl;
}

.era-content.reverse > * {
  direction: ltr;
}

/* Era indicator badge */
.era-badge {
  position: absolute;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Mono", monospace;
  font-size: 0.9rem;
  letter-spacing: 3px;
  padding: 0.5rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  text-transform: uppercase;
  z-index: 3;
}

.era-info {
  padding: 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid;
  border-radius: 0 12px 12px 0;
}

.era-info:hover {
  background: rgba(255, 255, 255, 0.05);
}

.era-visual {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.era-title {
  font-family: "Playfair Display", serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, #a0a0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.era-timeline {
  font-family: "Space Mono", monospace;
  font-size: 1.2rem;
  color: var(--ancient-gold);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.era-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

.key-events {
  margin-top: 2rem;
}

.key-events h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.event-item:last-child {
  border-bottom: none;
}

.event-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.event-year {
  font-family: "Space Mono", monospace;
  font-size: 0.9rem;
  color: var(--ancient-gold);
  min-width: 120px;
  font-weight: 700;
}

.event-description {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.event-detail {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  font-style: italic;
  margin-top: 0.3rem;
}

/* Era SVG icons */
.cosmic-icon {
  text-align: center;
  filter: drop-shadow(0 0 14px currentColor) drop-shadow(0 0 32px currentColor);
  animation: icon-breathe 4s ease-in-out infinite;
  will-change: opacity;
}

.cosmic-icon svg {
  width: 96px;
  height: 96px;
}

@keyframes icon-breathe {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

/* Gear spins slowly */
[data-era="industrial"] .cosmic-icon svg {
  animation: gear-spin 12s linear infinite;
  will-change: transform;
}

@keyframes gear-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Starburst pulses with rotation */
[data-era="cosmic"] .cosmic-icon svg {
  animation: star-pulse 6s ease-in-out infinite;
  will-change: transform;
}

@keyframes star-pulse {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%       { transform: rotate(22.5deg) scale(1.08); }
}

/* DNA gently bobs */
[data-era="life"] .cosmic-icon svg {
  animation: gentle-bob 3s ease-in-out infinite;
}

@keyframes gentle-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* Visual decoration chapter numbers */
.visual-decoration {
  font-family: "Playfair Display", serif;
  font-size: 9rem;
  font-weight: 900;
  opacity: 0.09;
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
  color: currentColor;
  margin-top: 0.5rem;
}

/* Per-era icon colours (uses data-era on .era-section) */
[data-era="cosmic"]       .cosmic-icon { color: var(--stellar-purple); }
[data-era="earth"]        .cosmic-icon { color: #6b9e6b; }
[data-era="life"]         .cosmic-icon { color: #3db89c; }
[data-era="cambrian"]     .cosmic-icon { color: #4a90e2; }
[data-era="dinosaurs"]    .cosmic-icon { color: #a0522d; }
[data-era="mammals"]      .cosmic-icon { color: #c68642; }
[data-era="stone"]        .cosmic-icon { color: #e07b39; }
[data-era="ancient"]      .cosmic-icon { color: var(--ancient-gold); }
[data-era="medieval"]     .cosmic-icon { color: #9e7c5b; }
[data-era="renaissance"]  .cosmic-icon { color: #da7422; }
[data-era="industrial"]   .cosmic-icon { color: var(--industrial-steel); }
[data-era="modern"]       .cosmic-icon { color: var(--nebula-blue); }
[data-era="contemporary"] .cosmic-icon { color: var(--modern-cyan); }

/* Intro section */
.intro-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem;
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  overflow: hidden;
  background: radial-gradient(
    ellipse at center,
    rgba(26, 26, 46, 0.8) 0%,
    rgba(10, 10, 15, 1) 70%
  );
}

/* Nebula background layer */
.nebula-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      ellipse at 20% 30%,
      rgba(107, 91, 149, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 70%,
      rgba(74, 144, 226, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(0, 217, 255, 0.05) 0%,
      transparent 60%
    );
  animation: nebulaDrift 20s ease-in-out infinite;
}

@keyframes nebulaDrift {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
}

/* Galaxy spiral */
.galaxy-spiral {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.4;
}

.spiral-arm {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(74, 144, 226, 0.5) 30%,
    rgba(107, 91, 149, 0.3) 60%,
    transparent 100%
  );
  transform-origin: left center;
  border-radius: 2px;
  filter: blur(1px);
}

.galaxy-spiral {
  animation: rotateGalaxy 60s linear infinite;
  will-change: transform;
}

@keyframes rotateGalaxy {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Cosmic rings animation */
.cosmic-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cosmic-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(107, 91, 149, 0.4);
  border-radius: 50%;
  animation: expandRing 5s ease-out infinite;
  box-shadow:
    0 0 20px rgba(74, 144, 226, 0.3),
    inset 0 0 20px rgba(74, 144, 226, 0.1);
}

.cosmic-ring:nth-child(1) {
  animation-delay: 0s;
}
.cosmic-ring:nth-child(2) {
  animation-delay: 1.25s;
}
.cosmic-ring:nth-child(3) {
  animation-delay: 2.5s;
}
.cosmic-ring:nth-child(4) {
  animation-delay: 3.75s;
}

@keyframes expandRing {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow:
      0 0 30px rgba(0, 217, 255, 0.6),
      inset 0 0 30px rgba(0, 217, 255, 0.3);
  }
  100% {
    width: 1000px;
    height: 1000px;
    opacity: 0;
    border-color: rgba(107, 91, 149, 0);
  }
}

/* Central starburst with lens flare */
.starburst-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.starburst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 60px 20px rgba(255, 255, 255, 0.9),
    0 0 100px 40px rgba(74, 144, 226, 0.6),
    0 0 150px 60px rgba(107, 91, 149, 0.4),
    0 0 200px 80px rgba(0, 217, 255, 0.2);
  animation: pulseStar 4s ease-in-out infinite;
}

.lens-flare {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.1) 80%,
    transparent 100%
  );
  filter: blur(2px);
  animation: flarePulse 4s ease-in-out infinite;
}

.lens-flare:nth-child(2) {
  transform: translate(-50%, -50%) rotate(90deg);
}

.lens-flare:nth-child(3) {
  transform: translate(-50%, -50%) rotate(45deg);
  width: 200px;
  opacity: 0.5;
}

.lens-flare:nth-child(4) {
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 200px;
  opacity: 0.5;
}

@keyframes pulseStar {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@keyframes flarePulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Orbiting elements */
.orbit-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  width: 200px;
  height: 200px;
  animation: orbitRotate 20s linear infinite;
  will-change: transform;
}
.orbit-2 {
  width: 320px;
  height: 320px;
  animation: orbitRotate 30s linear infinite reverse;
  will-change: transform;
}
.orbit-3 {
  width: 450px;
  height: 450px;
  animation: orbitRotate 40s linear infinite;
  will-change: transform;
}

@keyframes orbitRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.orbiting-body {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.orbit-1 .orbiting-body {
  width: 8px;
  height: 8px;
  background: var(--modern-cyan);
  color: var(--modern-cyan);
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-2 .orbiting-body {
  width: 6px;
  height: 6px;
  background: var(--ancient-gold);
  color: var(--ancient-gold);
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
}

.orbit-3 .orbiting-body {
  width: 10px;
  height: 10px;
  background: var(--stellar-purple);
  color: var(--stellar-purple);
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
}

/* Floating stars */
.floating-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.9; }
}

.intro-content {
  position: relative;
  z-index: 3;
}

.main-title {
  font-family: "Playfair Display", serif;
  font-size: 5.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #e0e0ff 25%,
    var(--nebula-blue) 50%,
    var(--stellar-purple) 75%,
    #ffffff 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation:
    titleReveal 2s ease-out,
    gradientShift 8s ease-in-out infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(74, 144, 226, 0.5));
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes titleGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 30px rgba(74, 144, 226, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 50px rgba(74, 144, 226, 0.8));
  }
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    letter-spacing: 30px;
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    letter-spacing: normal;
    filter: blur(0);
  }
}

.subtitle {
  font-family: "Space Mono", monospace;
  font-size: 1.2rem;
  letter-spacing: 8px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2.5rem;
  animation: fadeInUp 1.5s ease-out 0.8s both;
  text-transform: uppercase;
}

.time-counter {
  font-family: "Space Mono", monospace;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  margin-bottom: 1rem;
  animation: fadeInUp 1.5s ease-out 1.2s both;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
}

.time-counter span {
  font-size: 1.6rem;
  font-weight: bold;
  background: linear-gradient(90deg, var(--modern-cyan), var(--nebula-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-prompt {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  animation: fadeInUp 1.5s ease-out 1.6s both;
  margin-top: 3rem;
  letter-spacing: 2px;
}

.scroll-prompt .arrow {
  display: block;
  font-size: 2rem;
  margin-top: 1rem;
  animation: bounce 2s ease-in-out infinite;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(15px);
    opacity: 1;
  }
}

/* Color variations for different eras */
.era-cosmic .era-info {
  border-color: var(--stellar-purple);
}
.era-cosmic .era-title {
  color: var(--stellar-purple);
}

.era-prehistoric .era-info {
  border-color: #8b4513;
}

.era-ancient .era-info {
  border-color: var(--ancient-gold);
}

.era-classical .era-info {
  border-color: #c19a6b;
}

.era-medieval .era-info {
  border-color: var(--medieval-bronze);
}

.era-renaissance .era-info {
  border-color: #da7422;
}

.era-industrial .era-info {
  border-color: var(--industrial-steel);
}

.era-modern .era-info {
  border-color: var(--nebula-blue);
}

.era-contemporary .era-info {
  border-color: var(--modern-cyan);
}

/* Responsive design */
@media (max-width: 968px) {
  .era-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .era-content.reverse {
    direction: ltr;
  }

  .main-title {
    font-size: 3.5rem;
  }

  .era-title {
    font-size: 2.5rem;
  }

  .era-section {
    padding: 4rem 2rem;
    min-height: auto;
  }

  .visual-decoration {
    font-size: 8rem;
  }

  .event-year {
    min-width: 100px;
    font-size: 0.85rem;
  }
}

/* Side Progress Tracker */
.progress-tracker {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.progress-tracker.visible {
  opacity: 1;
  pointer-events: auto;
}

.progress-track {
  position: relative;
  width: 3px;
  height: 400px;
  background: linear-gradient(
    to bottom,
    var(--stellar-purple) 0%,
    var(--nebula-blue) 15%,
    #8b4513 25%,
    var(--ancient-gold) 40%,
    var(--medieval-bronze) 55%,
    #da7422 65%,
    var(--industrial-steel) 80%,
    var(--modern-cyan) 100%
  );
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.progress-ball {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 30px rgba(255, 255, 255, 0.3);
  z-index: 2;
  transition: top 0.15s ease-out;
}

.progress-ball::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: var(--cosmic-black);
  border-radius: 50%;
}

.era-markers {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.era-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.era-marker:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(-50%) scale(1.3);
}

.era-marker.active {
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.era-marker-label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Space Mono", monospace;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  letter-spacing: 0.5px;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
  pointer-events: none;
}

.era-marker:hover .era-marker-label,
.era-marker.active .era-marker-label {
  opacity: 1;
}

.era-marker.active .era-marker-label {
  color: rgba(255, 255, 255, 0.9);
}

.progress-label-top,
.progress-label-bottom {
  font-family: "Space Mono", monospace;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
}

.progress-label-top {
  margin-bottom: 12px;
}

.progress-label-bottom {
  margin-top: 12px;
}

@media (max-width: 968px) {
  .progress-tracker {
    left: 10px;
  }

  .progress-track {
    height: 300px;
  }

  .era-marker-label {
    display: none;
  }

  .progress-label-top,
  .progress-label-bottom {
    font-size: 0.5rem;
  }
}

@media (max-width: 600px) {
  .progress-tracker {
    display: none;
  }
}

/* Final section */
.final-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem;
  position: relative;
  z-index: 2;
  margin-top: 0;
}

.final-content {
  max-width: 800px;
}

.final-title {
  font-family: "Playfair Display", serif;
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--modern-cyan), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.final-text {
  font-size: 1.4rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

/* ─── RADIO PLAYER ─────────────────────────────────────────────────────────── */
.sound-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.45rem 0.4rem 0.9rem;
    background: rgba(10, 10, 15, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 1px;
    backdrop-filter: blur(14px);
    transition: border-color 0.3s ease, background 0.3s ease;
    user-select: none;
    text-transform: uppercase;
}

.sound-btn:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(18, 18, 32, 0.95);
}

.sound-btn.muted {
    opacity: 0.45;
}

.sound-btn.muted #soundLabel {
    color: rgba(255, 255, 255, 0.3);
}

#soundLabel {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.3s ease;
    flex: 1;
}

.radio-icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.radio-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.radio-icon-btn#playPauseBtn {
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--ancient-gold);
}

.radio-icon-btn#playPauseBtn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--ancient-gold);
}

/* Volume slider */
.volume-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.volume-wrap svg {
    flex-shrink: 0;
    opacity: 0.45;
}

#volumeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

#volumeSlider:hover {
    background: rgba(255, 255, 255, 0.25);
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ancient-gold);
    cursor: pointer;
    transition: transform 0.15s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#volumeSlider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ancient-gold);
    border: none;
    cursor: pointer;
}

/* ─── BOOKMARK BUTTON ──────────────────────────────────────────────────────── */
.era-info {
    position: relative;
}

.bookmark-btn {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.era-info:hover .bookmark-btn {
    opacity: 1;
}

.bookmark-btn:hover {
    color: var(--ancient-gold);
    transform: scale(1.2);
}

.bookmark-btn.active {
    opacity: 1 !important;
    color: var(--ancient-gold);
}

/* ─── RESUME TOAST ─────────────────────────────────────────────────────────── */
.resume-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    background: rgba(10, 10, 20, 0.97);
    border: 1px solid var(--ancient-gold);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    max-width: 260px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.12), 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.resume-toast-eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.resume-toast-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--ancient-gold);
    margin-bottom: 0.85rem;
    line-height: 1.3;
}

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

.resume-btn {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
    padding: 0.45rem 0.8rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-transform: uppercase;
}

.resume-btn-go {
    background: var(--ancient-gold);
    color: #0a0a0f;
    font-weight: 700;
}

.resume-btn-go:hover {
    background: #e8c84a;
    transform: translateY(-1px);
}

.resume-btn-dismiss {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.resume-btn-dismiss:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ─── LAZY EVENT ITEMS ─────────────────────────────────────────────────────── */
.event-item {
    opacity: 0;
    transform: translateY(10px);
    transition: background 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
}

.event-item.revealed {
    opacity: 1;
    transform: translateY(0);
}
