:root {
  color-scheme: dark;
  font-family: "Space Grotesk", "Manrope", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  background: #060c19;
  color: #e7edf4;
  --panel: rgba(10, 16, 28, 0.8);
  --border: rgba(255, 255, 255, 0.08);
  --muted: rgba(231, 237, 244, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(92, 240, 196, 0.07), transparent 38%),
    radial-gradient(circle at 80% 0%, rgba(92, 160, 240, 0.1), transparent 32%),
    linear-gradient(145deg, #03060d, #0a1324 60%, #050a14);
}

.gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(92, 240, 196, 0.06), transparent 30%);
  pointer-events: none;
}

.layout {
  position: relative;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.lede {
  margin: 0.75rem 0 0;
  max-width: 66ch;
  color: var(--muted);
}

.main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stage {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: 0 18px 90px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.mode-switch {
  display: inline-flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.frame {
  position: relative;
  width: 100%;
  min-height: 320px;
  background: #04070f;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timelapse {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

.raw-image {
  object-fit: contain;
  min-height: 320px;
}

.raw-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 12, 24, 0.75);
  color: #f5fbff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.image-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.image-arrow-prev {
  left: 0.8rem;
}

.image-arrow-next {
  right: 0.8rem;
}

.controls {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.controls.single {
  justify-content: space-between;
}

.timeline-controls {
  display: grid;
  gap: 0.6rem;
}

.scrubber-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
}

input[type="range"] {
  width: 100%;
}

input[type="date"] {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  background: #0d192b;
  color: #f5fbff;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.button {
  border: 1px solid var(--border);
  background: #0d192b;
  color: #f5fbff;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  transition: transform 120ms ease, border-color 150ms ease, box-shadow 150ms ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.mode-toggle {
  padding: 0.7rem 0.95rem;
}

.mode-toggle.is-active {
  border-color: rgba(92, 240, 196, 0.7);
  box-shadow: 0 0 0 1px rgba(92, 240, 196, 0.3) inset;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 40px rgba(5, 12, 24, 0.5);
}

.button:active {
  transform: translateY(0);
}

.note {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.status {
  min-height: 1.5em;
}

@media (max-width: 840px) {
  .layout {
    padding: 2.5rem 1rem 2rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }
}
