:root {
  --bg-deep: #06121d;
  --bg-mid: #0c2233;
  --bg-crimson: #380918;
  --card-bg: rgba(13, 31, 45, 0.78);
  --card-border: rgba(255, 215, 110, 0.35);
  --gold-bright: #ffd700;
  --gold-soft: #ffe89e;
  --gold-deep: #d49b27;
  --crimson: #e11d48;
  --crimson-dark: #9f1239;
  --emerald: #10b981;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c7e;
  --text-light: #f8fafc;
  --text-muted: #cbd5e1;
  --font-serif-display: 'Cinzel Decorative', 'Didot', 'Bodoni MT', 'Optima', 'Georgia', serif;
  --font-script: 'Snell Roundhand', 'Apple Chancery', 'Brush Script MT', 'Segoe Script', cursive;
}

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

html, body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-light);
  background: radial-gradient(circle at 50% 10%, #16384f 0%, var(--bg-mid) 35%, var(--bg-deep) 80%, #030910 100%);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Snowfall Canvas */
#snowCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Hanging Fairy String Lights */
.fairy-lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 36px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  z-index: 25;
  pointer-events: none;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.bulb {
  width: 12px;
  height: 18px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  margin-top: 4px;
  position: relative;
  animation: twinkle 1.8s infinite alternate ease-in-out;
}

.bulb::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 3px;
  width: 6px;
  height: 5px;
  background: #334155;
  border-radius: 2px;
}

.bulb.red {
  background: #ff3b5c;
  box-shadow: 0 0 14px #ff3b5c, 0 0 28px #ff3b5c;
  animation-delay: 0s;
}
.bulb.gold {
  background: #ffd166;
  box-shadow: 0 0 14px #ffd166, 0 0 28px #ffd166;
  animation-delay: 0.45s;
}
.bulb.green {
  background: #2dd4bf;
  box-shadow: 0 0 14px #2dd4bf, 0 0 28px #2dd4bf;
  animation-delay: 0.9s;
}
.bulb.blue {
  background: #38bdf8;
  box-shadow: 0 0 14px #38bdf8, 0 0 28px #38bdf8;
  animation-delay: 1.35s;
}

@keyframes twinkle {
  0% { opacity: 0.45; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1.08); }
}

/* Floating Audio Button */
.music-btn {
  position: fixed;
  top: 46px;
  right: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(15, 32, 48, 0.82);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: var(--gold-soft);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.25);
}

.music-btn.playing {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.85), rgba(159, 18, 57, 0.9));
  color: #fff;
  border-color: var(--gold-bright);
}

/* STEP 1: Gift Unveiling Overlay */
.gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, #1b0c24 0%, #09131e 70%, #04080e 100%);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.gift-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gift-overlay-content {
  max-width: 460px;
  width: 100%;
  text-align: center;
  position: relative;
}

.overlay-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.overlay-title {
  font-family: var(--font-serif-display);
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.25;
  background: linear-gradient(180deg, #ffffff 0%, #ffe89e 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.overlay-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 36px;
}

/* 3D Animated Gift Box */
.gift-box-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
  outline: none;
}

.gift-glow-ring {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.42) 0%, rgba(225, 29, 72, 0.18) 50%, transparent 72%);
  top: -15px;
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.16); opacity: 1; }
}

.gift-box {
  width: 140px;
  height: 140px;
  position: relative;
  animation: giftBounce 2.2s infinite ease-in-out;
}

@keyframes giftBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(-3deg); }
  50% { transform: translateY(0) rotate(3deg); }
  75% { transform: translateY(-6px) rotate(-2deg); }
}

.gift-lid {
  width: 152px;
  height: 34px;
  background: linear-gradient(135deg, #fb7185 0%, #e11d48 50%, #9f1239 100%);
  border-radius: 8px;
  position: absolute;
  top: 12px;
  left: -6px;
  z-index: 3;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gift-lid::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fef08a, #f59e0b);
}

.gift-bow {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 26px;
}

.bow-loop {
  position: absolute;
  width: 30px;
  height: 22px;
  border: 5px solid #ffd700;
  border-radius: 50% 50% 0 50%;
  top: 0;
}

.bow-loop.left {
  left: 2px;
  transform: rotate(-15deg);
}

.bow-loop.right {
  right: 2px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(15deg);
}

.bow-knot {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gift-body {
  width: 140px;
  height: 100px;
  background: linear-gradient(145deg, #e11d48 0%, #be123c 60%, #881337 100%);
  border-radius: 0 0 12px 12px;
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.gift-ribbon-v {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fef08a, #f59e0b);
}

.gift-ribbon-h {
  position: absolute;
  top: 42%;
  width: 100%;
  height: 20px;
  background: linear-gradient(180deg, #f59e0b, #fef08a, #f59e0b);
}

.tap-cta {
  margin-top: 26px;
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
  color: #1e1b18;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
  transition: transform 0.2s ease;
}

.gift-box-wrapper:hover .tap-cta {
  transform: scale(1.06);
}

/* Main Experience Container */
.main-container {
  position: relative;
  z-index: 10;
  max-width: 640px;
  margin: 0 auto;
  padding: 52px 16px 48px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.main-container.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
  padding: 0;
}

/* Sky Scene & Animated Santa Sleigh */
.sky-scene {
  position: relative;
  height: 82px;
  margin-bottom: -14px;
  overflow: hidden;
  pointer-events: none;
}

.full-moon {
  position: absolute;
  right: 12%;
  top: 8px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffef0 0%, #fde68a 70%, rgba(253, 230, 138, 0) 100%);
  box-shadow: 0 0 36px rgba(253, 230, 138, 0.65);
}

.santa-sleigh {
  position: absolute;
  top: 6px;
  width: 220px;
  height: 62px;
  animation: flyAcross 18s linear infinite;
}

@keyframes flyAcross {
  0% { transform: translateX(-240px) translateY(8px) scale(0.85); }
  50% { transform: translateX(220px) translateY(-4px) scale(0.95); }
  100% { transform: translateX(720px) translateY(6px) scale(0.85); }
}

/* Hero Greeting Card */
.wish-card {
  position: relative;
  background: linear-gradient(165deg, rgba(16, 37, 54, 0.88) 0%, rgba(10, 22, 34, 0.94) 55%, rgba(45, 10, 24, 0.88) 100%);
  border: 1.5px solid var(--card-border);
  border-radius: 28px;
  padding: 32px 22px 28px;
  text-align: center;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.65), inset 0 0 32px rgba(255, 215, 0, 0.06);
  backdrop-filter: blur(14px);
  margin-bottom: 24px;
  overflow: hidden;
}

/* Decorative Gold Filigree Corners */
.card-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--gold-bright);
  border-style: solid;
  opacity: 0.65;
  pointer-events: none;
}
.card-corner.top-left { top: 12px; left: 12px; border-width: 2px 0 0 2px; border-top-left-radius: 10px; }
.card-corner.top-right { top: 12px; right: 12px; border-width: 2px 2px 0 0; border-top-right-radius: 10px; }
.card-corner.bottom-left { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; border-bottom-left-radius: 10px; }
.card-corner.bottom-right { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; border-bottom-right-radius: 10px; }

/* Receiver Pill */
.receiver-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.sparkle-dot {
  color: var(--gold-bright);
}

/* Sender Name Spotlight */
.sender-spotlight {
  margin-bottom: 10px;
}

.sender-name {
  font-family: var(--font-serif-display);
  font-size: clamp(1.75rem, 6vw, 2.65rem);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(180deg, #ffffff 0%, #fff0b3 45%, #fbbf24 85%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 16px rgba(251, 191, 36, 0.35));
  word-break: break-word;
  animation: nameFloat 3s ease-in-out infinite alternate;
}

@keyframes nameFloat {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

.wishes-verb {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
  letter-spacing: 0.03em;
}

/* Main Festival Headline */
.festival-headline {
  margin: 8px 0 14px;
}

.script-accent {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  color: #fb7185;
  text-shadow: 0 0 20px rgba(251, 113, 133, 0.55);
  line-height: 1;
  margin-bottom: -4px;
}

.main-festival-title {
  font-family: var(--font-serif-display);
  font-size: clamp(2rem, 7.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffffff 0%, #fde68a 55%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 28px rgba(245, 158, 11, 0.25);
}

.sub-festival-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fef08a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Interactive Tree SVG */
.tree-showcase {
  margin: 10px auto 18px;
}

.christmas-tree-svg {
  width: 210px;
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s ease;
}

.christmas-tree-svg:hover {
  transform: scale(1.03);
}

.star-pulse {
  animation: pulseStar 2s infinite alternate ease-in-out;
}

@keyframes pulseStar {
  0% { opacity: 0.65; }
  100% { opacity: 1; }
}

.ornament {
  animation: ornamentGlow 1.6s infinite alternate ease-in-out;
}
.ornament.red { animation-delay: 0.2s; }
.ornament.gold { animation-delay: 0.6s; }
.ornament.cyan { animation-delay: 1s; }

@keyframes ornamentGlow {
  0% { filter: brightness(0.9); }
  100% { filter: brightness(1.35) drop-shadow(0 0 6px currentColor); }
}

.tree-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Wish Quote Box */
.wish-quote-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 0 auto 22px;
  max-width: 520px;
}

.wish-quote-text {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #f1f5f9;
  font-style: italic;
}

.wish-quote-footer {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--gold-soft);
}

/* Countdown Timer */
.countdown-wrapper {
  background: rgba(6, 18, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 12px;
}

.countdown-Title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
  margin-bottom: 10px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.time-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 8px 4px;
}

.time-num {
  display: block;
  font-family: var(--font-serif-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gold-bright);
}

.time-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* STEP 3: Create & Share Card */
.creator-card {
  background: linear-gradient(165deg, rgba(19, 41, 61, 0.92) 0%, rgba(10, 24, 38, 0.96) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 26px;
  padding: 28px 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

.creator-header {
  text-align: center;
  margin-bottom: 20px;
}

.creator-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.22);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fda4af;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.creator-title {
  font-family: var(--font-serif-display);
  font-size: 1.45rem;
  color: #fff;
  margin-bottom: 6px;
}

.creator-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.wish-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.input-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gold-soft);
}

.req { color: #fb7185; }
.opt { color: var(--text-muted); font-weight: 400; font-size: 0.78rem; }

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(6, 16, 26, 0.85);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

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

.btn-preview {
  background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
  color: #1c1917;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.share-buttons-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .share-buttons-grid {
    grid-template-columns: 1fr;
  }
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--gold-soft);
}

.btn-native-share {
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
  color: #fff;
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Generated Link Box */
.generated-link-box {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 215, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.link-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.link-url {
  font-size: 0.82rem;
  color: var(--gold-bright);
  word-break: break-all;
}

.page-footer {
  text-align: center;
  margin-top: 26px;
  font-size: 0.82rem;
  color: rgba(203, 213, 225, 0.7);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #10b981;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 60;
  pointer-events: none;
}

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