/* ============================
   DOKI DOKI HORROR × ABANDONED HOSPITAL
   ============================ */

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

:root {
  --bg-dark: #0a0a0e;
  --bg-hall: #0d0d12;
  --corridor-wall: #1a1520;
  --corridor-floor: #0f0c14;
  --pink: #f7a8b8;
  --pink-dark: #c4607a;
  --red: #ff2244;
  --red-dim: #881122;
  --cyan: #44ddff;
  --white: #e8e0f0;
  --paper: #f5f0e8;
  --paper-shadow: #d4c8b0;
  --teal: #00ccaa;
  --glitch-r: #ff0044;
  --glitch-b: #0044ff;
  --font-serif: 'Playfair Display', 'Noto Serif', 'Georgia', serif;
  --font-mono: 'Press Start 2P', monospace;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--white);
  font-family: var(--font-serif);
}

/* ===== SCANLINES ===== */
.scanlines {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.15) 0px,
    rgba(0,0,0,0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.6;
}

/* ===== NOISE CANVAS ===== */
#noiseCanvas {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* ===== DUST PARTICLES ===== */
#dustCanvas {
  position: fixed; inset: 0; z-index: 10;
  pointer-events: none;
  opacity: 0.5;
}

/* ===== SCREENS ===== */
.screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s 1.2s;
  z-index: 1;
}
.screen.active {
  opacity: 1; visibility: visible;
  transition: opacity 1.2s ease, visibility 0s;
  z-index: 5;
}

/* ===== SCREEN: INTRO / CORRIDOR ===== */
.corridor-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #0a0810 0%, #1a1028 50%, #0d0a12 100%);
  overflow: hidden;
}
.corridor-wall {
  position: absolute; bottom: 35%; left: 0; right: 0; height: 65%;
  background: linear-gradient(180deg,
    #15101c 0%, #1e1528 40%, #251a32 100%
  );
  border-bottom: 2px solid #2a1e3a;
}
.corridor-wall::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 120px,
    rgba(100,60,120,0.08) 120px, rgba(100,60,120,0.08) 122px
  );
}
.corridor-wall::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 2px; height: 40%;
  background: rgba(255,100,150,0.15);
}
.corridor-floor {
  position: absolute; bottom: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(180deg, #1a1420 0%, #0e0a10 100%);
  transform: perspective(400px) rotateX(20deg);
  transform-origin: top center;
}
.flickering-light {
  position: absolute;
  top: 8%; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow:
    0 0 20px 10px rgba(247,168,184,0.3),
    0 0 80px 40px rgba(247,168,184,0.1),
    0 0 200px 100px rgba(247,168,184,0.05);
  animation: flicker 4s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.8; }
  5% { opacity: 0.2; }
  6% { opacity: 0.8; }
  40% { opacity: 0.9; }
  41% { opacity: 0.3; }
  42% { opacity: 0.85; }
  70% { opacity: 0.7; }
  71% { opacity: 0.1; }
  72% { opacity: 0.9; }
}

/* Title card */
.title-card {
  position: relative; z-index: 2;
  text-align: center;
  padding: 2rem;
}

.title-glitch {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 8vw, 5rem);
  color: var(--pink);
  text-shadow:
    0 0 10px rgba(247,168,184,0.5),
    0 0 40px rgba(247,168,184,0.2);
  position: relative;
  animation: titlePulse 3s ease-in-out infinite;
  cursor: pointer;
}
.title-glitch::before,
.title-glitch::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.title-glitch::before {
  color: var(--glitch-r);
  animation: glitch1 3s infinite;
}
.title-glitch::after {
  color: var(--glitch-b);
  animation: glitch2 3s infinite;
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 10px rgba(247,168,184,0.5), 0 0 40px rgba(247,168,184,0.2); }
  50% { text-shadow: 0 0 20px rgba(247,168,184,0.8), 0 0 80px rgba(247,168,184,0.4); }
}
@keyframes glitch1 {
  0%, 90%, 100% { opacity: 0; transform: translate(0); }
  91% { opacity: 0.8; transform: translate(-3px, 1px); }
  93% { opacity: 0; }
  95% { opacity: 0.6; transform: translate(2px, -1px); }
  97% { opacity: 0; }
}
@keyframes glitch2 {
  0%, 88%, 100% { opacity: 0; transform: translate(0); }
  89% { opacity: 0.7; transform: translate(3px, -1px); }
  92% { opacity: 0; }
  96% { opacity: 0.5; transform: translate(-2px, 1px); }
  98% { opacity: 0; }
}

.title-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  color: rgba(247,168,184,0.6);
  margin-top: 0.5rem;
}

.title-warning {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(247,168,184,0.4);
  margin-top: 3rem;
  letter-spacing: 0.15em;
  animation: blink 2s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.heartbeat-line {
  margin-top: 2rem;
  width: 300px;
  height: 40px;
  margin-left: auto; margin-right: auto;
  opacity: 0.4;
}
.heartbeat-line svg {
  width: 100%; height: 100%;
}
.heartbeat {
  fill: none;
  stroke: var(--pink-dark);
  stroke-width: 1.5;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawHeartbeat 3s linear infinite;
}
@keyframes drawHeartbeat {
  to { stroke-dashoffset: 0; }
}

/* ===== SCREEN: HALLWAY ===== */
.hallway-scene {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2rem;
}
.hallway-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(100,50,80,0.15) 0%, transparent 60%),
    linear-gradient(180deg, #0a0812 0%, #140e1e 100%);
}

.door-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 500px; width: 90%;
}

.door {
  background: linear-gradient(160deg, #1a1424 0%, #0e0a14 100%);
  border: 1px solid #2a2035;
  border-radius: 4px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.door::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(247,168,184,0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.door:hover {
  border-color: var(--pink-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(247,168,184,0.15);
}
.door:hover::before { opacity: 1; }

.door.locked {
  opacity: 0.4;
  cursor: default;
  border-style: dashed;
}
.door.locked:hover {
  transform: none;
  border-color: #2a2035;
  box-shadow: none;
}

.door-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}
.door-number {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(247,168,184,0.4);
}

.hallway-text {
  position: relative; z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(247,168,184,0.6);
  text-align: center;
  min-height: 1.5em;
}

/* Typewriter cursor */
.typewriter::after {
  content: '█';
  animation: blinkCursor 0.7s step-end infinite;
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== ROOMS COMMON ===== */
.room-scene {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.room-scene::-webkit-scrollbar { width: 4px; }
.room-scene::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.room-scene::-webkit-scrollbar-thumb { background: var(--pink-dark); border-radius: 2px; }

.back-btn {
  position: sticky; top: 1rem;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(247,168,184,0.5);
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(247,168,184,0.2);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s;
  z-index: 10;
}
.back-btn:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.room-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--pink);
  margin: 2rem 0;
  text-shadow: 0 0 20px rgba(247,168,184,0.3);
  letter-spacing: 0.1em;
}

/* ===== ART GALLERY ===== */
.art-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 900px;
  width: 100%;
  padding: 1rem 0;
}

.art-card {
  background: rgba(0,0,0,0.4);
  border: 1px solid #2a1e3a;
  border-radius: 4px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(247,168,184,0.1);
}

.art-frame {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--paper);
  border: 6px solid var(--paper-shadow);
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.1),
    0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.art-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}

/* Scribble art styles — progressive improvement */
.draw-scribble {
  width: 80%; height: 50%;
  position: relative;
}
.scribble-1 {
  background:
    linear-gradient(45deg, transparent 40%, var(--red-dim) 40%, var(--red-dim) 42%, transparent 42%),
    linear-gradient(-30deg, transparent 50%, #333 50%, #333 53%, transparent 53%),
    linear-gradient(80deg, transparent 30%, #555 30%, #555 32%, transparent 32%);
  opacity: 0.5;
  filter: blur(0.5px);
}
.scribble-1::after {
  content: '';
  position: absolute; bottom: 10%; left: 15%;
  width: 70%; height: 3px;
  background: var(--red-dim);
  transform: rotate(-2deg);
  opacity: 0.4;
}
.scribble-2 {
  background:
    radial-gradient(ellipse at 40% 40%, var(--pink) 8%, transparent 9%),
    radial-gradient(ellipse at 60% 45%, var(--pink) 6%, transparent 7%),
    linear-gradient(170deg, transparent 20%, rgba(100,60,120,0.3) 20%, rgba(100,60,120,0.3) 22%, transparent 22%),
    linear-gradient(10deg, transparent 40%, rgba(80,60,100,0.3) 40%, rgba(80,60,100,0.3) 42%, transparent 42%),
    linear-gradient(180deg, transparent 60%, rgba(60,40,80,0.4) 60%, rgba(60,40,80,0.4) 62%, transparent 62%);
}
.scribble-3 {
  background:
    radial-gradient(ellipse at 50% 35%, var(--pink) 15%, transparent 16%),
    radial-gradient(ellipse at 42% 30%, #222 3%, transparent 4%),
    radial-gradient(ellipse at 58% 30%, #222 3%, transparent 4%),
    linear-gradient(180deg, transparent 55%, rgba(150,80,120,0.5) 55%, rgba(150,80,120,0.5) 58%, transparent 58%),
    linear-gradient(90deg, transparent 35%, rgba(120,70,100,0.3) 35%, rgba(120,70,100,0.3) 65%, transparent 65%);
  filter: none;
}

.draw-label {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.5rem;
}
.draw-year {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: #999;
  margin-top: 0.25rem;
}

.art-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(247,168,184,0.6);
  margin-top: 1rem;
  line-height: 1.5;
}

.art-note {
  max-width: 600px;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(247,168,184,0.4);
  line-height: 1.6;
}
.art-note-glitch {
  margin-top: 0.5rem;
}

/* ===== STORY ===== */
.story-scroll {
  max-width: 600px;
  width: 100%;
  padding: 1rem 0;
}
.story-page {
  padding: 1.5rem 0;
}
.story-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--paper);
  margin-bottom: 0.5rem;
}
.story-divider {
  text-align: center;
  color: rgba(247,168,184,0.3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1rem 0;
  letter-spacing: 0.3em;
}
.glitch-divider {
  color: var(--red-dim);
  animation: textGlitch 5s infinite;
}

.name-highlight {
  color: var(--pink);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(247,168,184,0.3);
}
.text-crack {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-color: var(--red-dim);
}
.text-glow {
  color: var(--teal);
  text-shadow: 0 0 10px rgba(0,204,170,0.5);
}
.redacted {
  background: var(--red);
  color: var(--red);
  padding: 0 0.3em;
  cursor: pointer;
  transition: all 0.5s;
  user-select: none;
}
.redacted:hover {
  background: transparent;
  color: var(--red);
}

.corrupted-text {
  color: rgba(255,34,68,0.7);
  font-size: 0.9rem;
  animation: textGlitch 4s infinite;
}

.story-glitch-page {
  background: rgba(255,0,0,0.03);
  border-left: 2px solid var(--red-dim);
  padding-left: 1rem;
  margin-left: 0;
}

@keyframes textGlitch {
  0%, 87%, 100% { opacity: 1; transform: translate(0); }
  88% { opacity: 0.8; transform: translate(2px, 0); }
  89% { opacity: 1; transform: translate(-1px, 0); }
  90% { opacity: 0.9; transform: translate(0, 1px); }
}

/* ===== GLITCH ROOM 103 ===== */
.glitch-room {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,0,0,0.02) 0px,
      rgba(255,0,0,0.02) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(180deg, #0a0008 0%, #14000a 100%);
}

@keyframes titleShake {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, 0); }
}

.glitch-content {
  width: 100%; max-width: 600px;
  display: flex; flex-direction: column;
  align-items: center; gap: 2rem;
}

.corrupted-messages {
  text-align: center;
}
.corrupted-messages p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,34,68,0.7);
  margin: 0.8rem 0;
  opacity: 0;
  transition: opacity 1s;
}
.corrupted-messages p.visible {
  opacity: 1;
}

/* Eye */
.eye-container {
  width: 100px; height: 100px;
  margin: 1rem 0;
  opacity: 0;
  transition: opacity 2s;
}
.eye-container.visible { opacity: 1; }

.eye {
  width: 100%; height: 100%;
  animation: eyeFloat 3s ease-in-out infinite;
}
@keyframes eyeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.eye-white {
  width: 100%; height: 60%;
  background: #f0ece4;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 30px rgba(255,34,68,0.3),
    inset 0 0 10px rgba(0,0,0,0.2);
}
.eye-iris {
  width: 36px; height: 36px;
  background: radial-gradient(circle, var(--pink) 30%, var(--red) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: irisTrack 4s ease-in-out infinite;
}
.eye-pupil {
  width: 14px; height: 14px;
  background: #0a0008;
  border-radius: 50%;
}
@keyframes irisTrack {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(4px, -2px); }
  50% { transform: translate(-2px, 3px); }
  75% { transform: translate(3px, 1px); }
}

/* Final message & choices */
.final-message {
  text-align: center;
  opacity: 0;
  transition: opacity 2s;
}
.final-message.visible { opacity: 1; }
.final-message p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--paper);
  margin: 0.5rem 0;
  line-height: 1.8;
}
.choice-text {
  font-style: italic;
  color: rgba(247,168,184,0.7) !important;
}

.choice-buttons {
  display: flex; gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.choice-btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: 1px solid var(--pink-dark);
  color: var(--pink);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s;
  letter-spacing: 0.05em;
}
.choice-btn:hover {
  background: rgba(247,168,184,0.1);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(247,168,184,0.2);
}

.ending {
  text-align: center;
  opacity: 0;
  transition: opacity 2s;
}
.ending.visible { opacity: 1; }
.ending p {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--paper);
  margin: 0.5rem 0;
  line-height: 1.8;
}

/* ===== JUMPSCARE ===== */
.jumpscare-overlay {
  position: fixed; inset: 0;
  z-index: 100000;
  display: none;
  align-items: center; justify-content: center;
  background: #000;
}
.jumpscare-overlay.active {
  display: flex;
}

.jumpscare-screen {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #0a0000;
  overflow: hidden;
}

.jumpscare-static {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,0,0,0.08) 0px,
    rgba(255,0,0,0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: staticFlicker 0.1s steps(3) infinite;
  z-index: 1;
}
@keyframes staticFlicker {
  0% { opacity: 0.8; transform: translateY(0); }
  33% { opacity: 1; transform: translateY(-1px); }
  66% { opacity: 0.6; transform: translateY(1px); }
  100% { opacity: 0.9; transform: translateY(0); }
}

.jumpscare-monika {
  position: relative; z-index: 2;
  animation: monikaSlam 0.15s ease-out forwards;
  transform-origin: center center;
}
@keyframes monikaSlam {
  0% { transform: scale(3) rotate(5deg); opacity: 0; }
  60% { transform: scale(1.05) rotate(-1deg); opacity: 1; }
  80% { transform: scale(0.98) rotate(0.5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.monika-svg {
  width: min(350px, 70vw);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255,0,0,0.6));
  animation: monikaShake 0.08s steps(2) infinite;
}
@keyframes monikaShake {
  0% { transform: translate(0,0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 3px); }
  100% { transform: translate(3px, -2px); }
}

/* Glitch lines on Monika */
.glitch-line { animation: glitchLineMove 0.3s steps(2) infinite; }
.gl1 { animation-delay: 0s; }
.gl2 { animation-delay: 0.1s; }
.gl3 { animation-delay: 0.05s; }
@keyframes glitchLineMove {
  0% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(15px); opacity: 1; }
  100% { transform: translateX(-10px); opacity: 0.4; }
}

.monika-text {
  position: absolute;
  bottom: 8%;
  left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 3vw, 1.1rem);
  color: #ff0000;
  text-shadow:
    0 0 10px #ff0000,
    0 0 40px #ff0000,
    0 0 80px #ff0000;
  white-space: nowrap;
  animation: textFlicker 0.15s steps(2) infinite;
  letter-spacing: 0.15em;
}
@keyframes textFlicker {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.jumpscare-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(150,0,0,0.7) 100%);
  z-index: 3;
  pointer-events: none;
  animation: vignettePulse 0.5s ease-in-out infinite alternate;
}
@keyframes vignettePulse {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* ===== SECRET ROOM 104 ===== */
.secret-title {
  color: var(--teal) !important;
  text-shadow: 0 0 20px rgba(0,204,170,0.3) !important;
}
.secret-content {
  max-width: 550px;
  width: 100%;
}

.patient-file {
  background: var(--paper);
  color: #333;
  padding: 2rem;
  font-family: var(--font-serif);
  border: 1px solid var(--paper-shadow);
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transform: rotate(-0.5deg);
}
.file-header {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.file-body p {
  font-size: 0.85rem;
  margin: 0.4rem 0;
  line-height: 1.6;
}
.file-note {
  font-style: italic;
  color: #666;
  font-size: 0.8rem !important;
}
.file-stamp {
  position: absolute;
  top: 50%; right: 10%;
  transform: translateY(-50%) rotate(-15deg);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--teal);
  border: 3px solid var(--teal);
  padding: 0.3rem 1rem;
  opacity: 0.6;
  letter-spacing: 0.2em;
}

.secret-final {
  margin-top: 3rem;
  text-align: center;
}
.secret-final p {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: rgba(247,168,184,0.6);
  margin: 0.5rem 0;
  line-height: 1.8;
}

/* ===== SOUND HINT ===== */
.sound-hint {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: rgba(247,168,184,0.3);
  z-index: 100;
  cursor: pointer;
  transition: color 0.3s;
}
.sound-hint:hover { color: var(--pink); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .door-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .art-gallery { grid-template-columns: 1fr; }
  .choice-buttons { flex-direction: column; align-items: center; }
  .room-scene { padding: 1rem; }
}

/* ===== GLOBAL GLITCH OVERLAY (triggered by JS) ===== */
body.glitching .scanlines {
  opacity: 1;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,0,0,0.1) 0px,
    rgba(255,0,0,0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: scanlineGlitch 0.1s infinite;
}
@keyframes scanlineGlitch {
  0% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-1px); }
}

/* Flash effect */
.flash-overlay {
  position: fixed; inset: 0;
  background: white;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  animation: flash 0.3s ease-out;
}
@keyframes flash {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}
