:root {
  --navy: #123a6b;
  --green: #5fa82a;
  --transition-ms: 900ms;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body.cursor-hidden,
body.cursor-hidden * {
  cursor: none !important;
}

#stage {
  position: fixed;
  inset: 0;
}

/* ---------- Ad layers (two at a time while transitioning) ---------- */
.layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  transition: opacity var(--transition-ms) ease, transform var(--transition-ms) cubic-bezier(0.65, 0, 0.35, 1);
}

.layer.in {
  opacity: 1;
  z-index: 2;
}

.layer.out {
  z-index: 1;
}

body.t-fade .layer.out {
  opacity: 0;
}

body.t-slide .layer {
  opacity: 1;
  transform: translateX(100%);
}
body.t-slide .layer.in {
  transform: translateX(0);
}
body.t-slide .layer.out {
  transform: translateX(-100%);
}

body.t-none .layer {
  transition: none;
}

.layer img,
.layer video {
  width: 100%;
  height: 100%;
  display: block;
}

.fit-cover img,
.fit-cover video {
  object-fit: cover;
}

.fit-contain img,
.fit-contain video {
  object-fit: contain;
}

/* ---------- Background music player ---------- */
/* Kept inside the viewport (browsers pause muted video that's off-screen) but
   invisible behind the ads, and never in the way of the fullscreen click. */
.music {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: -1;
  width: 200px;
  height: 200px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Idle screen (no active ads) ---------- */
.idle {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 30% 20%, #1e4fa0 0%, var(--navy) 55%, #0a2345 100%);
}

.idle[hidden] {
  display: none;
}

.idle h1 {
  margin: 0 0 3vh;
  font-size: 9vmin;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.idle h1::after {
  content: '';
  display: block;
  width: 14vmin;
  height: 1vmin;
  border-radius: 1vmin;
  margin: 3vh auto 0;
  background: var(--green);
}

.idle p {
  margin: 0;
  font-size: 3.6vmin;
  opacity: 0.85;
}

.idle-clock {
  position: absolute;
  bottom: 5vh;
  right: 5vw;
  font-size: 4vmin;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* ---------- Fullscreen hint ---------- */
.hint {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 4vh;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

.hint.show {
  opacity: 1;
}
