/* ================================================
   Disha's Pixel Night — a tiny world
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050818;
  color: #f3e2b8;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 20px;
  -webkit-font-smoothing: none;
  font-smooth: never;
  image-rendering: pixelated;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><rect x='6' y='0' width='4' height='2' fill='%23f5c76e'/><rect x='4' y='2' width='8' height='2' fill='%23f5c76e'/><rect x='2' y='4' width='12' height='2' fill='%23f5c76e'/><rect x='0' y='6' width='16' height='4' fill='%23f5c76e'/><rect x='2' y='10' width='12' height='2' fill='%23f5c76e'/><rect x='4' y='12' width='8' height='2' fill='%23f5c76e'/><rect x='6' y='14' width='4' height='2' fill='%23f5c76e'/></svg>") 8 8, auto;
}

img, canvas {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

/* ================================================
   The world
   ================================================ */
#world {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #050818;
}

/* Camera: contains all scenes stacked; we translate this vertically to move between areas */
#camera {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 700vh; /* 7 scenes: opening, music, stars, wish, constellation, letter, secret+final */
  transition: transform 2.6s cubic-bezier(0.65, 0.02, 0.35, 1);
  will-change: transform;
}

.scene {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#scene-opening      { top: 0; }
#scene-music        { top: 100vh; }
#scene-stars        { top: 200vh; }
#scene-wish         { top: 300vh; }
#scene-constellation { top: 400vh; }
#scene-letter       { top: 500vh; }
#scene-secret       { top: 600vh; }

/* Background image — used in every scene so the world feels continuous */
.scene .bg {
  position: absolute;
  inset: 0;
  background-image: url('scene_main.png');
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}
/* Sky scenes crop to upper portion of the bg so it looks like just sky */
#scene-stars .bg,
#scene-wish .bg,
#scene-constellation .bg {
  background-position: center 20%;
  background-size: 130% auto;
  filter: brightness(0.85);
}
#scene-stars .bg::after,
#scene-wish .bg::after,
#scene-constellation .bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,8,24,0.3) 0%, rgba(10,16,48,0.15) 40%, rgba(10,16,48,0.4) 100%);
}

/* Sky-scene stars overlay (extra tiny twinkling stars) */
.sky-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sky-stars .tiny {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #f3e2b8;
  box-shadow: 0 0 3px rgba(243, 226, 184, 0.7);
  opacity: 0.75;
  animation: twinkle 3s infinite ease-in-out;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

/* Fireflies */
.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #f5c76e;
  border-radius: 0; /* pixel */
  box-shadow: 0 0 8px rgba(245, 199, 110, 0.9), 0 0 16px rgba(245, 199, 110, 0.5);
  animation: drift 8s infinite ease-in-out;
  pointer-events: none;
}
@keyframes drift {
  0%   { transform: translate(0, 0);       opacity: 0.4; }
  25%  { transform: translate(20px, -15px); opacity: 1;   }
  50%  { transform: translate(-10px, -30px); opacity: 0.6; }
  75%  { transform: translate(15px, -18px); opacity: 1;   }
  100% { transform: translate(0, 0);       opacity: 0.4; }
}

/* ================================================
   Characters (Netra + Disha)
   ================================================ */
.couple {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  animation: sway 5s infinite ease-in-out;
  transform-origin: bottom center;
}
@keyframes sway {
  0%, 100% { transform: rotate(-1deg) translateY(0); }
  50%      { transform: rotate(1deg)  translateY(-2px); }
}
.couple canvas { display: block; }

/* ================================================
   Pixel text
   ================================================ */
.pixel-heading {
  font-family: 'Press Start 2P', monospace;
  color: #f5c76e;
  text-shadow:
    3px 3px 0 #0a0812,
    0 0 12px rgba(245, 199, 110, 0.5);
  letter-spacing: 2px;
  line-height: 1.6;
  white-space: pre-line;
}
.pixel-body {
  font-family: 'VT323', monospace;
  color: #f3e2b8;
  text-shadow: 2px 2px 0 #0a0812;
  line-height: 1.4;
  white-space: pre-line;
}
.pixel-small {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #d99cb6;
  text-shadow: 2px 2px 0 #0a0812;
  letter-spacing: 1px;
  line-height: 1.8;
  white-space: pre-line;
}

/* Opening scene text block */
.opening-text {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 30;
  pointer-events: none;
}
.opening-text .title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(28px, 5vw, 60px);
  color: #f5c76e;
  text-shadow:
    4px 4px 0 #0a0812,
    0 0 16px rgba(245, 199, 110, 0.6);
  letter-spacing: 4px;
  margin-bottom: 24px;
  animation: shimmer 3s infinite ease-in-out;
}
@keyframes shimmer {
  0%, 100% { text-shadow: 4px 4px 0 #0a0812, 0 0 16px rgba(245, 199, 110, 0.6); }
  50%      { text-shadow: 4px 4px 0 #0a0812, 0 0 28px rgba(245, 199, 110, 1); }
}
.opening-text .subtitle {
  font-family: 'VT323', monospace;
  font-size: clamp(18px, 2.2vw, 26px);
  color: #f3e2b8;
  text-shadow: 2px 2px 0 #0a0812;
  line-height: 1.5;
  white-space: pre-line;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeIn 1.8s 0.6s forwards;
}
.opening-text .instruction {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(10px, 1.4vw, 14px);
  color: #d99cb6;
  text-shadow: 2px 2px 0 #0a0812;
  letter-spacing: 2px;
  opacity: 0;
  animation: fadeIn 1.8s 1.4s forwards, pulseDelay 2.2s 3.2s infinite ease-in-out;
}
@keyframes pulseDelay {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes pulse  { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Click hint arrow */
.click-hint {
  position: absolute;
  inset: 0;
  z-index: 25;
  cursor: pointer;
}

/* ================================================
   Music scene
   ================================================ */
.music-heading {
  position: absolute;
  left: 4vw;
  top: 12vh;
  z-index: 30;
  pointer-events: none;
}
.music-heading .lbl {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #f5c76e;
  text-shadow: 2px 2px 0 #0a0812;
  line-height: 1.8;
  white-space: pre-line;
  letter-spacing: 2px;
}
.music-heading .heart {
  color: #d99cb6;
  margin-top: 10px;
  font-size: 18px;
}

/* Music player object in world */
.music-object {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  z-index: 20;
  cursor: pointer;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: drop-shadow(0 0 12px rgba(245, 199, 110, 0.4));
}
.music-object:hover {
  transform: translate(-50%, -50%) scale(1.06);
  filter: drop-shadow(0 0 20px rgba(245, 199, 110, 0.9));
}
.music-object.unlocked {
  animation: glowUnlocked 2.5s infinite ease-in-out;
}
@keyframes glowUnlocked {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(245, 199, 110, 0.5)); }
  50%      { filter: drop-shadow(0 0 32px rgba(245, 199, 110, 1)) drop-shadow(0 0 48px rgba(217, 156, 182, 0.6)); }
}
.music-tap {
  position: absolute;
  left: 50%;
  top: calc(55% + 60px);
  transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #d99cb6;
  text-shadow: 2px 2px 0 #0a0812;
  letter-spacing: 2px;
  z-index: 20;
  animation: pulse 2.2s infinite ease-in-out;
  pointer-events: none;
}

.music-hint {
  position: absolute;
  right: 4vw;
  top: 22vh;
  z-index: 30;
  max-width: 260px;
  pointer-events: none;
}
.music-hint .lbl {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #f3e2b8;
  text-shadow: 2px 2px 0 #0a0812;
  line-height: 1.4;
  white-space: pre-line;
}

/* ================================================
   Tracklist window (opens over the world)
   ================================================ */
.tracklist-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 24, 0.55);
  backdrop-filter: blur(2px);
}
.tracklist-overlay.open { display: flex; animation: fadeIn 0.5s ease forwards; }

.pixel-window {
  background: #0f1830;
  border: 4px solid #f5c76e;
  box-shadow:
    0 0 0 2px #0a0812,
    4px 4px 0 4px #0a0812,
    0 0 40px rgba(245, 199, 110, 0.35);
  min-width: 340px;
  max-width: 90vw;
  font-family: 'VT323', monospace;
  color: #f3e2b8;
}
.pixel-window .titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #1e2a4a;
  border-bottom: 2px solid #f5c76e;
}
.pixel-window .titlebar .title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #f5c76e;
  letter-spacing: 2px;
}
.pixel-window .titlebar .controls {
  display: flex;
  gap: 6px;
}
.pixel-window .titlebar .controls span {
  width: 14px;
  height: 14px;
  background: #f5c76e;
  color: #0f1830;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pixel-window .titlebar .controls span:hover { background: #d99cb6; }

.pixel-window .body { padding: 16px 20px; }

.tracklist ol { list-style: none; }
.tracklist li {
  display: grid;
  grid-template-columns: 32px 1fr 60px 24px;
  gap: 12px;
  align-items: center;
  padding: 6px 4px;
  font-size: 20px;
  color: #f3e2b8;
  border-bottom: 1px dashed rgba(245, 199, 110, 0.15);
}
.tracklist li .num { color: #f5c76e; }
.tracklist li .title { color: #f3e2b8; }
.tracklist li .dur   { color: #a68cc9; text-align: right; }
.tracklist li .heart { color: #d99cb6; text-align: right; }

.code-input {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  align-items: stretch;
}
.code-input input {
  flex: 1;
  padding: 10px 12px;
  background: #050818;
  border: 2px solid #f5c76e;
  color: #f3e2b8;
  font-family: 'VT323', monospace;
  font-size: 20px;
  letter-spacing: 2px;
  outline: none;
}
.code-input input:focus { border-color: #d99cb6; }
.code-input button {
  padding: 10px 16px;
  background: #f5c76e;
  color: #0f1830;
  border: 2px solid #0a0812;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  cursor: pointer;
  letter-spacing: 1px;
}
.code-input button:hover { background: #d99cb6; }
.code-msg {
  margin-top: 10px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  min-height: 22px;
  color: #d99cb6;
}
.code-msg.ok { color: #a3e0a0; }
.code-msg.err { color: #e0908f; }

.spotify-link {
  display: none;
  margin-top: 12px;
  padding: 10px 16px;
  background: #1DB954;
  color: #050818;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  text-decoration: none;
  border: 2px solid #0a0812;
  text-align: center;
  letter-spacing: 1px;
  animation: glowUnlocked 2s infinite ease-in-out;
}
.spotify-link.show { display: block; }
.spotify-link:hover { background: #1ed760; }

/* ================================================
   18 stars scene
   ================================================ */
.stars-heading {
  position: absolute;
  left: 4vw;
  top: 12vh;
  z-index: 30;
  pointer-events: none;
}

.star-field {
  position: absolute;
  inset: 0;
  z-index: 15;
}

.special-star {
  position: absolute;
  width: 20px;
  height: 20px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
  z-index: 15;
}
.special-star:hover { transform: translate(-50%, -50%) scale(1.35); }
.special-star .core {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle,
      #ffffff 0%,
      #f5c76e 30%,
      rgba(245, 199, 110, 0.6) 55%,
      rgba(245, 199, 110, 0) 100%);
  animation: starPulse 2.5s infinite ease-in-out;
}
@keyframes starPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.15); }
}
.special-star.opened .core {
  background:
    radial-gradient(circle,
      #ffffff 0%,
      #d99cb6 30%,
      rgba(217, 156, 182, 0.5) 60%,
      rgba(217, 156, 182, 0) 100%);
  animation-duration: 4s;
  opacity: 0.7;
}

/* Note overlay */
.note-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 24, 0.55);
}
.note-overlay.open { display: flex; animation: fadeIn 0.4s ease forwards; }

.pixel-note {
  background: #f6ecd4;
  color: #3a2818;
  padding: 28px 32px 24px;
  min-width: 300px;
  max-width: min(520px, 90vw);
  font-family: 'VT323', monospace;
  font-size: 22px;
  line-height: 1.4;
  position: relative;
  transform: rotate(-2deg);
  box-shadow:
    0 0 0 2px #dcc9a0,
    0 0 0 4px #0a0812,
    8px 8px 0 4px #0a0812,
    0 0 40px rgba(245, 199, 110, 0.4);
  clip-path: polygon(
    0 4px, 4px 4px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)
  );
}
.pixel-note .from-badge {
  position: absolute;
  top: -18px;
  left: 20px;
  background: #d99cb6;
  color: #0f0a05;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 6px 12px;
  letter-spacing: 2px;
  border: 2px solid #0a0812;
  box-shadow: 3px 3px 0 #0a0812;
}
.pixel-note p { white-space: pre-line; }
.pixel-note .close-note {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #0f0a05;
  color: #f5c76e;
  border: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pixel-note .close-note:hover { background: #d99cb6; color: #0f0a05; }

/* Progress-to-next hint (subtle, non-mandatory) */
.next-nudge {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #d99cb6;
  text-shadow: 2px 2px 0 #0a0812;
  letter-spacing: 2px;
  z-index: 30;
  cursor: pointer;
  padding: 10px 20px;
  animation: pulse 2.5s infinite ease-in-out;
  text-align: center;
}
.next-nudge:hover { color: #f5c76e; }
.next-nudge .arrow {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

/* Back nudge */
.back-nudge {
  position: absolute;
  right: 3vw;
  top: 4vh;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #a68cc9;
  text-shadow: 2px 2px 0 #0a0812;
  letter-spacing: 2px;
  cursor: pointer;
  z-index: 30;
  padding: 8px 12px;
  border: 2px solid #a68cc9;
  background: rgba(5, 8, 24, 0.4);
}
.back-nudge:hover { color: #f5c76e; border-color: #f5c76e; }

/* ================================================
   Wish scene
   ================================================ */
.wish-heading {
  position: absolute;
  left: 4vw;
  top: 15vh;
  z-index: 30;
  pointer-events: none;
}
.wish-panel {
  position: absolute;
  left: 6vw;
  top: 40vh;
  z-index: 30;
  min-width: 300px;
  max-width: 380px;
}
.wish-panel input {
  width: 100%;
  padding: 12px 14px;
  background: #050818;
  border: 2px solid #f5c76e;
  color: #f3e2b8;
  font-family: 'VT323', monospace;
  font-size: 20px;
  outline: none;
  margin-bottom: 10px;
}
.wish-panel input:focus { border-color: #d99cb6; }
.wish-panel button {
  width: 100%;
  padding: 12px;
  background: #f5c76e;
  color: #0f1830;
  border: 2px solid #0a0812;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 3px 3px 0 #0a0812;
}
.wish-panel button:hover { background: #d99cb6; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #0a0812; }
.wish-panel button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #0a0812; }

/* Shooting star */
.shooting-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffffff;
  box-shadow: 0 0 12px 4px #ffffff, 0 0 24px 8px #f5c76e;
  pointer-events: none;
  z-index: 25;
}
.shooting-star::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 199, 110, 0.8), #ffffff);
}

/* ================================================
   Constellation scene
   ================================================ */
.constellation-heading {
  position: absolute;
  left: 4vw;
  top: 12vh;
  z-index: 30;
  pointer-events: none;
}
.constellation-hint {
  position: absolute;
  right: 4vw;
  top: 30vh;
  z-index: 30;
  pointer-events: none;
}

.constellation-svg {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}
.constellation-svg line {
  stroke: #f5c76e;
  stroke-width: 2;
  stroke-dasharray: 3 3;
  filter: drop-shadow(0 0 6px rgba(245, 199, 110, 0.8));
}

.cstar {
  position: absolute;
  width: 26px;
  height: 26px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 20;
}
.cstar .core {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle,
      #ffffff 0%,
      #f5c76e 25%,
      rgba(245, 199, 110, 0.5) 55%,
      rgba(245, 199, 110, 0) 100%);
  animation: starPulse 3s infinite ease-in-out;
}
.cstar.lit .core {
  background:
    radial-gradient(circle,
      #ffffff 0%,
      #f5c76e 20%,
      #d99cb6 60%,
      rgba(217, 156, 182, 0) 100%);
  animation: glowUnlocked 2s infinite ease-in-out;
}
.cstar .num {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #f5c76e;
  text-shadow: 1px 1px 0 #0a0812;
  opacity: 0;
  transition: opacity 0.3s;
}
.cstar.lit .num { opacity: 1; }
.cstar.wrong .core { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3) translateX(-4px); background: radial-gradient(circle, #e0908f 0%, rgba(224, 144, 143, 0) 100%); }
  75% { transform: scale(1.3) translateX(4px);  background: radial-gradient(circle, #e0908f 0%, rgba(224, 144, 143, 0) 100%); }
}

/* ================================================
   Letter scene
   ================================================ */
.letter-scene-heading {
  position: absolute;
  left: 4vw;
  top: 12vh;
  z-index: 30;
  pointer-events: none;
}
.envelope-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  cursor: pointer;
  padding: 20px;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 0 16px rgba(245, 199, 110, 0.35));
}
.envelope-container:hover {
  transform: translate(-50%, -50%) translateY(-6px) scale(1.04);
  filter: drop-shadow(0 0 32px rgba(245, 199, 110, 0.9));
}
.envelope-container .tap-hint {
  display: block;
  margin-top: 20px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #d99cb6;
  text-shadow: 2px 2px 0 #0a0812;
  letter-spacing: 2px;
  text-align: center;
  animation: pulse 2.2s infinite ease-in-out;
}

/* Letter overlay */
.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 24, 0.7);
}
.letter-overlay.open { display: flex; animation: fadeIn 0.6s ease forwards; }
.letter-overlay.opening .letter-paper { animation: unfold 0.9s ease forwards; }
@keyframes unfold {
  0%   { transform: scale(0.2) rotate(-4deg); opacity: 0; }
  50%  { transform: scale(0.7) rotate(-2deg); opacity: 1; }
  100% { transform: scale(1)   rotate(-1deg); opacity: 1; }
}

.letter-paper {
  background: #f6ecd4;
  color: #3a2818;
  padding: 32px 36px 28px;
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  font-family: 'VT323', monospace;
  font-size: 22px;
  line-height: 1.5;
  position: relative;
  box-shadow:
    0 0 0 3px #dcc9a0,
    0 0 0 6px #0a0812,
    12px 12px 0 6px #0a0812,
    0 0 60px rgba(245, 199, 110, 0.5);
  background-image:
    linear-gradient(180deg, transparent 24px, rgba(139, 111, 69, 0.08) 24px, rgba(139, 111, 69, 0.08) 25px, transparent 25px);
  background-size: 100% 25px;
  transform: rotate(-1deg);
}
.letter-paper::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: repeating-linear-gradient(
    180deg,
    #c9556e 0px, #c9556e 8px,
    transparent 8px, transparent 16px
  );
}
.letter-paper h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: #8a2e42;
  margin-bottom: 20px;
  letter-spacing: 3px;
  text-align: left;
}
.letter-paper p { white-space: pre-line; margin-bottom: 12px; }
.letter-paper .signoff {
  margin-top: 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #8a2e42;
  letter-spacing: 2px;
  white-space: pre-line;
  line-height: 1.8;
}
.letter-paper .close-letter {
  position: sticky;
  top: 0;
  float: right;
  width: 32px;
  height: 32px;
  background: #0f0a05;
  color: #f5c76e;
  border: 2px solid #0a0812;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  cursor: pointer;
  margin: -12px -14px 0 0;
  z-index: 5;
}
.letter-paper .close-letter:hover { background: #d99cb6; color: #0f0a05; }

/* Custom scrollbar for letter */
.letter-paper::-webkit-scrollbar { width: 8px; }
.letter-paper::-webkit-scrollbar-track { background: #dcc9a0; }
.letter-paper::-webkit-scrollbar-thumb { background: #8a6f45; }

/* ================================================
   Secret + Final scene
   ================================================ */
.secret-heading {
  position: absolute;
  left: 4vw;
  top: 12vh;
  z-index: 30;
  pointer-events: none;
}

.secret-object {
  position: absolute;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 22;
  transition: transform 0.3s;
  filter: drop-shadow(0 0 8px rgba(245, 199, 110, 0.6));
}
.secret-object:hover { transform: translate(-50%, -50%) scale(1.2); }
.secret-object.found {
  animation: glowUnlocked 1.8s infinite ease-in-out;
}
.secret-object.found::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid #d99cb6;
  animation: ping 1.2s ease-out forwards;
  pointer-events: none;
}
@keyframes ping {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2);   opacity: 0; }
}

.secret-found {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 40;
  text-align: center;
  display: none;
}
.secret-found.show { display: block; animation: fadeIn 1s ease forwards; }
.secret-found .found-txt {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
  color: #f5c76e;
  text-shadow: 4px 4px 0 #0a0812, 0 0 20px rgba(245, 199, 110, 0.7);
  letter-spacing: 3px;
  margin-bottom: 24px;
  animation: shimmer 2s infinite ease-in-out;
}
.secret-found a {
  display: inline-block;
  padding: 14px 24px;
  background: #d99cb6;
  color: #0f0a05;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 2px;
  border: 2px solid #0a0812;
  box-shadow: 4px 4px 0 #0a0812;
  animation: glowUnlocked 2s infinite ease-in-out;
}
.secret-found a:hover {
  background: #f5c76e;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #0a0812;
}

/* Final text stack */
.final-text {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%);
  z-index: 30;
  text-align: center;
  max-width: 90vw;
  display: none;
}
.final-text.show { display: block; animation: fadeIn 2s ease forwards; }
.final-text .delivery,
.final-text .thanks {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #f3e2b8;
  text-shadow: 2px 2px 0 #0a0812;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-line;
}
.final-text .birthday {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(16px, 3vw, 26px);
  color: #f5c76e;
  text-shadow: 3px 3px 0 #0a0812, 0 0 16px rgba(245, 199, 110, 0.7);
  letter-spacing: 3px;
  margin: 16px 0;
  animation: shimmer 3s infinite ease-in-out;
}

/* ================================================
   Ambient/interactive things
   ================================================ */
.magic-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #f5c76e;
  box-shadow: 0 0 8px #f5c76e;
  pointer-events: none;
  z-index: 40;
}

/* Admin link (tiny, unobtrusive) */
.admin-link {
  position: fixed;
  bottom: 6px;
  right: 8px;
  z-index: 200;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: rgba(243, 226, 184, 0.25);
  text-decoration: none;
}
.admin-link:hover { color: #f5c76e; }

/* Utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .music-heading, .stars-heading, .wish-heading, .constellation-heading, .letter-scene-heading, .secret-heading {
    left: 5vw; top: 8vh;
  }
  .music-heading .lbl,
  .stars-heading .lbl,
  .wish-heading .lbl,
  .constellation-heading .lbl,
  .letter-scene-heading .lbl,
  .secret-heading .lbl {
    font-size: 10px;
  }
  .music-hint, .constellation-hint { right: 5vw; top: 25vh; max-width: 200px; }
  .music-hint .lbl { font-size: 18px; }
  .wish-panel { left: 5vw; right: 5vw; top: 45vh; min-width: 0; max-width: none; }
  .letter-paper { padding: 24px 20px 20px; font-size: 18px; }
  .letter-paper h2 { font-size: 14px; }
  .pixel-note { font-size: 18px; padding: 24px 20px 20px; }
  .pixel-window { min-width: 0; width: 92vw; }
  .tracklist li { grid-template-columns: 24px 1fr 50px 20px; font-size: 16px; }
  .final-text .delivery, .final-text .thanks { font-size: 18px; }
}
