:root {
  --primary-bg: #030111;
  --primary-pink: #ff4d79;
  --dark-pink: #d81b60;
  --red: #ff1744;
  --dark-red: #8b0000;
  --white: #ffffff;
  --text-color: #ffffff;
  --accent-blue: #2ed5ff;
  --nebula-purple: #5832c8;
  --dark-text: #222;
  --panel-bg: rgba(255, 255, 255, 0.9);
}

/* Retro CRT / Scanline Overlay */
html::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  z-index: 10000;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  opacity: 0.4;
}

body {
  margin: 0;
  font-family: 'Press Start 2P', cursive;
  background-color: var(--primary-bg);
  color: var(--text-color);
  text-align: center;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #030111;
  /* Deep Space Black */

  /* Layered Space Aesthetics */
  background-image:
    /* Deep Nebula 1 - Purple Glow */
    radial-gradient(circle at 20% 30%, rgba(88, 50, 200, 0.15) 0%, transparent 50%),
    /* Deep Nebula 2 - Pink Dust */
    radial-gradient(circle at 80% 20%, rgba(255, 77, 121, 0.1) 0%, transparent 45%),
    /* Deep Nebula 3 - Blue Ion */
    radial-gradient(circle at 50% 80%, rgba(46, 213, 255, 0.1) 0%, transparent 60%),
    /* Distant Tiny Stars Layer */
    url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="40" r="0.5" fill="%23ffffff" opacity="0.4"/><circle cx="150" cy="110" r="0.5" fill="%23ffffff" opacity="0.6"/><circle cx="80" cy="180" r="0.5" fill="%23ffffff" opacity="0.3"/><circle cx="40" cy="130" r="0.5" fill="%23ff99b3" opacity="0.5"/></svg>'),
    /* Medium Parallax Stars */
    url('data:image/svg+xml;utf8,<svg viewBox="0 0 150 150" xmlns="http://www.w3.org/2000/svg"><rect x="25" y="50" width="1.5" height="1.5" fill="%23ffffff" opacity="0.8"/><rect x="110" y="120" width="1.5" height="1.5" fill="%23ffffff" opacity="0.9"/><rect x="80" y="20" width="1.5" height="1.5" fill="%23ff4d79" opacity="0.7"/><rect x="10" y="10" width="1.5" height="1.5" fill="%23ffd700" opacity="0.6"/></svg>'),
    /* Close Bright Specs */
    url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect x="10" y="40" width="2" height="2" fill="%23ffffff"/><rect x="85" y="80" width="2" height="2" fill="%23a0d2eb"/><rect x="60" y="15" width="2" height="2" fill="%23ff99b3"/></svg>');

  background-size: 100% 100%, 100% 100%, 100% 100%, 400px 400px, 300px 300px, 150px 150px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, repeat;
  image-rendering: auto;
  animation: moveGalaxyPremium 60s linear infinite;
  z-index: -2;
  pointer-events: none;
}

/* Subtle Pulsing Nebula Light */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 77, 121, 0.03) 0%, transparent 70%);
  animation: nebulaPulse 10s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

@keyframes nebulaPulse {
  from {
    opacity: 0.4;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes moveGalaxyPremium {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  100% {
    background-position: 0 0, 0 0, 0 0, 400px 800px, 300px 400px, 150px 150px;
  }
}

/* FLOATING SPACE LAYERS */
.space-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.space-asset {
  position: absolute;
  image-rendering: auto;
  opacity: 1;
  /* Removed blurry filter that caused black box artifacts on pixel assets */
}

.astronaut {
  width: 120px;
  height: auto;
  left: 15%;
  top: 65%;
  animation: floatAstronaut 15s infinite alternate ease-in-out;
}

@keyframes floatAstronaut {
  0% {
    transform: translateY(0px) rotate(-10deg);
  }

  50% {
    transform: translateY(-30px) rotate(5deg);
  }

  100% {
    transform: translateY(10px) rotate(-15deg);
  }
}



/* Rocket Animation */
.rocket {
  width: 150px;
  height: auto;
  bottom: -150px;
  left: -150px;
  opacity: 0.95;
  animation: rocketFly 18s linear infinite;
  transform: rotate(45deg);
}

@keyframes rocketFly {
  0% {
    bottom: -150px;
    left: -150px;
    transform: rotate(45deg) scale(0.8);
  }

  50% {
    bottom: 60%;
    left: 110%;
    transform: rotate(45deg) scale(1.2);
  }

  51% {
    bottom: -150px;
    left: 110%;
    transform: rotate(-45deg) scale(0);
    opacity: 0;
  }

  100% {
    bottom: -150px;
    left: -150px;
    transform: rotate(-45deg) scale(0);
    opacity: 0;
  }
}





.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
}

#screen-finale {
  background: #3eb4f0;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: flex-start;
  padding-top: 5vh;
}

#screen-finale::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  right: -100%;
  bottom: -100%;
  background-image: repeating-conic-gradient(#3eb4f0 0deg 11deg,
      #58c4fc 11deg 22deg);
  animation: bgSpin 40s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes bgSpin {
  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* CSS PIXEL HEART PERFECTED */
.finale-heart {
  width: 90px;
  height: 90px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 11 9" xmlns="http://www.w3.org/2000/svg"><path fill="%23ff4d79" d="M1 1h2v-1h-2z M8 1h2v-1h-2z M0 2h11v-1h-11z M0 4h11v-2h-11z M1 5h9v-1h-9z M2 6h7v-1h-7z M3 7h5v-1h-5z M4 8h3v-1h-3z M5 9h1v-1h-1z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  margin: 30px auto;
  animation: heartBeat 0.5s infinite alternate steps(2);
  filter: drop-shadow(4px 4px 0px var(--dark-red));
  z-index: 2;
}

@keyframes heartBeat {
  from {
    transform: scale(1);
    filter: drop-shadow(4px 4px 0px var(--dark-red)) brightness(1);
  }

  to {
    transform: scale(1.1);
    filter: drop-shadow(6px 6px 0px var(--dark-red)) brightness(1.2);
  }
}

/* BUTTONS */
button {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  background: var(--dark-pink);
  color: var(--white);
  border: 4px solid var(--white);
  padding: 15px 25px;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--dark-red);
  margin-top: 20px;
  text-transform: uppercase;
  transition: transform 0.1s;
}

button:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--dark-red);
}

/* PIXELATED HEART PADLOCK */
.pixel-padlock-container {
  position: relative;
  margin: 60px auto 20px;
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#pixel-lock-shackle {
  position: absolute;
  top: -40px;
  width: 100px;
  height: 80px;
  border: 12px solid #bdc3c7;
  border-bottom: 0;
  /* Boxy corners for pixel feel instead of round */
  border-radius: 20px 20px 0 0;
  box-shadow: inset 4px 4px 0px rgba(255, 255, 255, 0.7), 4px -4px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: transform 0.6s steps(4);
  /* step animation for retro feel */
  transform-origin: 100% 100%;
  display: none !important;
  /* Completely hide the metal shackle as per user request */
}

#pixel-lock-shackle.unlocked {
  transform: translateY(-20px) translateX(20px) rotate(25deg);
}

.moon-body-container {
  position: relative;
  width: 360px;
  height: 360px;
  z-index: 2;
  /* Smooth float for the moon in space */
  animation: moonFloat 3s ease-in-out infinite alternate;
}

@keyframes moonFloat {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-10px);
  }
}

.pixel-moon-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 360px;
  height: 360px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: auto;
  /* Neon glow matching nebula */
  filter: drop-shadow(0 0 15px rgba(88, 50, 200, 0.6)) drop-shadow(10px 10px 0px rgba(0, 0, 0, 0.4));
  animation: moonPulse 4s ease-in-out infinite alternate;
}

@keyframes moonPulse {
  from {
    filter: drop-shadow(0 0 15px rgba(88, 50, 200, 0.5)) drop-shadow(10px 10px 0px rgba(0, 0, 0, 0.4));
  }

  to {
    filter: drop-shadow(0 0 30px rgba(255, 77, 121, 0.6)) drop-shadow(10px 10px 0px rgba(0, 0, 0, 0.4));
  }
}

/* LOCK UI STYLES */
.pixel-ui {
  position: absolute;
  top: 50%;
  left: 51%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.keyboard-input-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.pixel-key-input {
  width: 50px;
  height: 60px;
  background: rgba(20, 20, 40, 0.8);
  border: 4px solid #5a647d;
  color: #ffde21;
  font-family: 'Press Start 2P', cursive;
  font-size: 28px;
  text-align: center;
  outline: none;
  caret-color: transparent;
  /* Hides blinking cursor for authentic look */
  text-shadow: 2px 2px 0px #000;
  transition: all 0.2s;
  /* Simulating thick pixel shadow */
  box-shadow: inset -4px -4px 0px rgba(0, 0, 0, 0.5), 4px 4px 0px #000;
  border-radius: 4px;
}

.pixel-key-input:focus {
  border-color: #ffd700;
  background: rgba(40, 40, 80, 0.9);
  color: #ffffff;
  transform: translateY(-4px);
  box-shadow: inset -4px -4px 0px rgba(0, 0, 0, 0.5), 4px 8px 0px #000;
}

.pixel-hint {
  font-size: 10px;
  color: var(--white);
  margin-top: 8px;
  text-align: center;
  text-shadow: 2px 2px 0px #000;
}

#error-msg {
  font-size: 10px;
  color: var(--red);
  margin-top: 15px;
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* RETRO TERMINAL LOADING SCREEN */
.loading-container {
  background: #222;
  /* Classic terminal dark grey */
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 50;
  /* over the background elements */
}

/* Caution Stripes Top and Bottom */
.loading-container::before,
.loading-container::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 16px;
  background: repeating-linear-gradient(45deg,
      #ffd700,
      #ffd700 15px,
      #000 15px,
      #000 30px);
}

.loading-container::before {
  top: 0;
}

.loading-container::after {
  bottom: 0;
}

#loading-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  margin-bottom: 20px;
}

/* CSS-based Rotating Pixel Star (No broken images) */
.pixel-loader {
  width: 40px;
  height: 40px;
  background: var(--primary-pink);
  box-shadow:
    0 -10px 0 var(--primary-pink), 0 10px 0 var(--primary-pink),
    -10px 0 0 var(--primary-pink), 10px 0 0 var(--primary-pink);
  animation: starRotate 1.5s steps(8) infinite;
}

@keyframes starRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.letter-content {
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  line-height: 2;
  color: #333;
  margin-top: 15px;
  text-align: left;
  /* preserve spaces and formatting */
  white-space: pre-wrap;
  height: 90%;
  overflow-y: auto;
  /* Scroll inside the letter content area natively */
  scrollbar-width: thin;
  scrollbar-color: #ff4081 #f0e6d2;
}

.typing-cursor {
  display: inline-block;
  animation: typing-blink 1s step-end infinite;
  color: #ff4081;
}

@keyframes typing-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

#loading-note {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  line-height: 1.8;
  color: #00ff00;
  /* Retro terminal green */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 40px;
  min-height: 40px;
  text-align: center;
  max-width: 90vw;
}

.progress-bar {
  width: 80vw;
  max-width: 500px;
  height: 30px;
  border: 4px solid #fff;
  background: #000;
  position: relative;
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.1);
}

#progress-fill {
  width: 0%;
  height: 100%;
  background: #00ff00;
  /* Terminal green bar */
  box-shadow: 0 0 10px #00ff00;
  transition: width 0.3s steps(10);
}

/* DIY CAKE SCREEN - NEW CHECKERED THEME (NO GALAXY) */
#screen-diy {
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Center everything perfectly */
  min-height: 100vh;
  position: relative;
  z-index: 100;
  /* Above everything else including galaxy */
  background-color: #fce4ec;
  /* Light pink base */
  background-image:
    linear-gradient(45deg, #f8bbd0 25%, transparent 25%, transparent 75%, #f8bbd0 75%, #f8bbd0),
    linear-gradient(45deg, #f8bbd0 25%, transparent 25%, transparent 75%, #f8bbd0 75%, #f8bbd0);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}

#screen-diy h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: #8b0000;
  /* Dark red for light background */
  text-shadow: 2px 2px 0 #fff;
  margin-bottom: 25px;
  background: white;
  padding: 10px 20px;
  border: 4px solid #8b0000;
  box-shadow: 4px 4px 0 #f8bbd0;
}

.cake-display {
  width: 320px;
  height: 200px;
  background: #fdf5e6;
  /* Creamy surface */
  border: 8px solid #8d6e63;
  /* Wooden frame */
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.1),
    10px 10px 0px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  margin: 5px auto 10px;
  border-radius: 4px;
}

/* The "Board" / Table look inside the display */
.cake-display::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background: #d7ccc8;
  /* Slightly darker board bottom */
  border-top: 4px solid #8d6e63;
  z-index: 0;
}

#cake-container {
  position: relative;
  width: 160px;
  height: 120px;
  margin-bottom: 30px;
}

.layer {
  position: absolute;
  left: 0;
  width: 100%;
}

.base {
  bottom: 0;
  height: 50px;
  border: 4px solid #333;
  z-index: 2;
}

.frosting {
  bottom: 50px;
  left: -5%;
  width: 110%;
  height: 40px;
  border: 4px solid #333;
  border-radius: 8px 8px 4px 4px;
  z-index: 3;
}

.plate {
  position: absolute;
  bottom: -15px;
  left: -20%;
  width: 140%;
  height: 40px;
  background: #fff;
  border: 4px solid #999;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 10px 0px rgba(0, 0, 0, 0.1);
}

/* Flavors */
.flavor-vanilla .base {
  background: #ffe4b5;
}

.flavor-chocolate .base {
  background: #5c3a21;
}

.flavor-strawberry .base {
  background: #ffb6c1;
}

.flavor-mint .base {
  background: #a8e6cf;
}

.cream-vanilla .frosting {
  background: #fffacd;
}

.cream-chocolate .frosting {
  background: #8b4513;
}

.cream-strawberry .frosting {
  background: #ff69b4;
}

.cream-blueberry .frosting {
  background: #8da4ff;
}

/* Placement Layers */
.items-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.dragged-topping {
  position: absolute !important;
  transform: translate(-50%, -100%) translateY(2px);
  /* Center on the 4px black line */
  z-index: 100;
}

.dragged-candle {
  position: absolute !important;
  transform: translate(-50%, -100%) translateY(2px);
  /* Center on the 4px black line */
  z-index: 100;
}

/* PIXEL ANIMATED TOPPINGS */
.pixel-cherry {
  width: 12px;
  height: 12px;
  background: #ff1744;
  border-radius: 4px;
  box-shadow: inset -3px -3px 0px #b71c1c, 0 2px 0 var(--dark-red);
  position: relative;
}

.pixel-cherry::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 6px;
  width: 2px;
  height: 10px;
  background: #00e676;
  border-right: 1px solid #1b5e20;
  transform: rotate(20deg);
}

.pixel-strawberry {
  width: 14px;
  height: 16px;
  background: #f50057;
  border-radius: 4px 4px 50% 50%;
  box-shadow: inset -2px -2px 0px #880e4f, 0 2px 0 var(--dark-red);
  position: relative;
}

.pixel-strawberry::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 1px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #00e676;
}

.pixel-strawberry::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 2px;
  height: 2px;
  background: #ffff00;
  box-shadow: 4px 2px 0 #ffff00, -2px 6px 0 #ffff00, 4px 6px 0 #ffff00, 2px -2px 0 #ffff00;
}

.pixel-sprinkle {
  width: 4px;
  height: 10px;
  background: yellow;
  border-radius: 2px;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.pixel-sprinkle-preview {
  width: 18px;
  height: 18px;
  background:
    radial-gradient(circle at 4px 4px, #ffeb3b 3px, transparent 4px),
    radial-gradient(circle at 12px 6px, #00bcd4 3px, transparent 4px),
    radial-gradient(circle at 7px 14px, #ff4081 3px, transparent 4px);
}

.pixel-chocochip {
  width: 8px;
  height: 8px;
  background: #3e2723;
  border-radius: 40% 40% 1px 1px;
  box-shadow: inset -2px -1px 0 #1b100e, 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* CANDLES */
.candle-container {
  position: absolute;
  bottom: 85px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 10;
}

.candle {
  position: relative;
}

.candle-body-basic {
  width: 10px;
  height: 35px;
  background: #fff;
  border: 2px solid #000;
  margin: 0 10px;
}

.candle-stripe {
  width: 100%;
  height: 5px;
  background: red;
  margin-top: 5px;
}

.candle-body-23 {
  font-family: 'Press Start 2P', cursive !important;
  font-size: 24px;
  line-height: 1;
  /* Prevent pushing down */
  display: block;
  color: #ffeb3b;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 4px 4px 0 #8b0000;
  letter-spacing: 5px;
}

.flame {
  width: 12px;
  height: 18px;
  background: #ffcc00;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px #ffcc00;
  display: none;
}

.candle-body-23 .flame {
  top: -20px;
  left: 40%;
}

.lit .flame {
  display: block;
  animation: flicker 0.1s infinite alternate;
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
}

/* PIXEL INVENTORY SYSTEM */
.pixel-inventory {
  background: #deb887;
  border: 4px solid #8b4513;
  box-shadow:
    inset 4px 4px 0 #ffe4b5,
    inset -4px -4px 0 #a0522d,
    8px 8px 0px var(--dark-pink);
  border-radius: 8px;
  width: 320px;
  margin: 10px auto;
  text-align: left;
  padding: 4px;
}

.inventory-tabs {
  display: flex;
  background: transparent;
  border-bottom: 4px solid #8b4513;
  margin-bottom: -4px;
}

.tab-btn {
  flex: 1;
  padding: 10px 0;
  margin: 0 2px;
  border: 4px solid #5c3a21;
  border-bottom: none;
  background: #a0522d;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  cursor: pointer;
  outline: none;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 2px 2px 0 #cd853f;
}

.tab-btn.active {
  background: #deb887;
  color: #5c3a21;
  border-color: #8b4513;
  border-bottom: 4px solid #deb887;
  padding-bottom: 14px;
  transform: translateY(4px);
  box-shadow: inset 2px 2px 0 #ffe4b5;
  z-index: 2;
  position: relative;
}

.tab-btn:active {
  transform: none;
}

.inventory-content {
  padding: 15px 10px;
  min-height: 80px;
  background: #fff8dc;
  border: 4px solid #8b4513;
  border-radius: 6px;
  box-shadow: inset 4px 4px 0 rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.inv-tab {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hidden-tab {
  display: none !important;
}

.item {
  width: 44px;
  height: 44px;
  border: 4px solid #a0522d;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  background: #fff;
  box-shadow: 4px 4px 0 #8b4513;
  transition: transform 0.1s, box-shadow 0.1s;
}

.item:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #8b4513;
}

.drag-item {
  user-select: none;
}

/* CANDLE PREVIEWS IN INVENTORY */
.candle-preview {
  position: relative;
}

.candle-preview.red-stripe {
  width: 8px;
  height: 20px;
  background: #fff;
  border: 2px solid #000;
  background-image: repeating-linear-gradient(45deg, red, red 4px, transparent 4px, transparent 8px);
}

.candle-preview.blue-stripe {
  width: 8px;
  height: 20px;
  background: #fff;
  border: 2px solid #000;
  background-image: repeating-linear-gradient(45deg, blue, blue 4px, transparent 4px, transparent 8px);
}

.candle-preview.num {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: #ffeb3b;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* DRAGGABLE ITEMS CSS FOR DRAG API */
.drag-ghost {
  opacity: 0.5;
}

#blow-instruction {
  font-size: 12px;
  margin-top: 15px;
  color: var(--dark-red);
}

.blinking {
  animation: blink 1s infinite alternate;
}

/* FINALE STYLES OVERRIDES ARE DELETED FROM HERE */

.balloon {
  position: absolute;
  bottom: -150px;
  width: 48px;
  height: 60px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 13 17" xmlns="http://www.w3.org/2000/svg"><path d="M4,0h5v1h-5z M2,1h9v1h-9z M1,2h11v2h-11z M0,4h13v5h-13z M1,9h11v2h-11z M2,11h9v1h-9z M3,12h7v1h-7z M4,13h5v1h-5z M5,14h3v1h-3z M6,15h1v1h-1z M5,16h3v1h-3z" fill="%23FFFFFF"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  animation: floatUp 6s linear infinite;
  z-index: 1;
  filter: drop-shadow(3px 3px 0px #4a0011);
}

.balloon::after {
  content: "";
  position: absolute;
  top: 95%;
  left: 50%;
  margin-left: -5px;
  /* Center the 10px width string */
  width: 10px;
  height: 60px;
  /* Pixel art wavy string */
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 5 30" xmlns="http://www.w3.org/2000/svg"><path d="M2,0h1v3h-1z M3,3h1v4h-1z M4,7h1v4h-1z M3,11h1v4h-1z M2,15h1v5h-1z M1,20h1v5h-1z M2,25h1v5h-1z" fill="%23FFFFFF" opacity="0.8"/></svg>');
  background-size: 100% 100%;
  image-rendering: pixelated;
  transform-origin: top center;
  /* Make the string actively wave side to side separately from the balloon */
  animation: swayString 2s ease-in-out infinite alternate;
}

.balloon::before {
  display: none;
}

/* Mask coloring via hue-rotate so we use pure SVG shape */
.b1 {
  left: 10%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(30%) sepia(100%) saturate(1000%) hue-rotate(330deg);
  animation-duration: 7s;
}

.b2 {
  left: 20%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(60%) sepia(100%) saturate(1000%) hue-rotate(180deg);
  animation-duration: 5s;
  animation-delay: 1s;
}

.b3 {
  left: 35%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(80%) sepia(100%) saturate(1000%) hue-rotate(10deg);
  animation-duration: 8s;
  animation-delay: 2s;
  width: 60px;
  height: 60px;
}

.b4 {
  left: 50%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(50%) sepia(100%) saturate(1000%) hue-rotate(90deg);
  animation-duration: 6s;
  animation-delay: 0.5s;
}

.b5 {
  left: 65%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(50%) sepia(100%) saturate(1000%) hue-rotate(280deg);
  animation-duration: 9s;
  animation-delay: 1.5s;
}

.b6 {
  left: 80%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(40%) sepia(100%) saturate(1000%) hue-rotate(350deg);
  animation-duration: 5.5s;
  animation-delay: 0.2s;
}

.b7 {
  left: 15%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(60%) sepia(100%) saturate(1000%) hue-rotate(180deg);
  animation-duration: 10s;
  animation-delay: 3s;
}

.b8 {
  left: 45%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(70%) sepia(100%) saturate(1000%) hue-rotate(10deg);
  animation-duration: 7.5s;
  animation-delay: 1.2s;
}

.b9 {
  left: 75%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(50%) sepia(100%) saturate(1000%) hue-rotate(300deg);
  animation-duration: 6.8s;
  animation-delay: 0.8s;
}

.b10 {
  left: 90%;
  filter: drop-shadow(3px 3px 0px #4a0011) invert(30%) sepia(100%) saturate(1000%) hue-rotate(250deg);
  animation-duration: 8.2s;
  animation-delay: 2.5s;
}


@keyframes floatUp {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-120vh);
  }
}

@keyframes swayString {
  0% {
    transform: rotate(-15deg);
  }

  100% {
    transform: rotate(15deg);
  }
}

/* PIXEL INVENTORY SYSTEM */
.pixel-inventory {
  background: #fdf5e6;
  border: 6px solid #8b4513;
  box-shadow:
    inset 4px 4px 0 rgba(255, 255, 255, 0.7),
    inset -4px -4px 0 rgba(0, 0, 0, 0.1),
    10px 10px 0px rgba(0, 0, 0, 0.3);
  width: 360px;
  margin: 5px auto;
  padding: 5px;
  border-radius: 4px;
}

.inventory-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 5px;
}

.tab-btn {
  flex: 1;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  padding: 12px 5px;
  background: #a0522d;
  color: #fff;
  border: 4px solid #5c3a21;
  border-bottom: none;
  cursor: pointer;
  transition: all 0.1s;
}

.tab-btn.active {
  background: #fdf5e6;
  color: #5c3a21;
  border-color: #8b4513;
  transform: translateY(2px);
  padding-bottom: 14px;
}

.inventory-content {
  background: #fff;
  border: 4px solid #8b4513;
  padding: 15px;
  min-height: 100px;
}

.inv-tab {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hidden-tab {
  display: none !important;
}

.item {
  width: 45px;
  height: 45px;
  background: #eee;
  border: 4px solid #8b4513;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: grab;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.item .pixel-cherry {
  margin-top: 8px;
  margin-left: -2px;
}

.item .pixel-strawberry {
  margin-top: 3px;
}

.item .candle-preview.num {
  font-family: 'Press Start 2P', cursive;
  line-height: 1;
  margin-top: 2px;
}

.item:active {
  cursor: grabbing;
  transform: scale(0.9);
}

/* PIXELATED ASSETS */
.pixel-cherry,
.pixel-strawberry,
.pixel-chocochip {
  image-rendering: pixelated;
}

.candle-preview.red-stripe {
  width: 10px;
  height: 30px;
  background: repeating-linear-gradient(45deg, #fff, #fff 5px, #ff1744 5px, #ff1744 10px);
  border: 2px solid #000;
}

.candle-preview.blue-stripe {
  width: 10px;
  height: 30px;
  background: repeating-linear-gradient(45deg, #fff, #fff 5px, #2ed5ff 5px, #2ed5ff 10px);
  border: 2px solid #000;
}

.candle-preview.num {
  font-size: 20px;
  color: #ffd700;
  text-shadow: 2px 2px 0 #000;
}

/* DIY SCREEN BUTTONS */
.cake-controls {
  display: flex !important;
  gap: 10px;
  margin-top: 5px;
  justify-content: center;
  width: 100%;
}

.cake-controls button {
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  padding: 10px 15px;
  cursor: pointer;
  border: 4px solid #000;
  image-rendering: pixelated;
  transition: transform 0.1s;
}

.cake-controls button:active {
  transform: translateY(4px);
}

#light-btn {
  background: #ff4d79;
  color: #fff;
  box-shadow: 4px 4px 0 #8b0000;
}

#blow-btn {
  background: #2ed5ff;
  color: #000;
  box-shadow: 4px 4px 0 #0b227c;
}

#reset-cake-btn {
  background: #bbb;
  color: #000;
  box-shadow: 4px 4px 0 #666;
}

.finale-ui-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  width: 100%;
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
  filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.2));
}

/* Text Layout */
.finale-title-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.finale-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 38px;
  color: #ffffff;
  line-height: 1.8;
  margin: 15px 0;
  text-align: center;
  text-shadow:
    4px 4px 0px #ff54a1,
    8px 8px 0px #4a0011;
  letter-spacing: 4px;
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* BALLOONS */
.balloons-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}

.balloon {
  position: absolute;
  bottom: -150px;
  width: 32px;
  height: 44px;
  background-color: var(--bc);
  border: 3px solid #000;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  box-shadow:
    inset -4px -4px 0 rgba(0, 0, 0, 0.25),
    inset 4px 4px 0 rgba(255, 255, 255, 0.4);
  animation: floatUp 8s ease-in infinite, sway 1.5s ease-in-out infinite alternate;
}

/* Beautiful Balloon Knot */
.balloon::after {
  content: '';
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  width: 8px;
  height: 6px;
  background: var(--bc);
  border: 3px solid #000;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: -1;
  margin-top: -3px;
  /* slight overlap so there is no gap */
}

/* Smooth Waving String */
.balloon::before {
  content: '';
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -1px;
  width: 2px;
  height: 45px;
  background: #fff;
  border-left: 1px dotted rgba(0, 0, 0, 0.3);
  transform-origin: top center;
  animation: swayString 1.5s ease-in-out infinite alternate;
  z-index: -2;
}

/* Individual Balloon Variables & Delays */
.b1 {
  left: 10%;
  --bc: #ff4d79;
  animation-delay: 0s, 0s;
}

.b2 {
  left: 30%;
  --bc: #2ed5ff;
  animation-delay: 1.5s, 0.5s;
  width: 45px;
  height: 55px;
}

.b3 {
  left: 50%;
  --bc: #00e676;
  animation-delay: 3s, 1s;
}

.b4 {
  left: 70%;
  --bc: #ffd700;
  animation-delay: 0.5s, 1.5s;
  width: 35px;
  height: 45px;
}

.b5 {
  left: 85%;
  --bc: #aa00ff;
  animation-delay: 2.5s, 0.2s;
}

.b6 {
  left: 20%;
  --bc: #ff9100;
  animation-delay: 4.5s, 1.2s;
}

.b7 {
  left: 40%;
  --bc: #ff4081;
  animation-delay: 1.2s, 0.8s;
  width: 50px;
  height: 60px;
}

.b8 {
  left: 60%;
  --bc: #00bcd4;
  animation-delay: 3.5s, 0s;
}

.b9 {
  left: 80%;
  --bc: #c6ff00;
  animation-delay: 5s, 1s;
}

.b10 {
  left: 5%;
  --bc: #d500f9;
  animation-delay: 2s, 1.5s;
  width: 30px;
  height: 40px;
}

@keyframes floatUp {
  0% {
    bottom: -150px;
  }

  100% {
    bottom: 120vh;
  }
}

@keyframes sway {
  0% {
    transform: translateX(-15px);
  }

  100% {
    transform: translateX(15px);
  }
}

@keyframes swayString {
  0% {
    transform: rotate(-10deg);
  }

  100% {
    transform: rotate(10deg);
  }
}

/* ENVELOPE MODAL */
.envelope-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 50;
  transition: opacity 1s ease-in-out, transform 0.8s ease-out;
  animation: floatUpSlow 2s ease-in-out infinite alternate;
}

@keyframes floatUpSlow {
  0% {
    transform: translate(-50%, -50%);
  }

  100% {
    transform: translate(-50%, calc(-50% - 15px));
  }
}

.envelope-wrapper.custom-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 30px));
}

.fade-out {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 1.5s ease-in-out;
}

.envelope {
  width: 200px;
  height: 132px;
  background: #a98254;
  /* darker back inside */
  position: relative;
  border: 4px solid #000;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transform: scale(1.6);
  transition: transform 0.2s;
  margin-bottom: 40px;
  /* space for text since it's scaled */
}

.envelope:hover {
  transform: scale(1.65);
}

.env-letter {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0px;
  height: 110px;
  background: #fff;
  border: 4px solid #000;
  border-bottom: none;
  z-index: 2;
  transition: transform 0.5s ease;
  /* closing: slides in immediately */
  padding: 10px;
}

.env-line {
  height: 6px;
  background: #ddd;
  margin-bottom: 8px;
  border-radius: 4px;
}

.env-line.short {
  width: 60%;
}

.env-cover-left,
.env-cover-right,
.env-cover-bottom {
  position: absolute;
  z-index: 3;
}

.env-cover-left {
  top: 0;
  left: 0;
  border-top: 66px solid transparent;
  border-bottom: 66px solid transparent;
  border-left: 96px solid #dcb985;
  filter: drop-shadow(4px 0 0 #000);
}

.env-cover-right {
  top: 0;
  right: 0;
  border-top: 66px solid transparent;
  border-bottom: 66px solid transparent;
  border-right: 96px solid #dcb985;
  filter: drop-shadow(-4px 0 0 #000);
}

.env-cover-bottom {
  bottom: 0;
  left: 0;
  border-left: 96px solid transparent;
  border-right: 96px solid transparent;
  border-bottom: 76px solid #e6c898;
  filter: drop-shadow(0 -4px 0 #000);
}

.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  border-left: 96px solid transparent;
  border-right: 96px solid transparent;
  border-top: 76px solid #f0d5a4;
  z-index: 4;
  transform-origin: top;
  transition: transform 0.4s ease 0.5s, z-index 0s 0.5s;
  /* closing: waits 0.5s for letter to slide in before closing */
  filter: drop-shadow(0 4px 0 #000);
}

.envelope.open .env-flap {
  transform: rotateX(180deg);
  z-index: 1;
  transition: transform 0.4s ease, z-index 0s 0.2s;
  /* opening: flap opens immediately */
  /* move flap behind letter once open */
  filter: drop-shadow(0 -4px 0 #000);
  /* shadow flips */
}

.envelope.open .env-letter {
  transform: translateY(-90px);
  transition: transform 0.6s ease 0.4s;
  /* opening: letter waits 0.4s for flap to open */
  /* slide up */
}

.envelope-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  margin-top: 25px;
  transition: opacity 0.4s;
}

.envelope.open+.envelope-text {
  opacity: 0;
}

/* LETTER OVERLAY */
#letter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#letter-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.pixel-letter-box {
  background: #fdf5e6;
  border: 4px solid #8d6e63;
  width: 90%;
  max-width: 400px;
  max-height: 85vh;
  position: relative;
  box-shadow:
    10px 10px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(139, 69, 19, 0.2);
  display: flex;
  flex-direction: column;
}

#close-letter-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 35px;
  height: 35px;
  background: #ff1744;
  color: white;
  border: 4px solid #000;
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

#close-letter-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.letter-content {
  padding: 25px;
  overflow-y: auto;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: #3e2723;
  line-height: 2.0;
  text-align: left;
}

.letter-content p {
  margin: 0 0 15px 0;
}

.letter-sign {
  margin-top: 30px !important;
  text-align: right !important;
  font-weight: bold;
}

/* FINALE OPTIONS */
#finale-options {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 20px;
  z-index: 60;
  opacity: 1;
  transition: opacity 0.8s ease-in-out, transform 0.5s ease;
}

#finale-options.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 20px));
}

.styled-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ff4081;
  color: #fff;
  border: 4px solid #000;
  padding: 16px 28px;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  text-transform: uppercase;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.1s, box-shadow 0.1s;
  line-height: normal;
  /* Normal line height works better with flex centering */
}

/* Precise alignment for the arrow symbol */
.styled-btn .arrow-icon {
  display: inline-block;
  transform: translateY(-1px);
  /* Manual tweak to match Press Start 2P baseline */
  font-size: 14px;
  /* Slightly smaller looks better aligned */
}

.styled-btn:hover {
  transform: scale(1.05);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}

.styled-btn:active {
  transform: translate(6px, 6px) scale(1);
  box-shadow: none;
}

.next-level-btn {
  background: #00e676;
}

/* ========================================= */
/* VOUCHERS LEVEL                            */
/* ========================================= */

#screen-vouchers {
  background: #3eb4f0;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

#screen-vouchers::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  right: -100%;
  bottom: -100%;
  background-image: repeating-conic-gradient(#3eb4f0 0deg 11deg,
      #58c4fc 11deg 22deg);
  animation: bgSpin 40s linear infinite;
  z-index: 0;
  pointer-events: none;
}

#screen-vouchers>* {
  z-index: 10;
}

.vouchers-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* Stretch vertically so all tickets are equal height */
  gap: 20px;
  width: 90%;
  max-width: 500px;
  /* Remove fixed 60vh height so it fits content naturally */
  overflow-x: auto;
  overflow-y: hidden;
  padding: 15px;
  /* Custom scrollbar for pixel retro feel */
  scrollbar-width: thin;
  scrollbar-color: #ff4081 transparent;
  background: transparent;
  border: none;
  box-shadow: none;
}

.vouchers-container::-webkit-scrollbar {
  height: 12px;
}

.vouchers-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.vouchers-container::-webkit-scrollbar-thumb {
  background-color: #ff4081;
  border-radius: 4px;
  border: 2px solid #fff;
}

.pixel-voucher {
  display: flex;
  align-items: center;
  background: #fff;
  border: 4px dashed #ff4081;
  border-radius: 8px;
  padding: 15px;
  position: relative;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  color: #000;
  text-align: left;
  flex-shrink: 0;
  width: 400px;
  max-width: 85vw;
}

/* Hide scrollbar on the ticket itself for cleaner look */
.pixel-voucher::-webkit-scrollbar {
  width: 0px;
}

.pixel-voucher::before,
.pixel-voucher::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #58c4fc;
  /* matching background so it looks like a hole punch */
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.pixel-voucher::before {
  left: -12px;
  border-right: 4px solid #ff4081;
}

.pixel-voucher::after {
  right: -12px;
  border-left: 4px solid #ff4081;
}

.voucher-icon {
  font-size: 40px;
  margin-right: 15px;
  margin-bottom: 0;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.voucher-content {
  flex: 1;
}

.voucher-content h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  color: #d81b60;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.voucher-content p {
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  margin: 5px 0;
  line-height: 1.6;
  color: #333;
}

.voucher-content p span {
  font-weight: bold;
  color: #8b0000;
}

.voucher-note {
  margin-top: 10px !important;
  color: #555 !important;
  border-top: 2px dotted #ccc;
  padding-top: 10px;
}

/* ========================================= */
/* UNBOX LEVEL                               */
/* ========================================= */
/* ========================================= */
/* UNBOX LEVEL V4 - PRO PIXEL DESIGN         */
/* ========================================= */
#screen-unbox {
  background: #3eb4f0;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

#screen-unbox::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  right: -100%;
  bottom: -100%;
  background-image: repeating-conic-gradient(#3eb4f0 0deg 11deg,
      #58c4fc 11deg 22deg);
  animation: bgSpin 60s linear infinite;
  z-index: 0;
}

.unbox-container {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  /* Top, Box (Center), Bottom */
  align-items: center;
  justify-items: center;
  height: 85vh;
  width: 100%;
  max-width: 500px;
  position: relative;
  z-index: 10;
}

#unbox-message-container {
  grid-row: 3;
  /* Bottom area */
  margin: 0;
  display: flex;
  justify-content: center;
}

#unbox-title {
  grid-row: 1;
  /* Stay in top half to balance bottom */
  margin: 0;
  animation: bounceSoft 2s infinite alternate ease-in-out;
}

@keyframes bounceSoft {
  from {
    transform: translateY(10px);
  }

  to {
    transform: translateY(-10px);
  }
}

/* GIFT BOX WRAPPER */
.gift-box {
  grid-row: 2;
  /* EXACT CENTER */
  width: 160px;
  height: 160px;
  position: relative;
  cursor: pointer;
  perspective: 1000px;
}

/* BOX BASE */
.gift-box-body {
  width: 140px;
  height: 120px;
  background-color: #ff4081;
  border: 8px solid #1a1a1a;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  box-shadow: inset -10px -10px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* RIBBONS (REUSABLE) */
.gift-ribbon-v {
  width: 32px;
  height: 100%;
  background: #ffd700;
  border-left: 8px solid #1a1a1a;
  border-right: 8px solid #1a1a1a;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gift-ribbon-h {
  width: 100%;
  height: 32px;
  background: #ffd700;
  border-top: 8px solid #1a1a1a;
  border-bottom: 8px solid #1a1a1a;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* LID CONTAINER (Holds Lid + Bow) */
.gift-lid-container {
  position: absolute;
  top: -12px;
  left: 0;
  width: 160px;
  height: 60px;
  z-index: 20;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-lid {
  width: 160px;
  height: 48px;
  background-color: #ff1744;
  border: 8px solid #1a1a1a;
  position: relative;
  box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* BOW DESIGN V4 */
.gift-bow {
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 48px;
  z-index: 25;
}

.bow-left,
.bow-right {
  position: absolute;
  width: 32px;
  height: 32px;
  background: #ffd700;
  border: 8px solid #1a1a1a;
}

.bow-left {
  left: 0;
}

.bow-right {
  right: 0;
}

.bow-center {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: #ffc107;
  border: 8px solid #1a1a1a;
}

/* THE NOTE CARD */
.gift-note {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translate(-50%, 0) scale(0);
  width: 320px;
  max-width: 90vw;
  z-index: 2;
  opacity: 0;
  transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.note-inner {
  background: #fff;
  border: 4px solid #1a1a1a;
  padding: 24px;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
  text-align: center;
}

.gift-note p {
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  line-height: 1.8;
  color: #333;
  margin: 0 0 15px 0;
}

/* Small Pixel Heart in Note */
.pixel-heart-small {
  width: 20px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 11 9" xmlns="http://www.w3.org/2000/svg"><path fill="%23ff4081" d="M1 1h2v-1h-2z M8 1h2v-1h-2z M0 2h11v-1h-11z M0 4h11v-2h-11z M1 5h9v-1h-9z M2 6h7v-1h-7z M3 7h5v-1h-5z M4 8h3v-1h-3z M5 9h1v-1h-1z"/></svg>');
  background-size: contain;
  margin: 0 auto;
  image-rendering: pixelated;
}

/* ANIMATION: OPENED STATE */
.gift-box.opened .gift-lid-container {
  transform: translateY(-280px) rotate(45deg);
  opacity: 0;
}

.gift-box.opened .gift-note {
  transform: translate(-50%, -180%) scale(1);
  opacity: 1;
}

/* Subtle pulse for the box itself */
.gift-box::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  z-index: -1;
  animation: glowSoft 3s steps(2) infinite alternate;
}

@keyframes glowSoft {
  from {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.9);
  }

  to {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* ========================================= */
/* PHOTOBOOTH LEVEL                          */
/* ========================================= */

#screen-photobooth {
  background: #2b2b2b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  background-image: radial-gradient(circle, #3b3b3b 2px, transparent 2px);
  background-size: 20px 20px;
  color: #fff;
  position: relative;
  z-index: 100;
  /* Ensure it stays above the space galaxy background */
}

.pb-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}

.pb-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: #ff4081;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.5;
}

.video-frame-container {
  position: relative;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  margin-bottom: 20px;
}

#pb-video {
  width: 90vw;
  max-width: 360px;
  aspect-ratio: 4/3;
  height: auto;
  object-fit: cover;
  background: #000;
  border: 6px solid #fff;
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  transform: scaleX(-1);
  /* Mirror camera */
}

#pb-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Press Start 2P', cursive;
  font-size: 80px;
  color: #ffeb3b;
  text-shadow: 4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  z-index: 10;
}

#pb-flash {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 20;
  opacity: 0;
}

.flash-anim {
  animation: flashWhite 0.2s ease-out;
}

@keyframes flashWhite {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

#pb-strip-container {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  margin-bottom: 20px;
}

#pb-canvas {
  width: 240px;
  /* align with drawing size */
  max-width: 90vw;
  /* height will auto balance based on 4 snaps */
  background: transparent;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}

.pb-controls {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

#pb-continue-options {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  justify-content: center;
}