/* Import Elegant Fonts */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

/* ==========================================
   CSS CUSTOM PROPERTIES & THEMES
   ========================================== */
:root {
  /* Starry Dream Theme (Default) */
  --bg-gradient: linear-gradient(135deg, #0f0c1b 0%, #201335 50%, #0c081e 100%);
  --text-main: #f3f0ff;
  --text-muted: #b5a9df;
  --accent: #ffd700;
  /* Gold */
  --accent-rgb: 255, 215, 0;
  --accent-secondary: #ff7ebb;
  /* Pink/Violet */
  --accent-secondary-rgb: 255, 126, 187;
  --card-bg: rgba(25, 18, 48, 0.45);
  --card-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow-color: rgba(255, 215, 0, 0.3);
  --font-heading: 'Playfair Display', serif;
  --font-script: 'Dancing Script', cursive;
  --font-body: 'Outfit', sans-serif;

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
}

/* Theme - Rose Gold Blush */
body.theme-blush {
  --bg-gradient: linear-gradient(135deg, #fff3f3 0%, #ffe3e3 50%, #ffd4da 100%);
  --text-main: #4a282d;
  --text-muted: #805b61;
  --accent: #b76e79;
  /* Rose Gold */
  --accent-rgb: 183, 110, 121;
  --accent-secondary: #e6b8a2;
  --accent-secondary-rgb: 230, 184, 162;
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-border: rgba(183, 110, 121, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(183, 110, 121, 0.1);
  --glow-color: rgba(183, 110, 121, 0.2);
}

/* Theme - Emerald Luxury */
body.theme-emerald {
  --bg-gradient: linear-gradient(135deg, #051611 0%, #0a2d21 50%, #04120e 100%);
  --text-main: #e6f5f0;
  --text-muted: #8fbcae;
  --accent: #c5a85c;
  /* Champagne Gold */
  --accent-rgb: 197, 168, 92;
  --accent-secondary: #10b981;
  /* Emerald Green */
  --accent-secondary-rgb: 16, 185, 129;
  --card-bg: rgba(8, 30, 23, 0.5);
  --card-border: rgba(197, 168, 92, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --glow-color: rgba(197, 168, 92, 0.3);
}

/* Theme - Synthwave Neon */
body.theme-neon {
  --bg-gradient: linear-gradient(135deg, #0d0115 0%, #17002b 50%, #05000a 100%);
  --text-main: #f0f0ff;
  --text-muted: #a69cb8;
  --accent: #ff007f;
  /* Neon Pink */
  --accent-rgb: 255, 0, 127;
  --accent-secondary: #00ffff;
  /* Neon Cyan */
  --accent-secondary-rgb: 0, 255, 255;
  --card-bg: rgba(23, 3, 41, 0.6);
  --card-border: rgba(0, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(255, 0, 127, 0.2);
  --glow-color: rgba(0, 255, 255, 0.4);
}

/* ==========================================
   DARK MODE AUTO-DET ECT (prefers-color-scheme)
   ========================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-gradient: linear-gradient(135deg, #0a0a1a 0%, #1b1b3a 50%, #050520 100%);
    --text-main: #e0e0ff;
    --text-muted: #b0a0d0;
    --accent: #ffcc00;
    --accent-rgb: 255, 204, 0;
    --accent-secondary: #ff66ff;
    --accent-secondary-rgb: 255, 102, 255;
    --card-bg: rgba(20, 18, 40, 0.45);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.7);
    --glow-color: rgba(255, 204, 0, 0.4);
  }
}

/* Utility classes */
.hover-lift {
  transition: var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s forwards;
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  background: rgba(var(--accent-rgb), 0.2);
  transform: scale(0);
  opacity: 0.75;
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(5);
    opacity: 0;
  }
}

/* ==========================================
   GLOBAL RESET & BASE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background var(--transition-smooth);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.3);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.6);
}

/* Backdrop Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Container */
.main-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px 40px;
  display: none;
  /* Hidden until cover page is unlocked */
}

/* Glassmorphism Common Class */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4), 0 0 20px 0 var(--glow-color);
}

/* Headings */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.script-text {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--accent);
}

/* Floating Navigation */
.navbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 1000;
  display: flex;
  gap: 8px;
  background: rgba(var(--card-bg), 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px;
  border-radius: 40px;
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
  opacity: 0;
}

.navbar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.nav-btn:hover,
.nav-btn.active {
  color: var(--text-main);
  background: rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.2);
  transform: translateY(-2px);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==========================================
   INTRO SCREEN (GIFT BOX SYSTEM)
   ========================================== */
#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.intro-title {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeInDown 1.2s forwards 0.3s;
}

.intro-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 1.2s forwards 0.6s;
}

/* Gift Box Container */
.gift-container {
  position: relative;
  width: 180px;
  height: 180px;
  cursor: pointer;
  perspective: 1000px;
  transform: scale(0.9);
  opacity: 0;
  animation: scaleInUp 1.2s forwards 0.9s;
}

.gift-box {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-container:hover .gift-box {
  transform: rotateY(15deg) rotateX(10deg);
  animation: shake 0.5s infinite alternate;
}

/* Box Faces */
.gift-face {
  position: absolute;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #ff4081, #f50057);
  border: 4px solid #c2185b;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Ribbon details */
.gift-face::before,
.gift-face::after {
  content: '';
  position: absolute;
  background: var(--accent);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.gift-face::before {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 30px;
  height: 100%;
}

.gift-face::after {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 30px;
}

/* Lid style */
.gift-lid {
  position: absolute;
  width: 166px;
  height: 40px;
  top: -15px;
  left: -8px;
  background: linear-gradient(135deg, #ff4081, #f50057);
  border: 4px solid #c2185b;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform-origin: bottom;
  transition: transform 0.6s;
  z-index: 2;
}

.gift-lid::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 100%;
  background: var(--accent);
}

/* Ribbon Bow */
.gift-bow {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 25px;
  z-index: 3;
  transition: transform 0.5s;
}

.gift-bow::before,
.gift-bow::after {
  content: '';
  position: absolute;
  width: 35px;
  height: 25px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #b79500;
}

.gift-bow::before {
  left: 0;
  transform: rotate(-30deg);
}

.gift-bow::after {
  right: 0;
  transform: rotate(30deg);
}

/* Open gift interaction */
.gift-container.opened .gift-lid {
  transform: translateY(-60px) rotate(-20deg) scale(0.9);
  opacity: 0;
}

.gift-container.opened .gift-bow {
  transform: translateY(-80px) scale(0.5);
  opacity: 0;
}

.gift-container.opened .gift-box {
  transform: scale(0.8);
  opacity: 0.5;
}

.unlock-prompt {
  margin-top: 30px;
  font-size: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0;
  animation: pulseGlow 2s infinite alternate, fadeIn 1s forwards 1.2s;
}

/* ==========================================
   SECTIONS GENERAL
   ========================================== */
section {
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 80vh;
  justify-content: center;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 50px;
  max-width: 600px;
}

/* ==========================================
   HERO / GREETING SECTION
   ========================================== */
#greeting .hero-card {
  max-width: 800px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.confetti-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Countdown Timer */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 80px;
  padding: 12px;
  border-radius: var(--border-radius-md);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.countdown-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-body);
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 1px;
}

/* ==========================================
   3D CARD SECTION
   ========================================== */
.card-scene {
  width: 320px;
  height: 440px;
  perspective: 1500px;
  cursor: pointer;
  margin: 20px auto;
}

.card3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-scene:hover .card3d {
  transform: rotateY(15deg);
}

/* Flip state */
.card-scene.flipped .card3d {
  transform: rotateY(-180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--card-border);
}

/* Card Front Styling */
.card-front {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-secondary-rgb), 0.15)), var(--card-bg);
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.card-front-art {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(var(--accent-rgb), 0.4);
  animation: spinSlow 20s linear infinite;
}

.card-front-art svg {
  width: 80px;
  height: 80px;
  fill: var(--accent);
}

.card-decor {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: calc(var(--border-radius-lg) - 4px);
  pointer-events: none;
}

.flip-prompt {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 15px;
  animation: pulse 1.5s infinite;
}

/* Card Back Styling */
.card-back {
  background: var(--card-bg);
  transform: rotateY(180deg);
  text-align: left;
  justify-content: flex-start;
  gap: 20px;
  overflow-y: auto;
}

.card-back-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
  padding-bottom: 8px;
  color: var(--accent);
}

.card-back-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  font-family: var(--font-body);
  white-space: pre-wrap;
}

.card-back-sign {
  font-family: var(--font-script);
  font-size: 2rem;
  text-align: right;
  margin-top: auto;
  color: var(--accent-secondary);
}

/* ==========================================
   VIRTUAL CAKE SECTION
   ========================================== */
.cake-stage {
  position: relative;
  width: 300px;
  height: 320px;
  margin: 40px auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* Plate */
.cake-plate {
  position: absolute;
  width: 320px;
  height: 20px;
  background: linear-gradient(to bottom, #f0f0f0, #d6d6d6);
  border-radius: 50%;
  bottom: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* SVG Cake Design */
.cake-svg {
  width: 260px;
  height: 260px;
  z-index: 2;
  margin-bottom: 15px;
}

/* Candle Flames animation */
.flame {
  transform-origin: center bottom;
  animation: flicker 0.15s ease-in-out infinite alternate;
  cursor: pointer;
  transition: opacity 0.5s ease-out;
}

.flame.extinguished {
  opacity: 0;
  pointer-events: none;
}

/* Sparkle stars on blowout */
.smoke-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: white;
  pointer-events: none;
  animation: riseAndFade 1.2s forwards;
}

.cake-instructions {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Success Celebration Message */
.cake-success-msg {
  display: none;
  margin-top: 20px;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ==========================================
   MEMORY LANE SECTION (TIMELINE)
   ========================================== */
.timeline-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 40px auto 0;
  padding: 20px 0;
}

/* Central line */
.timeline-wrapper::before {
  content: '';
  position: absolute;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-secondary));
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(50px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Alternating sides */
.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

/* Timeline dots */
.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--text-main);
  top: 28px;
  z-index: 10;
  box-shadow: 0 0 15px var(--glow-color);
  transition: transform 0.3s;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  background: var(--accent-secondary);
}

.timeline-item.left .timeline-dot {
  right: -10px;
}

.timeline-item.right .timeline-dot {
  left: -10px;
}

/* Timeline Cards */
.timeline-card {
  overflow: hidden;
}

.timeline-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  margin-bottom: 15px;
  transition: var(--transition-smooth);
}

.timeline-card:hover .timeline-img {
  transform: scale(1.03);
}

.timeline-date {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-item h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.timeline-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline-wrapper::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 50px;
    padding-right: 10px;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 10px;
  }
}

/* ==========================================
   WISH WALL (GUESTBOOK)
   ========================================== */
.wish-wall-layout {
  width: 100%;
  max-width: 1000px;
  margin-top: 30px;
}

/* Form Container */
.wish-form-panel {
  max-width: 500px;
  margin: 0 auto 50px;
}

.input-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  margin-bottom: 18px;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.input-group input,
.input-group textarea,
.input-group select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow-color);
  background: rgba(255, 255, 255, 0.1);
}

/* Sticker Color Selectors */
.color-picker {
  display: flex;
  gap: 12px;
  margin: 10px 0 20px;
  align-items: center;
}

.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition-smooth);
}

.color-dot.selected {
  border-color: var(--text-main);
  transform: scale(1.15);
}

/* Action Buttons */
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  color: #0c081e;
  border: none;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.5), 0 0 15px var(--glow-color);
}

.btn-primary:active {
  transform: translateY(0);
}

/* The Board Grid */
.wishes-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  width: 100%;
  perspective: 1000px;
}

/* Polaroid Wish Card */
.wish-card {
  background: #fff;
  color: #333;
  padding: 18px;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  transform: rotate(var(--rotation, 0deg));
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  cursor: pointer;
}

.wish-card:hover {
  transform: rotate(0deg) scale(1.08) translateY(-10px);
  box-shadow: 10px 15px 25px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

/* Different Polaroid Paper styles */
.wish-card.sticker-pink {
  background-color: #fff0f5;
}

.wish-card.sticker-blue {
  background-color: #e0f7fa;
}

.wish-card.sticker-yellow {
  background-color: #fffde7;
}

.wish-card.sticker-green {
  background-color: #e8f5e9;
}

.wish-card.sticker-purple {
  background-color: #f3e5f5;
}

.wish-message {
  font-family: 'Dancing Script', cursive;
  font-size: 1.35rem;
  line-height: 1.4;
  margin-bottom: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.wish-sender {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: #666;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding-top: 8px;
}

/* ==========================================
   BALLOON MINI-GAME SECTION
   ========================================== */
#game {
  min-height: 90vh;
}

.game-card {
  max-width: 800px;
  width: 100%;
}

.game-hud {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
}

.hud-item {
  font-size: 1.1rem;
  font-weight: 600;
}

.hud-item span {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.3rem;
}

.game-arena {
  position: relative;
  width: 100%;
  height: 450px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  overflow: hidden;
  cursor: crosshair;
}

.game-start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 8, 30, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: opacity 0.5s;
}

.game-start-overlay h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.game-start-overlay p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 320px;
}

/* Game Balloon CSS */
.game-balloon {
  position: absolute;
  width: 50px;
  height: 65px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  bottom: -100px;
  cursor: pointer;
  user-select: none;
  animation: balloonFloat linear;
}

/* Balloon string */
.game-balloon::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
}

/* Balloon knot */
.game-balloon::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  background: inherit;
}

/* Pop quote element */
.pop-quote {
  position: absolute;
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  pointer-events: none;
  animation: popQuoteUp 0.8s ease-out forwards;
  z-index: 5;
  white-space: nowrap;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* ==========================================
   PERSONALIZER CONTROL PANEL (SETTINGS)
   ========================================== */
.settings-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(var(--card-bg), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.settings-toggle:hover {
  color: var(--accent);
  transform: rotate(45deg) scale(1.05);
  box-shadow: 0 0 15px var(--glow-color);
}

.settings-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Audio toggle */
.audio-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(var(--card-bg), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.audio-toggle:hover {
  color: var(--accent-secondary);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(var(--accent-secondary-rgb), 0.3);
}

.audio-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.audio-toggle.muted svg.unmuted-icon,
.audio-toggle:not(.muted) svg.muted-icon {
  display: none;
}

/* Settings Drawer (Sliding Panel) */
.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  z-index: 9999;
  background: rgba(15, 12, 27, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--card-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  padding: 30px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.drawer-close:hover {
  color: var(--accent);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.drawer-section h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

/* Memory List Editor */
.editor-list-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--card-border);
  margin-bottom: 10px;
}

.editor-list-item input,
.editor-list-item textarea {
  padding: 8px;
  font-size: 0.85rem;
}

/* Toast message */
.toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: rgba(var(--accent-rgb), 0.2);
  border: 1px solid var(--accent);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================
   ANIMATIONS & KEYFRAMES
   ========================================== */
@keyframes shake {
  0% {
    transform: rotateY(15deg) rotateX(10deg) rotate(0deg);
  }

  25% {
    transform: rotateY(15deg) rotateX(10deg) rotate(-2deg);
  }

  75% {
    transform: rotateY(15deg) rotateX(10deg) rotate(2deg);
  }

  100% {
    transform: rotateY(15deg) rotateX(10deg) rotate(0deg);
  }
}

@keyframes flicker {
  0% {
    transform: scale(1) rotate(-1deg);
    filter: drop-shadow(0 0 4px rgba(255, 165, 0, 0.8));
  }

  50% {
    transform: scale(0.9) rotate(2deg) skewX(2deg);
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.9));
  }

  100% {
    transform: scale(1.1) rotate(-2deg);
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes riseAndFade {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-80px) scale(0.3);
    opacity: 0;
  }
}

@keyframes balloonFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-250px) rotate(15deg);
  }

  100% {
    transform: translateY(-600px) rotate(-10deg);
  }
}

@keyframes popQuoteUp {
  0% {
    transform: scale(0.5) translateY(0);
    opacity: 0;
  }

  30% {
    transform: scale(1.1) translateY(-20px);
    opacity: 1;
  }

  100% {
    transform: scale(1) translateY(-60px);
    opacity: 0;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleInUp {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseGlow {
  0% {
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.3);
  }

  100% {
    text-shadow: 0 0 15px rgba(var(--accent-rgb), 0.8);
  }
}

/* ==========================================
   FOOTER STYLING
   ========================================== */
footer {
  margin-top: 80px;
  padding: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-smooth);
}

footer a:hover {
  color: var(--accent-secondary);
}

/* ==========================================
   POWERHOUSE AURA SCANNER STYLING
   ========================================== */
#scanner .scanner-console {
  max-width: 500px;
  width: 100%;
  margin: 30px auto;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

#scan-btn {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border: 4px solid var(--accent);
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2), inset 0 0 15px rgba(var(--accent-rgb), 0.1);
  user-select: none;
  -webkit-user-select: none;
}

#scan-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  box-shadow: 0 0 30px rgba(var(--accent-secondary-rgb), 0.4), inset 0 0 20px rgba(var(--accent-secondary-rgb), 0.2);
}

#scan-btn.active {
  animation: scannerPulse 1s infinite alternate;
  background: radial-gradient(circle, rgba(var(--accent-secondary-rgb), 0.4) 0%, rgba(var(--accent-rgb), 0.2) 100%);
  border-color: var(--accent-secondary);
  color: #fff;
  transform: scale(0.95);
}

.scan-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.scan-progress .progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.1s linear;
}

.scan-result {
  width: 100%;
  margin-top: 15px;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#archetype-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.stat-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  width: 100px;
}

.stat-bar {
  flex-grow: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
  border-radius: 5px;
  animation: statGrow 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stat-value {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  width: 45px;
  text-align: right;
}

@keyframes scannerPulse {
  0% {
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4), inset 0 0 15px rgba(var(--accent-rgb), 0.2);
    transform: scale(0.96);
  }
  100% {
    box-shadow: 0 0 40px rgba(var(--accent-secondary-rgb), 0.8), inset 0 0 25px rgba(var(--accent-secondary-rgb), 0.4);
    transform: scale(1.04);
  }
}

@keyframes statGrow {
  from { width: 0% !important; }
}

/* ==========================================
   3D HOLOGRAPHIC AR/VR CARD STYLING
   ========================================== */
#arcard .arcard-viewport {
  max-width: 600px;
  width: 100%;
  height: 460px;
  margin: 30px auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: radial-gradient(circle at center, rgba(10, 6, 30, 0.85) 0%, rgba(3, 1, 15, 0.98) 100%);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.5), inset 0 0 25px rgba(var(--accent-rgb), 0.15);
  transition: var(--transition-smooth);
}

/* Background Viewfinder effects */
.viewfinder-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 30px 30px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 1;
}

/* Simulated Viewfinder camera bracket overlay */
.viewfinder-bracket {
  position: absolute;
  width: 25px;
  height: 25px;
  border: 3px solid rgba(var(--accent-rgb), 0.4);
  pointer-events: none;
  z-index: 5;
  transition: var(--transition-smooth);
}
.viewfinder-bracket.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.viewfinder-bracket.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.viewfinder-bracket.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.viewfinder-bracket.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }

#arcard-viewport.ar-active .viewfinder-bracket {
  border-color: rgba(0, 255, 255, 0.85);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}
#arcard-viewport.vr-active .viewfinder-bracket {
  border-color: rgba(255, 0, 127, 0.85);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
}

/* Scanning digital laser sweeping overlay */
.viewfinder-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-secondary-rgb), 0.8), transparent);
  box-shadow: 0 0 12px var(--accent-secondary);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}
#arcard-viewport.ar-active .viewfinder-laser {
  animation: laserSweep 3s infinite linear;
  opacity: 1;
}

@keyframes laserSweep {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Viewfinder HUD Info overlay */
.viewfinder-hud {
  position: absolute;
  top: 25px;
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.hud-readout {
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
}

/* VR Parallax background stars rendering */
.vr-stars-bg {
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: radial-gradient(circle at center, rgba(15, 5, 45, 0.95) 0%, rgba(3, 1, 15, 0.99) 100%);
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}

#arcard-viewport.vr-active .vr-stars-bg {
  opacity: 1;
}

/* Simulated AR digital target points */
.ar-dots-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(0, 255, 255, 0.15) 15%, transparent 16%);
  background-size: 20px 20px;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}
#arcard-viewport.ar-active .ar-dots-bg {
  opacity: 1;
  animation: bgMatrixScroll 20s linear infinite;
}

@keyframes bgMatrixScroll {
  from { background-position: 0 0; }
  to { background-position: 40px 40px; }
}

/* Perspective Scene container */
.card-scene-3d {
  width: 250px;
  height: 320px;
  perspective: 1200px;
  z-index: 4;
  cursor: grab;
}
.card-scene-3d:active {
  cursor: grabbing;
}

/* Floating Card body with dynamic 3D tilt custom properties */
.holo-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.holo-card-3d.flipped {
  /* Dynamic flip to reveal back face */
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(calc(var(--tilt-y, 0deg) + 180deg));
}

/* Double-sided card face structure */
.holo-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition-smooth);
  background: rgba(var(--card-bg), 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.holo-card-front {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-secondary-rgb), 0.05) 100%), rgba(20, 10, 45, 0.8);
}

.holo-card-back {
  background: linear-gradient(135deg, rgba(var(--accent-secondary-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.05) 100%), rgba(10, 5, 25, 0.9);
  transform: rotateY(180deg);
}

/* Hologram visual grids/borders */
.holo-border {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: calc(var(--border-radius-md) - 4px);
  pointer-events: none;
}

.holo-card-3d:hover .holo-border {
  border-color: rgba(var(--accent-secondary-rgb), 0.6);
  box-shadow: 0 0 10px rgba(var(--accent-secondary-rgb), 0.2);
}

.holo-circle-glow {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--accent-rgb), 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  position: relative;
  animation: rotateDashed 12s linear infinite;
}

.holo-circle-glow svg {
  width: 36px;
  height: 36px;
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
  animation: pulseScale 2s infinite ease-in-out alternate;
}

@keyframes rotateDashed {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseScale {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 12px var(--accent-secondary)); }
}

/* Bottom mode toggle button array */
.viewfinder-controls {
  position: absolute;
  bottom: 25px;
  display: flex;
  gap: 15px;
  z-index: 5;
}

.mode-btn {
  padding: 8px 16px !important;
  font-size: 0.8rem !important;
  border-radius: 20px !important;
}

.mode-btn.active {
  background: var(--text-main) !important;
  color: #0c081e !important;
  box-shadow: 0 0 15px rgba(255,255,255,0.4) !important;
}