/* ==========================================================================
1. RESET & VARIABEL GLOBAL
   ========================================================================== */
:root {
  --bg-dark-1: #1D1523;
  --bg-dark-2: #2B1E34;
  --pin-pink: #E899DC;
  --soft-pink: #FFD1DC;
  --mid-pink: #FFC2D1;
  --light-pink: #FFE5EC;
  --accent-rose: #E05780;
  --text-dark: #3B2338;
  --font-serif: 'Georgia', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark-1);
  color: var(--text-dark);
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
2. TAHAP 1: HALAMAN LOGIN (DARK ROMANTIC PASSCODE SCREEN)
   ========================================================================== */
#stage-login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(145deg, #1D1523 0%, #24192C 50%, #2B1E34 100%);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

#stage-login.fade-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 370px;
  padding: 36px 28px 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.tulip-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  animation: gentleFloat 3.5s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.login-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: #F6EAF9;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: rgba(235, 215, 240, 0.65);
  margin-bottom: 24px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.pin-dots .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pin-dots .dot.filled {
  background: #E899DC;
  transform: scale(1.18);
  box-shadow: 0 0 12px rgba(232, 153, 220, 0.75);
}

.pin-dots.error .dot {
  background: #FF6B8B;
  box-shadow: 0 0 12px rgba(255, 107, 139, 0.75);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-7px); }
  80% { transform: translateX(7px); }
}

.pin-dots.shake {
  animation: shake 0.42s ease-in-out;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.key-btn {
  height: 56px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #F7ECFA;
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.key-btn:hover {
  background: rgba(232, 153, 220, 0.2);
}

.key-btn:active {
  transform: scale(0.94);
  background: rgba(232, 153, 220, 0.32);
}

.key-action {
  font-size: 1.2rem;
  color: #E899DC;
}

.login-hint {
  font-size: 0.85rem;
  color: rgba(232, 153, 220, 0.85);
  letter-spacing: 0.3px;
}

/* ==========================================================================
3. TAHAP 2: MENU BOX UTAMA (GRID 2x2 UNTUK 4 OPSI)
   ========================================================================== */
#stage-menu {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: linear-gradient(135deg, #FFF5F8 0%, #FFE3EC 50%, #FFD6E4 100%);
  animation: fadeInScreen 0.6s ease forwards;
}

@keyframes fadeInScreen {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-modal {
  width: 100%;
  max-width: 780px;
  padding: 40px 32px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(201, 75, 118, 0.14);
  text-align: center;
}

.menu-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: #FFE5EC;
  color: #C9184A;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.menu-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  color: #3B1E32;
  margin-bottom: 10px;
}

.menu-desc {
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #6D4C61;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 20px;
  border-radius: 22px;
  border: 1.5px solid rgba(244, 172, 183, 0.45);
  background: #FFFFFF;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.menu-card:hover {
  transform: translateY(-6px);
  border-color: #FF758F;
  box-shadow: 0 14px 30px rgba(224, 87, 128, 0.18);
}

.done-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #16A34A;
  background: #DCFCE7;
  padding: 3px 8px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-card.completed .done-badge {
  opacity: 1;
  transform: scale(1);
}

.postbox-unlock-card {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  text-align: left;
  gap: 16px;
  background: linear-gradient(135deg, #FFF0F3 0%, #FFE5EC 100%);
  border: 2px solid #FF4D6D;
  animation: popUnlock 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.postbox-unlock-card .menu-icon-wrap {
  margin-bottom: 0;
}

@keyframes popUnlock {
  0% { opacity: 0; transform: scale(0.85) translateY(15px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.menu-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.icon-music { background: #F3E8FF; color: #9333EA; }
.icon-flowers { background: #FFE5EC; color: #E11D48; }
.icon-cake { background: #FFF1E6; color: #EA580C; }
.icon-words { background: #FCE7F3; color: #DB2777; }
.icon-postbox { background: #FEE2E2; color: #DC2626; }

.menu-card h3 {
  font-size: 1.12rem;
  color: #3B1E32;
  margin-bottom: 6px;
}

.menu-card p {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #7D5A70;
}

/* Tombol Melayang di Pojok Bawah Saat Semua Kejutan Selesai */
.floating-postbox-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #EF233C, #D90429);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(217, 4, 41, 0.4);
  animation: pulseBtn 1.8s infinite;
}

@keyframes pulseBtn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ==========================================================================
4. TOMBOL KEMBALI KE MENU
   ========================================================================== */
.feature-view {
  position: relative;
  width: 100%;
  min-height: 100vh;
  animation: fadeInScreen 0.5s ease forwards;
}

.btn-back {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 50;
  padding: 10px 18px;
  border: 1px solid rgba(224, 87, 128, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: #9D174D;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-back:hover {
  background: #FFF0F5;
  transform: translateX(-3px);
}

.btn-back-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #FFB3C6;
  border-color: rgba(255, 117, 143, 0.4);
  box-shadow: 0 6px 20px rgba(255, 42, 133, 0.25);
}

.btn-back-dark:hover {
  background: rgba(255, 117, 143, 0.24);
}

/* ==========================================================================
5. OPSI A: HALAMAN MUSIK
   ========================================================================== */
#view-music {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px;
  background: linear-gradient(145deg, #24172E 0%, #3A2247 50%, #522B5B 100%);
}

.music-player-card {
  width: 100%;
  max-width: 410px;
  padding: 34px 26px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  color: #FFF;
}

.vinyl-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.vinyl-disc {
  position: relative;
  width: 185px;
  height: 185px;
  border-radius: 50%;
  background: radial-gradient(circle, #18181B 0%, #09090B 65%, #27272A 100%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55), inset 0 0 0 4px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spinVinyl 6s linear infinite;
  animation-play-state: paused;
}

.vinyl-disc.playing {
  animation-play-state: running;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-grooves {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.03),
    inset 0 0 0 24px rgba(255, 255, 255, 0.04),
    inset 0 0 0 36px rgba(255, 255, 255, 0.03);
}

.vinyl-label {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8FA3, #E899DC);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2B1E34;
  font-weight: 700;
  z-index: 2;
}

.vinyl-heart {
  font-size: 1.1rem;
  line-height: 1;
}

.vinyl-label small {
  font-size: 0.65rem;
  letter-spacing: 1px;
}

.vinyl-spindle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #24172E;
  z-index: 3;
}

.visualizer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
  margin-bottom: 18px;
}

.visualizer span {
  width: 4px;
  height: 6px;
  border-radius: 4px;
  background: #E899DC;
  transition: height 0.2s ease;
}

.visualizer.playing span {
  animation: eqBounce 0.75s ease-in-out infinite alternate;
}

.visualizer.playing span:nth-child(odd) { animation-duration: 0.55s; }
.visualizer.playing span:nth-child(2n) { animation-delay: 0.15s; }
.visualizer.playing span:nth-child(3n) { animation-delay: 0.3s; }
.visualizer.playing span:nth-child(4n) { animation-delay: 0.45s; }

@keyframes eqBounce {
  0% { height: 6px; background: #E899DC; }
  100% { height: 26px; background: #FF8FA3; }
}

.song-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.song-artist {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 18px;
}

.progress-wrap {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #E899DC, #FF758F);
  transition: width 0.25s linear;
}

.player-controls {
  margin-bottom: 22px;
}

.btn-play-pause {
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF758F, #E899DC);
  color: #24172E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(232, 153, 220, 0.4);
  transition: transform 0.2s ease;
}

.btn-play-pause:hover {
  transform: scale(1.07);
}

.lyrics-box {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.94rem;
  line-height: 1.85;
  max-height: 185px;
  overflow-y: auto;
  scroll-behavior: smooth;
  text-align: center;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.lyrics-box::-webkit-scrollbar {
  display: none;
}

.lyrics-line {
  color: rgba(255, 255, 255, 0.36);
  transform: scale(0.95);
  transition: color 0.35s ease, transform 0.35s ease, text-shadow 0.35s ease;
  cursor: pointer;
  user-select: none;
}

.lyrics-line:hover {
  color: rgba(255, 255, 255, 0.78);
}

.lyrics-line.passed {
  color: rgba(255, 255, 255, 0.72);
}

.lyrics-line.active,
.lyrics-line.highlight {
  color: #FFB3C6;
  font-weight: 700;
  transform: scale(1.05);
  text-shadow: 0 0 12px rgba(255, 179, 198, 0.45);
}

/* ==========================================================================
6. OPSI B: HALAMAN FLOWERS
   ========================================================================== */
#view-flowers {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 50px;
  background: radial-gradient(circle at top, #FFF5F8 0%, #FFE3EC 60%, #FFD1DC 100%);
  overflow: hidden;
}

.petals-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.falling-petal {
  position: absolute;
  top: -30px;
  width: 14px;
  height: 18px;
  border-radius: 150% 0 150% 0;
  background: linear-gradient(135deg, #FF8FA3, #FFB3C6);
  opacity: 0.78;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 0.85; }
  50% { transform: translateY(50vh) rotate(180deg) translateX(25px); }
  100% { transform: translateY(105vh) rotate(360deg) translateX(-20px); opacity: 0; }
}

.flowers-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bouquet-stage {
  margin-bottom: 12px;
  animation: gentleFloat 4s ease-in-out infinite;
}

@keyframes bloom {
  0% { opacity: 0; transform: scale(0.15) rotate(-12deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.flower-bloom {
  opacity: 0;
  animation: bloom 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bloom-1 { animation-delay: 0.2s; }
.bloom-2 { animation-delay: 0.45s; }
.bloom-3 { animation-delay: 0.7s; }
.bloom-4 { animation-delay: 0.95s; }
.bloom-5 { animation-delay: 1.2s; }

.flower-message-card {
  padding: 28px 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(201, 24, 74, 0.12);
  border: 1px solid #FFFFFF;
}

.flower-message-card h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #9D174D;
  margin-bottom: 10px;
}

.flower-message-card p {
  font-size: 0.96rem;
  line-height: 1.65;
  color: #5C374C;
}

/* ==========================================================================
7. OPSI C: HALAMAN KUE ULANG TAHUN
   ========================================================================== */
#view-cake {
  min-height: 200vh;
  background: linear-gradient(
    180deg,
    #FFFFFF 0%,
    #FFFFFF 38vh,
    #FFD1DC 38vh,
    #FFC2D1 68%,
    #FFE5EC 100%
  );
  overflow-x: hidden;
}

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  animation: confettiDrop linear forwards;
}

@keyframes confettiDrop {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.cake-hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 85px 20px 30px;
  position: relative;
}

.celebration-banner {
  text-align: center;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.celebration-banner.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.celebration-banner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: #C9184A;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
}

.celebration-banner p {
  font-size: 0.95rem;
  color: #7D2E46;
  font-weight: 500;
}

.cake-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 30px;
}

.candles-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: -2px;
  z-index: 5;
  opacity: 0;
}

.cake-assembly.animate-cake .candles-row {
  animation: candleAppear 0.5s ease-out 1.2s forwards;
}

@keyframes candleAppear {
  0% { opacity: 0; transform: translateY(-25px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flame {
  width: 14px;
  height: 22px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #FFF3B0 15%, #FF9F1C 65%, #FF5400 100%);
  box-shadow: 0 0 14px #FF9F1C, 0 0 26px rgba(255, 159, 28, 0.65);
  transform-origin: center bottom;
  animation: flicker 0.35s ease-in-out infinite alternate;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.candle:nth-child(2) .flame { animation-delay: 0.12s; }
.candle:nth-child(3) .flame { animation-delay: 0.24s; }

@keyframes flicker {
  0% { transform: scale(1) rotate(-3deg); }
  50% { transform: scale(1.06, 0.95) rotate(2deg); }
  100% { transform: scale(0.96, 1.05) rotate(-1deg); }
}

.candles-row.blown-out .flame {
  opacity: 0;
  transform: scale(0.1);
  animation: none;
}

.smoke {
  position: absolute;
  top: -18px;
  width: 8px;
  height: 24px;
  border-radius: 50%;
  background: rgba(130, 130, 145, 0.45);
  filter: blur(3px);
  opacity: 0;
  pointer-events: none;
}

.candles-row.blown-out .smoke {
  animation: smokeRise 2.2s ease-out forwards;
}

@keyframes smokeRise {
  0% { opacity: 0.75; transform: translateY(0) scale(0.8); }
  50% { opacity: 0.45; transform: translateY(-22px) translateX(6px) scale(1.4); }
  100% { opacity: 0; transform: translateY(-46px) translateX(-5px) scale(2); }
}

.wick {
  width: 2.5px;
  height: 7px;
  background: #3B2338;
  border-radius: 2px;
}

.candle-body {
  width: 11px;
  height: 36px;
  border-radius: 4px 4px 2px 2px;
  background: repeating-linear-gradient(-45deg, #FFFFFF, #FFFFFF 5px, #FF758F 5px, #FF758F 10px);
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.12);
}

.cake-block {
  position: relative;
  border-radius: 12px 12px 8px 8px;
  box-shadow: 0 8px 18px rgba(157, 23, 77, 0.15), inset 0 -6px 0 rgba(0, 0, 0, 0.06);
  opacity: 0;
  overflow: hidden;
}

.icing-drip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 15px;
  background: #FFFDFD;
  border-radius: 12px 12px 0 0;
}

.icing-drip::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 12px;
  background: radial-gradient(circle at 12px 0, #FFFDFD 10px, transparent 11px);
  background-size: 24px 12px;
}

.cake-sprinkles {
  position: absolute;
  bottom: 10px;
  left: 14px;
  right: 14px;
  height: 6px;
  background: radial-gradient(circle, #FFF 2.5px, transparent 3px);
  background-size: 22px 6px;
  opacity: 0.75;
}

.block-4 { width: 130px; height: 44px; background: linear-gradient(180deg, #FF9EBB 0%, #FF758F 100%); z-index: 4; }
.block-3 { width: 175px; height: 48px; background: linear-gradient(180deg, #FFB3C6 0%, #FF8FA3 100%); z-index: 3; }
.block-2 { width: 220px; height: 52px; background: linear-gradient(180deg, #FF8FA3 0%, #FB6F92 100%); z-index: 2; }
.block-1 { width: 268px; height: 56px; background: linear-gradient(180deg, #FB6F92 0%, #E05780 100%); z-index: 1; }

.cake-plate {
  width: 306px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1DCE4 100%);
  box-shadow: 0 8px 20px rgba(157, 23, 77, 0.2);
  margin-top: -2px;
}

@keyframes dropBounce {
  0% { opacity: 0; transform: translateY(-280px) scaleY(1.06); }
  65% { opacity: 1; transform: translateY(8px) scaleY(0.94); }
  82% { transform: translateY(-5px) scaleY(1.02); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

.cake-assembly.animate-cake .block-1 { animation: dropBounce 0.65s cubic-bezier(0.28, 0.84, 0.42, 1) 0s forwards; }
.cake-assembly.animate-cake .block-2 { animation: dropBounce 0.65s cubic-bezier(0.28, 0.84, 0.42, 1) 0.3s forwards; }
.cake-assembly.animate-cake .block-3 { animation: dropBounce 0.65s cubic-bezier(0.28, 0.84, 0.42, 1) 0.6s forwards; }
.cake-assembly.animate-cake .block-4 { animation: dropBounce 0.65s cubic-bezier(0.28, 0.84, 0.42, 1) 0.9s forwards; }

.candle-control-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 25px rgba(201, 24, 74, 0.14);
  margin-bottom: 28px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background-color: #D8B4C4;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  border-radius: 50%;
  background-color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #FF5C8A;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

.toggle-label-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #591C3B;
  min-width: 112px;
}

.scroll-indicator {
  font-size: 0.9rem;
  font-weight: 600;
  color: #9D174D;
  animation: bounceScroll 1.8s ease-in-out infinite;
}

@keyframes bounceScroll {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.cake-scroll-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
}

.birthday-wish-card {
  width: 100%;
  max-width: 560px;
  padding: 42px 32px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(180, 40, 85, 0.16);
  border: 1px solid #FFFFFF;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.birthday-wish-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wish-card-ribbon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.birthday-wish-card h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  color: #9D174D;
  margin-bottom: 18px;
}

.birthday-wish-card p {
  font-size: 1rem;
  line-height: 1.75;
  color: #543246;
  margin-bottom: 16px;
}

.wish-signature {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed #F4ACB7;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
  color: #7D5A70;
}

.wish-signature strong {
  color: #C9184A;
  font-size: 1.02rem;
}

/* ==========================================================================
8. OPSI D: HALAMAN KATA-KATA 3D NEON (CANVAS 3D ANTI-BLANK DI TAB & HP)
   ========================================================================== */
#view-words {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 30;
  background: radial-gradient(circle at center, #180611 0%, #070105 65%, #000000 100%);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#words-3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#words-3d-canvas:active {
  cursor: grabbing;
}

#view-words .btn-back-dark {
  z-index: 9999;
}

.drag-hint-pill {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 117, 143, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFD1DC;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}

/* ==========================================================================
9. OPSI E: HALAMAN KOTAK POS & ANIMASI AMPLOP MASUK CELAH
   ========================================================================== */
#view-postbox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 85px 20px 50px;
  background: linear-gradient(150deg, #FFF5F8 0%, #FFE3EC 55%, #FFD1DC 100%);
}

.postbox-layout {
  width: 100%;
  max-width: 820px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 32px;
}

.postbox-stage {
  position: relative;
  width: 220px;
  height: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.postbox-stage.bounce-happy {
  animation: mailboxBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mailboxBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.07, 0.94); }
  70% { transform: scale(0.97, 1.04); }
  100% { transform: scale(1); }
}

.mail-slot-clip {
  position: absolute;
  top: -35px;
  left: 0;
  width: 100%;
  height: 122px;
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.flying-envelope {
  position: absolute;
  top: 0;
  width: 86px;
  height: 54px;
  background: #FFFFFF;
  border: 2px solid #FFB3C6;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-20px) scale(1);
}

.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 41px solid transparent;
  border-right: 41px solid transparent;
  border-top: 28px solid #FFE5EC;
}

.env-heart {
  position: relative;
  z-index: 2;
  color: #E01B1B;
  font-size: 1rem;
  margin-top: 6px;
}

.flying-envelope.animate-insert {
  animation: insertLetter 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes insertLetter {
  0% { opacity: 0; transform: translateY(-10px) rotate(-10deg) scale(1.05); }
  20% { opacity: 1; transform: translateY(26px) rotate(-4deg) scale(0.96); }
  55% { opacity: 1; transform: translateY(62px) rotate(0deg) scale(0.86); }
  100% { opacity: 1; transform: translateY(135px) rotate(0deg) scale(0.82); }
}

.postbox-hearts {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
}

.mini-heart {
  position: absolute;
  font-size: 1.1rem;
  animation: floatHeartUp 1.4s ease-out forwards;
}

@keyframes floatHeartUp {
  0% { opacity: 1; transform: translate(0, 0) scale(0.6); }
  100% { opacity: 0; transform: translate(var(--dx), -65px) scale(1.25); }
}

.reply-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 34px 28px;
  box-shadow: 0 20px 50px rgba(201, 24, 74, 0.14);
  border: 1px solid #FFFFFF;
}

.reply-card h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #3B1E32;
  margin-bottom: 8px;
}

.reply-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #6D4C61;
  margin-bottom: 20px;
}

.reply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-input,
.reply-textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px solid #F4ACB7;
  background: #FFF9FB;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: #3B2338;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reply-input:focus,
.reply-textarea:focus {
  border-color: #E01B1B;
  box-shadow: 0 0 0 3px rgba(224, 27, 27, 0.12);
}

.btn-send-mail {
  margin-top: 4px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #EF233C, #C9184A);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(201, 24, 74, 0.28);
  transition: transform 0.2s ease;
}

.btn-send-mail:hover {
  transform: translateY(-2px);
}

.mail-sent-status {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #FFF0F3;
  border: 1px dashed #FF758F;
  text-align: center;
  animation: fadeInScreen 0.5s ease;
}

.sent-title {
  font-weight: 700;
  color: #C9184A;
  margin-bottom: 6px;
}

.sent-preview {
  font-size: 0.9rem;
  font-style: italic;
  color: #543246;
  margin-bottom: 12px;
}

.btn-wa-forward {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
10. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 720px) {
  .menu-modal { padding: 30px 20px; }
  .menu-grid { grid-template-columns: 1fr; gap: 14px; }
  .menu-card { flex-direction: row; text-align: left; padding: 18px; gap: 16px; }
  .menu-icon-wrap { margin-bottom: 0; width: 54px; height: 54px; }
  .postbox-layout { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 420px) {
  .login-card { padding: 28px 20px 24px; }
  .key-btn { height: 52px; font-size: 1.2rem; }
  .btn-back { top: 14px; left: 14px; padding: 8px 14px; font-size: 0.82rem; }
  .birthday-wish-card { padding: 32px 22px; }
}
