* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: transparent;
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shell {
  position: relative; /* for overlay arrows */
  width: 1480px;
  max-width: 98vw;
  height: 700px;
  max-height: 96vh;
  background: radial-gradient(circle at top, #111827 0, #020617 60%);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 1px 30px rgba(15, 23, 42, 0.9);
  padding: 20px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.title {
  font-size: 20px;
  font-weight: 600;
}

.subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.index-indicator {
  font-size: 12px;
  color: #9ca3af;
}

.viewport {
  position: relative;
  flex: 1;
  margin-top: 6px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top, #020617 0, #020617 60%);
  overflow: hidden;
  padding: 40px 0;
  perspective: 1000px;
}

.track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

/* Card: 800x460 with full image and text overlay */
.event-card {
  position: absolute;
  width: 800px;
  max-width: 80vw;
  height: 460px;
  border-radius: 14px;
  background: #212e64;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
  transform-origin: center center;
  text-align: left;
  overflow: hidden;
  pointer-events: auto;
}

.event-card--first {
  border-color: #f97316;
  box-shadow: 0 18px 40px rgba(248, 113, 22, 0.4);
}

/* First card highlight when it's front-most */
.event-card--first.is-front {
  transform: scale(1.06) translateZ(6px);
  box-shadow:
    0 0 0 1px rgba(248, 113, 22, 0.9),
    0 22px 50px rgba(248, 113, 22, 0.6);
}

.event-media {
  position: absolute;
  inset: 0;
}

.event-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 16px 18px 18px;

  /* gradient over image for readability */
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.7) 55%,
    transparent 70%
  );
}

/* Text styles */
.event-year {
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cbd5f5;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.9);
}

.event-title {
  font-size: 26px;
  font-weight: 600;
  color: #e5edff;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(15, 23, 42, 0.9);
}

/* Body text – scrollable if too long */
.event-body {
  font-size: 18px;
  line-height: 1.6;
  color: #e5e7eb;
  margin-top: 4px;
  margin-bottom: 30px;

  max-height: 210px;
  overflow-y: auto;
  padding-right: 6px;

  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.9);
}

/* Intro / Begin button */
.begin-button {
  margin-top: 16px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.85);
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.begin-button:hover {
  background: #f97316;
  border-color: #fed7aa;
  color: #111827;
}

.begin-button:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 3px;
}

.begin-button-icon {
  font-size: 16px;
}

/* Navigation arrows overlay */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out,
    background 0.18s ease-out;
}

.nav-arrow--left {
  left: 18px;
}

.nav-arrow--right {
  right: 18px;
}

/* Show arrows when hovering the shell */
.shell:hover .nav-arrow {
  opacity: 1;
  pointer-events: auto;
}

.nav-arrow:hover {
  transform: translateY(-50%) scale(1.06);
  background: rgba(15, 23, 42, 0.95);
}

.nav-arrow-icon {
  font-size: 20px;
  line-height: 1;
}

/* Footer */
.footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.key-hint span {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin: 0 2px;
}

/* Small-screen fallback */
@media (max-width: 900px) {
  .shell {
    height: 90vh;
    padding: 14px 14px 16px;
  }
}

