:root {
  --red: #b91414;
  --red-hot: #ff2c24;
  --bone: #e7dfd4;
  --black: #050505;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #000;
  color: var(--bone);
  overflow: hidden;
  font-family: Georgia, 'Times New Roman', serif;
}

.image-page {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: #000;
}

.image-page picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.image-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(0,0,0,0.02), rgba(0,0,0,0.34) 86%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 9px);
  z-index: 1;
}

/* Invisible clickable area over the BACKSTAGE PASS already painted into the landing image.
   Hover effect is intentionally a loose, hazy glow instead of a hard rectangle. */
.pass-hotspot {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 79%;
  transform: translate(-50%, -50%);
  width: min(54vh, 680px);
  height: min(13vh, 170px);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.pass-hotspot::before,
.pass-hotspot::after {
  content: "";
  position: absolute;
  inset: -42%;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}

.pass-hotspot::before {
  background: radial-gradient(ellipse at center, rgba(255, 44, 36, .42) 0%, rgba(255, 44, 36, .22) 34%, rgba(185, 20, 20, .08) 58%, transparent 76%);
  filter: blur(22px);
}

.pass-hotspot::after {
  inset: -18%;
  background: radial-gradient(ellipse at center, rgba(255, 44, 36, .30) 0%, rgba(185, 20, 20, .14) 46%, transparent 72%);
  filter: blur(10px);
}

.pass-hotspot:hover::before,
.pass-hotspot:hover::after,
.pass-hotspot:focus-visible::before,
.pass-hotspot:focus-visible::after {
  opacity: 1;
  transform: scale(1.04);
  animation: passHaze 1.05s ease-in-out infinite alternate;
}

.pass-hotspot:focus-visible {
  outline: 2px solid rgba(255,44,36,.32);
  outline-offset: 18px;
}

@keyframes passHaze {
  from { filter: blur(18px) saturate(1.05); }
  to { filter: blur(30px) saturate(1.35); }
}

.soundcloud-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(18px, 4.5vh, 56px);
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px));
  padding: 12px;
  background: rgba(0,0,0,.58);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 0 28px rgba(0,0,0,.8), 0 0 22px rgba(185,20,20,.18);
  backdrop-filter: blur(3px);
}
.soundcloud-panel iframe {
  display: block;
  width: 100%;
  border: 0;
}
.soundcloud-credit {
  font-size: 10px;
  color: #cccccc;
  line-break: anywhere;
  word-break: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: Interstate, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Garuda, Verdana, Tahoma, sans-serif;
  font-weight: 100;
  margin-top: 6px;
}
.soundcloud-credit a {
  color: #cccccc;
  text-decoration: none;
}

.password-dialog {
  width: min(560px, calc(100vw - 28px));
  border: 1px solid rgba(255, 44, 36, .70);
  background: transparent;
  padding: 0;
  color: var(--bone);
}
.password-dialog::backdrop {
  background: rgba(0,0,0,.76);
  backdrop-filter: blur(2px);
}
.bouncer-card {
  margin: 0;
  padding: clamp(18px, 4vw, 34px);
  background:
    linear-gradient(rgba(5,5,5,.86), rgba(5,5,5,.94)),
    repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 1px, transparent 1px 8px);
  box-shadow: 0 0 30px rgba(0,0,0,.9), inset 0 0 30px rgba(185,20,20,.18);
}
.bouncer-bubble {
  position: relative;
  margin: 0 0 20px;
  padding: 18px 18px 16px;
  background: rgba(230, 223, 212, .92);
  color: #111;
  border: 3px solid #111;
  font-family: 'Courier New', monospace;
  box-shadow: 8px 8px 0 rgba(185,20,20,.66);
}
.bouncer-bubble::after {
  content: "";
  position: absolute;
  left: 38px;
  bottom: -20px;
  border-width: 20px 16px 0 0;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}
.bouncer-label {
  margin: 0 0 6px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: .12em;
  font-size: .8rem;
}
.bouncer-line {
  margin: 0;
  font-size: clamp(1.35rem, 4.7vw, 2.55rem);
  font-weight: 900;
}
.password-input {
  width: 100%;
  margin-top: 8px;
  padding: 16px 14px;
  border: 1px solid rgba(230,223,212,.64);
  background: rgba(0,0,0,.82);
  color: var(--bone);
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  outline: none;
}
.password-input:focus { border-color: var(--red-hot); box-shadow: 0 0 0 2px rgba(255,44,36,.25); }
.attempts { min-height: 1.2em; color: #d9d0c2; font-family: 'Courier New', monospace; }
.dialog-actions { display: flex; gap: 12px; padding: 0; margin: 18px 0 0; }
.dialog-actions button {
  flex: 1;
  padding: 13px 12px;
  border: 1px solid rgba(230,223,212,.55);
  background: rgba(0,0,0,.72);
  color: var(--bone);
  font-family: 'Courier New', monospace;
  font-weight: 900;
  cursor: pointer;
}
.submit-pass { color: var(--red-hot) !important; border-color: var(--red-hot) !important; }
.dialog-actions button:hover { filter: brightness(1.25); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (max-width: 700px) {
  .scene-image {
    object-fit: cover;
    object-position: center center;
  }

  .landing-page .pass-hotspot {
    top: 79%;
    width: min(48vh, 82vw);
    height: min(12vh, 148px);
  }

  .pass-hotspot::before { inset: -55%; }
  .pass-hotspot::after { inset: -28%; }
  .dialog-actions { flex-direction: column; }
}

/* --- Backstage soundcheck layer --- */
.backstage-page .image-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(185, 20, 20, .20), transparent 25%),
    radial-gradient(circle at 78% 28%, rgba(255, 44, 36, .10), transparent 22%);
  mix-blend-mode: screen;
  animation: redStageFlicker 4.7s infinite steps(1, end);
}

@keyframes redStageFlicker {
  0%, 100% { opacity: .48; }
  7% { opacity: .25; }
  9% { opacity: .62; }
  10% { opacity: .34; }
  22% { opacity: .52; }
  23% { opacity: .18; }
  24% { opacity: .55; }
  63% { opacity: .42; }
  64% { opacity: .68; }
}

.soundcheck-panel {
  position: absolute;
  z-index: 5;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, calc(100vw - 34px));
}

.soundcheck-sign {
  width: max-content;
  max-width: 100%;
  margin: 0 auto 8px;
  padding: 8px 18px;
  color: #ff2c24;
  background: rgba(0,0,0,.70);
  border: 1px solid rgba(255,44,36,.55);
  box-shadow: 0 0 22px rgba(185,20,20,.45), inset 0 0 16px rgba(185,20,20,.18);
  font-family: 'Courier New', monospace;
  font-weight: 900;
  letter-spacing: .14em;
  text-shadow: 0 0 10px rgba(255,44,36,.65);
  transform: rotate(-.5deg);
}

.red-dot {
  display: inline-block;
  width: .65em;
  height: .65em;
  margin: 0 .5em;
  border-radius: 50%;
  background: #ff2c24;
  box-shadow: 0 0 14px #ff2c24;
  animation: liveBlink 1.1s infinite alternate;
}

@keyframes liveBlink { from { opacity: .35; } to { opacity: 1; } }

.countdown {
  width: max-content;
  max-width: 100%;
  margin: 0 auto 10px;
  padding: 6px 14px;
  color: #e7dfd4;
  background: rgba(0,0,0,.62);
  border-left: 3px solid #b91414;
  border-right: 3px solid #b91414;
  font-family: 'Courier New', monospace;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}
.countdown strong { color: #ff2c24; text-shadow: 0 0 10px rgba(255,44,36,.8); }

.backstage-page .soundcloud-panel {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  padding: 12px;
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 0 28px rgba(0,0,0,.82), 0 0 26px rgba(185,20,20,.20);
  backdrop-filter: blur(4px);
}

.soundcheck-note {
  width: min(430px, 88vw);
  margin: 12px auto 0;
  padding: 12px 14px;
  color: #e7dfd4;
  background: rgba(8,8,8,.74);
  border: 1px solid rgba(231,223,212,.22);
  box-shadow: 5px 5px 0 rgba(185,20,20,.35);
  font-family: 'Courier New', monospace;
  line-height: 1.35;
  transform: rotate(.7deg);
}
.soundcheck-note b { color: #ff2c24; }
.soundcheck-note span { color: #bfb6aa; }

.accepted-stamp {
  position: absolute;
  z-index: 5;
  top: clamp(18px, 4vh, 48px);
  right: clamp(18px, 4vw, 56px);
  padding: 10px 14px;
  color: rgba(255,44,36,.92);
  border: 2px solid rgba(255,44,36,.65);
  font-family: 'Courier New', monospace;
  font-weight: 900;
  letter-spacing: .12em;
  background: rgba(0,0,0,.35);
  transform: rotate(4deg);
  text-shadow: 0 0 12px rgba(255,44,36,.55);
  box-shadow: inset 0 0 12px rgba(185,20,20,.20);
}

.ambience-toggle {
  position: absolute;
  z-index: 6;
  right: clamp(14px, 3vw, 42px);
  bottom: clamp(14px, 3vh, 38px);
  padding: 10px 12px;
  border: 1px solid rgba(255,44,36,.56);
  background: rgba(0,0,0,.72);
  color: #ff2c24;
  font-family: 'Courier New', monospace;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(185,20,20,.25);
}
.ambience-toggle:hover { filter: brightness(1.25); }

.hidden-hotspot {
  position: absolute;
  z-index: 4;
  border: 0;
  background: transparent;
  cursor: help;
}
.hidden-hotspot:hover {
  background: radial-gradient(circle, rgba(255,44,36,.14), transparent 62%);
  filter: blur(.2px);
}
.curtain-hotspot { top: 16%; left: 45%; width: 15%; height: 48%; }
.case-hotspot { top: 43%; left: 58%; width: 22%; height: 33%; }

.whisper {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%) translateY(12px);
  width: min(640px, calc(100vw - 34px));
  padding: 14px 18px;
  opacity: 0;
  pointer-events: none;
  color: #e7dfd4;
  background: rgba(0,0,0,.78);
  border: 1px solid rgba(255,44,36,.45);
  font-family: 'Courier New', monospace;
  text-align: center;
  letter-spacing: .04em;
  box-shadow: 0 0 28px rgba(185,20,20,.35);
  transition: opacity .25s ease, transform .25s ease;
}
.whisper.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.entry-flash {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.68);
  color: #ff2c24;
  font-family: 'Courier New', monospace;
  font-size: clamp(1.2rem, 4vw, 2.6rem);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 0 18px rgba(255,44,36,.85);
  transition: opacity .7s ease, visibility .7s ease;
}
.entry-flash.fade-out { opacity: 0; visibility: hidden; }

@media (max-width: 700px) {
  .soundcheck-panel {
    top: 34%;
    width: calc(100vw - 22px);
  }
  .soundcheck-sign {
    font-size: .78rem;
    letter-spacing: .08em;
    padding: 7px 10px;
  }
  .countdown { font-size: .78rem; }
  .soundcheck-note { font-size: .78rem; }
  .accepted-stamp {
    top: 12px;
    right: 12px;
    font-size: .72rem;
    max-width: 44vw;
  }
  .ambience-toggle { font-size: .78rem; }
  .backstage-page .soundcloud-panel iframe { height: 130px; }
}


/* Password lockout shake after three wrong guesses */
.locked-out .image-page {
  animation: marqueeShake .4s ease-in-out 4;
  filter: brightness(.72) saturate(.9);
}

@keyframes marqueeShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}
