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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Courier New', monospace;
}

#stage {
  position: relative;
  width: 100%;
  height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}

.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.scene.active {
  display: flex;
}

/* ===========================================================
   STAGE 1 — Frame animation
=========================================================== */
#scene-animation {
  background: #000;
}

#frame-display {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

/* ===========================================================
   STAGE 2 — Message box
=========================================================== */
#message-box {
  width: 85%;
  max-width: 380px;
  background: #fff8ec;
  border: 4px solid #1a1712;
  border-radius: 6px;
  padding: 24px 20px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#message-text {
  font-size: 15px;
  line-height: 1.6;
  color: #1a1712;
  overflow-y: auto;
  max-height: 50vh;
  white-space: pre-line;
}

#reveal-btn {
  align-self: center;
  background: #f4b942;
  border: 3px solid #1a1712;
  border-radius: 6px;
  padding: 10px 22px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  color: #1a1712;
}

#reveal-btn:active {
  transform: scale(0.96);
}

/* ===========================================================
   STAGE 3 — Audio reveal
=========================================================== */
#scene-reveal {
  background: #000;
}

#reveal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#pulse-heart {
  width: 140px;
  height: auto;
  animation: pulse 1.2s ease-in-out infinite;
  image-rendering: pixelated;
}

#reveal-caption {
  color: #f4ead9;
  font-size: 16px;
  letter-spacing: 1px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
