:root {
  --bg-1: #3c1053;
  --bg-2: #ad5389;
  --accent-1: #ff6ec7;
  --accent-2: #ffd166;
  --accent-3: #06d6a0;
  --accent-4: #118ab2;
  --white: #ffffff;
  --shadow: rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: "Baloo 2", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--white);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#confetti {
  position: absolute;
  inset: 0;
}

.floating-sprites {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sprite {
  position: absolute;
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 6px 12px var(--shadow));
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* Balloons */
.balloon {
  border-radius: 50% 50% 45% 45%;
}
.balloon::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 18px;
  background: #8d6e63;
  border-radius: 3px;
}
.balloon.red { background: #ff5964; left: 8%; top: 20%; animation-duration: 9s; }
.balloon.blue { background: #4ecdc4; left: 70%; top: 25%; animation-duration: 10s; }
.balloon.yellow { background: #ffe66d; left: 35%; top: 15%; animation-duration: 11s; }

/* Star sprite */
.star {
  width: 60px; height: 60px; left: 80%; top: 60%;
  background: radial-gradient(circle at 50% 50%, #fff59d 0%, #f9a825 70%);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: twinkle 2s ease-in-out infinite, float 7s ease-in-out infinite;
}
@keyframes twinkle {
  0%,100% { filter: drop-shadow(0 0 0px #ffd166); opacity: 0.9; }
  50% { filter: drop-shadow(0 0 12px #ffd166); opacity: 1; }
}

/* Cupcake sprite */
.cupcake {
  left: 15%; top: 75%;
  width: 90px; height: 90px;
  animation-duration: 9s;
}
.cupcake::before {
  content: "";
  position: absolute; bottom: 0; left: 10%;
  width: 80%; height: 45%;
  background: #f28ab2;
  border-radius: 12px 12px 6px 6px;
}
.cupcake::after {
  content: "";
  position: absolute; bottom: 40%;
  left: 50%; transform: translateX(-50%);
  width: 70%; height: 35%;
  background: #fff; border-radius: 50% 50% 45% 45%;
  box-shadow: inset 0 -6px 0 #ffd166;
}

/* Layout */
.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 8vh auto 6vh;
  padding: 24px;
  text-align: center;
}

.title {
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: 0.5px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin: 0 0 24px;
}

#messages {
  min-height: 160px;
}

.msg {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(1px);
  transition: opacity 700ms ease, transform 700ms ease, filter 700ms ease;
  font-size: 1.25rem;
  background: rgba(255,255,255,0.12);
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 20px var(--shadow);
}

.msg.show {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.hidden { display: none; }

.prompt {
  font-size: 1.1rem;
  margin: 18px 0;
}

/* Center the password form block when it appears */
.auth-block {
  display: grid;
  place-items: center;
  gap: 12px;
  margin: 40px auto 0;
  max-width: 600px;
}

form {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

input[type="password"] {
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  width: 260px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  outline: 2px solid transparent;
  transition: outline-color 200ms ease, background 200ms ease;
}
input[type="password"]::placeholder { color: rgba(255,255,255,0.7); }
input[type="password"]:focus { outline-color: var(--accent-3); background: rgba(255,255,255,0.25); }

.btn {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
  color: #2d3142;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px var(--shadow);
  transition: transform 80ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(1px); box-shadow: 0 8px 12px var(--shadow); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent-3), var(--accent-4));
  color: #072a2f;
}

.status {
  min-height: 24px;
  margin-top: 10px;
  font-weight: 600;
}

/* Voucher block spacing */
.voucher-block {
  margin-top: 24px;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 12px; left: 0; right: 0;
  text-align: center;
  opacity: 0.85;
  font-size: 0.9rem;
}

/* ... keep previous styles ... */

#message-box {
  position: relative;
  height: 60px; /* fixed space for one phrase */
  margin-bottom: 20px;
}

.msg {
  position: absolute;
  top: 0; 
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  filter: blur(1px);
  transition: opacity 700ms ease, transform 700ms ease, filter 700ms ease;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.12);
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 12px var(--shadow);
  white-space: wrap;
}

.msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  filter: blur(0);
}

/* Center the password form */
.auth-block {
  display: grid;
  place-items: center;
  gap: 12px;
  margin-top: 120px;
}

