/* =========================================================
   DREAMY ANIME BIRTHDAY GREETING - STYLE SYSTEM
   Soft pink, lavender, baby-blue palette with glassmorphism
   ========================================================= */

:root {
  --color-pink-soft: #ffe4ec;
  --color-pink-main: #f472b6;
  --color-pink-deep: #db2777;
  --color-lavender-soft: #ede9fe;
  --color-lavender-main: #c084fc;
  --color-lavender-deep: #7e22ce;
  --color-blue-soft: #e0f2fe;
  --color-blue-main: #38bdf8;
  --color-gold-sparkle: #fde047;
  --color-gold-glow: #eab308;
  --color-text-dark: #3b2d4a;
  --color-text-soft: #6b5b7b;
  
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-heavy: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 12px 36px -8px rgba(192, 132, 252, 0.28), 0 4px 16px rgba(244, 114, 182, 0.18);
  
  --font-heading: 'Nunito', 'Outfit', sans-serif;
  --font-script: 'Dancing Script', cursive;
  --font-body: 'Nunito', sans-serif;
  --font-hand: 'Sacramento', cursive;
  
  --transition-smooth: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: all 0.25s ease-out;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--color-text-dark);
}

body {
  background: linear-gradient(135deg, #ffd6e7 0%, #e8dff5 35%, #d6e4ff 70%, #fce7f3 100%);
  background-size: 300% 300%;
  animation: dreamyGradientShift 14s ease-in-out infinite alternate;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  user-select: none;
}

@keyframes dreamyGradientShift {
  0% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
  100% { background-position: 50% 100%; }
}

/* Dynamic Particles Canvas */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Fairy Lights Top Hanging Decor */
.fairy-lights-container {
  position: fixed;
  top: -6px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 10;
}

.light-wire {
  position: absolute;
  top: 6px;
  left: 0;
  width: 100%;
  height: 16px;
  border-bottom: 2px dashed rgba(216, 180, 254, 0.6);
  border-radius: 50%;
}

.bulb {
  width: 14px;
  height: 20px;
  border-radius: 50% 50% 60% 60%;
  position: relative;
  animation: bulbTwinkle 2.4s ease-in-out infinite alternate;
  margin-top: 10px;
  box-shadow: 0 0 14px 4px currentColor;
}

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

.b1 { color: #f472b6; background: #fbcfe8; animation-delay: 0s; }
.b2 { color: #c084fc; background: #e9d5ff; animation-delay: 0.5s; }
.b3 { color: #38bdf8; background: #bae6fd; animation-delay: 1s; }
.b4 { color: #fde047; background: #fef08a; animation-delay: 1.5s; }
.b5 { color: #f472b6; background: #fbcfe8; animation-delay: 0.3s; }
.b6 { color: #38bdf8; background: #bae6fd; animation-delay: 0.8s; }
.b7 { color: #c084fc; background: #e9d5ff; animation-delay: 1.3s; }
.b8 { color: #fde047; background: #fef08a; animation-delay: 1.8s; }
.b9 { color: #f472b6; background: #fbcfe8; animation-delay: 0.6s; }
.b10 { color: #38bdf8; background: #bae6fd; animation-delay: 1.1s; }

@keyframes bulbTwinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 10px currentColor); }
}

/* Top Floating Controls (Music Toggle) */
.top-controls {
  position: fixed;
  top: 24px;
  right: 20px;
  z-index: 50;
}

.glass-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--color-lavender-deep);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(192, 132, 252, 0.25);
  transition: var(--transition-fast);
}

.glass-pill-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(244, 114, 182, 0.35);
  background: #ffffff;
}

.sound-wave {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.sound-wave span {
  width: 3px;
  height: 100%;
  background: var(--color-pink-main);
  border-radius: 2px;
  display: inline-block;
  opacity: 0.3;
}

.glass-pill-btn.playing .sound-wave span {
  opacity: 1;
  animation: soundBounce 0.8s ease-in-out infinite alternate;
}

.glass-pill-btn.playing .sound-wave span:nth-child(2) { animation-delay: 0.2s; }
.glass-pill-btn.playing .sound-wave span:nth-child(3) { animation-delay: 0.4s; }

@keyframes soundBounce {
  0% { height: 4px; }
  100% { height: 14px; background: var(--color-lavender-main); }
}

/* ==============================================
   MAIN APP WRAPPER (Mobile-first vertical layout)
   ============================================== */
.app-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px 14px 40px;
}

/* Screen state switches */
.screen {
  width: 100%;
  display: none;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ==============================================
   SCREEN 1: INTERACTIVE OPENING
   ============================================== */
.screen-opening {
  position: relative;
  min-height: 90vh;
  justify-content: center;
}

/* Floating Decorative Elements Layer */
.floating-decor-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.character-card, .decor-card {
  position: absolute;
  pointer-events: auto;
  animation: floatCharacter 4.5s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.character-card:hover, .decor-card:hover {
  transform: scale(1.1) rotate(3deg) !important;
  z-index: 25;
}

@keyframes floatCharacter {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(var(--float-dist, 10px)) rotate(1.5deg); }
  100% { transform: translateY(calc(var(--float-dist, 10px) * -1)) rotate(-1.5deg); }
}

/* Character Frames (Glassmorphism Polaroid / Crystal bubble) */
.char-frame {
  position: relative;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(12px);
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 6px 6px 24px 6px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-img, .decor-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: block;
}

.char-badge {
  position: absolute;
  bottom: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-pink-deep);
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.2);
  white-space: nowrap;
}

.char-glow {
  position: absolute;
  inset: -4px;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.35) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.char-glow.gold {
  background: radial-gradient(circle, rgba(253, 224, 71, 0.45) 0%, transparent 70%);
}

.char-glow.superstar-glow {
  background: radial-gradient(circle, rgba(234, 179, 8, 0.5) 0%, rgba(244, 114, 182, 0.3) 60%, transparent 75%);
}

/* Coordinates for floating elements on opening screen */
.char-pos-top-left {
  top: 35px;
  left: 10px;
}

.char-pos-top-right {
  top: 35px;
  right: 10px;
}

.coffee-card {
  bottom: 60px;
  left: 8px;
}

.coffee-card .char-img, .coffee-card .decor-img {
  width: 82px;
  height: 82px;
}

.steam-heart {
  position: absolute;
  top: -12px;
  right: 10px;
  font-size: 1.1rem;
  animation: steamRise 2.5s ease-out infinite;
}

@keyframes steamRise {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  50% { opacity: 0.9; transform: translateY(-16px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-32px) scale(1.3); }
}

/* Superstar Rajinikanth Decorative Badge */
.rajini-card {
  bottom: 60px;
  right: 8px;
}

.rajini-frame {
  padding-bottom: 28px;
  border: 3px solid #fde047;
}

.rajini-avatar-wrapper {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #431407 50%, #78350f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 16px rgba(253, 224, 71, 0.4);
}

.rajini-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.rajini-silhouette {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.rajini-glasses {
  font-size: 1.9rem;
  filter: drop-shadow(0 2px 6px #fde047);
  animation: glassesGleam 2.8s ease-in-out infinite alternate;
}

.rajini-sparkle-star {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 0.9rem;
  color: #fde047;
  animation: starSpin 3s linear infinite;
}

.rajini-fire {
  font-size: 0.75rem;
  margin-top: -4px;
}

@keyframes glassesGleam {
  0%, 80% { transform: scale(1); filter: drop-shadow(0 2px 6px #fde047); }
  90% { transform: scale(1.2) rotate(-5deg); filter: drop-shadow(0 0 14px #ffffff); }
  100% { transform: scale(1); }
}

@keyframes starSpin {
  from { transform: rotate(0deg) scale(0.8); }
  50% { transform: rotate(180deg) scale(1.3); }
  to { transform: rotate(360deg) scale(0.8); }
}

.superstar-badge {
  background: linear-gradient(90deg, #f59e0b, #ec4899);
  color: #ffffff !important;
  font-size: 0.64rem;
}

.rajini-punchline {
  position: absolute;
  bottom: -22px;
  background: rgba(30, 27, 75, 0.92);
  color: #fde047;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid #fde047;
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition-fast);
}

.rajini-card:hover .rajini-punchline {
  opacity: 1;
  transform: translateY(0);
}

.char-pos-bottom-center {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: none; /* Shown on larger screens, hidden on tight mobile */
}

@media (min-height: 750px) {
  .char-pos-bottom-center {
    display: block;
  }
  .char-pos-bottom-center .char-img {
    width: 64px;
    height: 64px;
  }
}

/* ==============================================
   CENTER PORTAL & "TOUCH ME" BUTTON
   ============================================== */
.center-gift-portal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  margin: auto 0;
}

/* Glowing Pulsing Rings */
.portal-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  pointer-events: none;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: ringPulse 3.5s ease-out infinite;
}

.ring-1 {
  border-color: rgba(244, 114, 182, 0.35);
  animation-delay: 0s;
}

.ring-2 {
  border-color: rgba(192, 132, 252, 0.35);
  animation-delay: 1.1s;
}

.ring-3 {
  border-color: rgba(56, 189, 248, 0.35);
  animation-delay: 2.2s;
}

@keyframes ringPulse {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.gift-box-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Sparkle Orbit */
.sparkle-orbit {
  position: absolute;
  width: 240px;
  height: 240px;
  pointer-events: none;
  animation: orbitRotate 10s linear infinite;
}

.orbit-sparkle {
  position: absolute;
  font-size: 1.3rem;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.s1 { top: 0; left: 50%; transform: translateX(-50%); }
.s2 { right: 0; top: 50%; transform: translateY(-50%); }
.s3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.s4 { left: 0; top: 50%; transform: translateY(-50%); }

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

/* Magic Envelope Icon Banner */
.magic-envelope {
  position: relative;
  margin-bottom: 18px;
  animation: floatGentle 3s ease-in-out infinite alternate;
}

.envelope-ribbon {
  font-size: 2.8rem;
  filter: drop-shadow(0 4px 12px rgba(244, 114, 182, 0.45));
  animation: ribbonWiggle 2.5s ease-in-out infinite;
}

@keyframes ribbonWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.06); }
  75% { transform: rotate(8deg) scale(1.06); }
}

.envelope-text-hint {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-lavender-deep);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(192, 132, 252, 0.2);
}

@keyframes floatGentle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ==============================================
   PRIMARY "TOUCH ME ✨🎁" BUTTON
   ============================================== */
.magical-touch-btn {
  position: relative;
  background: linear-gradient(135deg, #f472b6 0%, #c084fc 50%, #38bdf8 100%);
  background-size: 200% 200%;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  padding: 18px 42px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(244, 114, 182, 0.45), 0 0 24px rgba(192, 132, 252, 0.5);
  animation: touchBtnFloat 3s ease-in-out infinite alternate, btnGradient 5s ease infinite;
  transition: var(--transition-smooth);
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-text {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: inline-block;
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-25deg);
  animation: btnShimmer 2.8s infinite;
  z-index: 1;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  40%, 100% { left: 160%; }
}

@keyframes btnGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes touchBtnFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.04); }
  100% { transform: translateY(2px) scale(0.99); }
}

.magical-touch-btn:hover {
  transform: scale(1.1) translateY(-4px) !important;
  box-shadow: 0 18px 46px rgba(244, 114, 182, 0.6), 0 0 36px rgba(192, 132, 252, 0.7);
}

.magical-touch-btn:active {
  transform: scale(0.95);
}

.tap-subtext {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-soft);
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
  animation: pulseSubtext 2.2s ease-in-out infinite;
}

@keyframes pulseSubtext {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* ==============================================
   SCREEN 2: BIRTHDAY REVEAL CELEBRATION
   ============================================== */
.screen-reveal {
  padding-top: 20px;
  padding-bottom: 20px;
}

.celebration-header {
  margin-bottom: 14px;
  animation: fadeInDown 0.8s ease-out;
}

.magic-badge {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #f472b6, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

/* Reveal Decorative Characters Layout */
.reveal-decor-grid {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  min-height: 120px;
}

.reveal-char {
  position: absolute;
  animation: popInChar 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--anim-delay, 0s);
  z-index: 15;
}

@keyframes popInChar {
  from { opacity: 0; transform: scale(0.4) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.char-bubble-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(10px);
  padding: 5px 10px 5px 5px;
  border-radius: 20px;
  border: 2px solid #ffffff;
  box-shadow: var(--glass-shadow);
  max-width: 210px;
  transition: var(--transition-fast);
}

.char-bubble-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(244, 114, 182, 0.35);
}

.mini-char-img {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.speech-bubble {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-dark);
}

.speech-bubble.gold-bubble {
  color: #78350f;
}

.rc-left {
  top: 0;
  left: 0;
}

.rc-right {
  top: 0;
  right: 0;
}

.rc-bottom-left {
  top: 65px;
  left: 0;
}

.rc-bottom-right {
  top: 65px;
  right: 0;
}

.mini-rajini-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, #1e1b4b, #78350f);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.rajini-shades {
  font-size: 1.25rem;
}

.rajini-crown {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 0.75rem;
}

.reveal-coffee-sticker {
  position: absolute;
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.reveal-coffee-sticker:hover {
  transform: translateX(-50%) scale(1.15) rotate(5deg);
}

.sticker-coffee-img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(244, 114, 182, 0.25);
  object-fit: cover;
}

.coffee-heart-float {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: -6px;
}

/* ==============================================
   MAIN CELEBRATION CARD
   ============================================== */
.main-celebration-card {
  position: relative;
  width: 100%;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 32px;
  padding: 28px 20px 24px;
  box-shadow: 0 20px 50px -10px rgba(192, 132, 252, 0.35), 0 8px 24px rgba(244, 114, 182, 0.2);
  text-align: center;
  animation: zoomInCelebration 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes zoomInCelebration {
  from { opacity: 0; transform: scale(0.85) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.card-glass-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.4) 0%, rgba(192, 132, 252, 0.25) 50%, transparent 70%);
  pointer-events: none;
}

.floating-cake-icon {
  font-size: 2.6rem;
  margin-bottom: 4px;
  animation: cakeBounce 2.5s ease-in-out infinite;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(244, 114, 182, 0.35));
}

@keyframes cakeBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-4deg); }
}

/* Elegant Glowing Typography */
.main-bday-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2.1rem;
  line-height: 1.15;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.title-gradient {
  background: linear-gradient(135deg, #db2777 0%, #9333ea 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
  letter-spacing: -0.5px;
}

.title-emojis {
  filter: drop-shadow(0 2px 8px rgba(244, 114, 182, 0.3));
}

.main-bday-quote {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  font-weight: 600;
  padding: 0 6px;
}

.main-bday-quote strong {
  color: var(--color-pink-deep);
  font-weight: 800;
}

.magical-subline {
  font-family: var(--font-script);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-lavender-deep);
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(192, 132, 252, 0.35);
  animation: magicalGlow 3s ease-in-out infinite alternate;
}

@keyframes magicalGlow {
  0% { text-shadow: 0 2px 10px rgba(192, 132, 252, 0.35); transform: scale(1); }
  100% { text-shadow: 0 0 18px rgba(244, 114, 182, 0.6), 0 0 30px rgba(192, 132, 252, 0.4); transform: scale(1.02); }
}

/* ==============================================
   INTERACTIVE BIRTHDAY CAKE & CANDLES
   ============================================== */
.interactive-cake-section {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  padding: 16px 14px 14px;
  margin-bottom: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 8px rgba(244, 114, 182, 0.08);
}

.cake-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.cake-box:hover {
  transform: scale(1.04);
}

.candles-row {
  display: flex;
  gap: 18px;
  margin-bottom: -4px;
  z-index: 2;
}

.candle {
  position: relative;
  width: 8px;
  height: 24px;
  background: repeating-linear-gradient(45deg, #f472b6, #f472b6 4px, #ffffff 4px, #ffffff 8px);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flame {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 14px;
  background: radial-gradient(ellipse at bottom, #ffffff 0%, #fde047 30%, #f97316 70%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  animation: flicker 0.6s ease-in-out infinite alternate;
  box-shadow: 0 0 12px 3px rgba(253, 224, 71, 0.8);
  transition: opacity 0.3s, transform 0.3s;
}

.smoke {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 14px;
  background: radial-gradient(circle, rgba(160, 160, 160, 0.6) 0%, transparent 80%);
  border-radius: 50%;
  opacity: 0;
}

.candle.extinguished .flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.2);
}

.candle.extinguished .smoke {
  animation: smokePuff 1.2s ease-out forwards;
}

@keyframes flicker {
  0% { transform: translateX(-50%) rotate(-3deg) scale(0.95); }
  50% { transform: translateX(-48%) rotate(2deg) scale(1.05); }
  100% { transform: translateX(-52%) rotate(-2deg) scale(1); }
}

@keyframes smokePuff {
  0% { opacity: 0.8; transform: translate(-50%, 0) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -24px) scale(2); }
}

.cake-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cake-top-cream {
  font-size: 1.1rem;
  margin-bottom: -6px;
  letter-spacing: 4px;
  z-index: 1;
}

.cake-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cake-layer {
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.cake-layer.l1 {
  width: 90px;
  height: 24px;
  background: linear-gradient(180deg, #fce7f3 0%, #f472b6 100%);
  border-bottom: 2px solid #db2777;
}

.cake-layer.l2 {
  width: 120px;
  height: 28px;
  background: linear-gradient(180deg, #fdf2f8 0%, #f9a8d4 100%);
  border-bottom: 3px solid #db2777;
  margin-top: -2px;
}

.cake-plate {
  width: 140px;
  height: 8px;
  background: linear-gradient(90deg, #e2e8f0, #ffffff, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  margin-top: 1px;
}

.candle-blow-btn {
  background: linear-gradient(135deg, #fbcfe8, #e9d5ff);
  border: 1.5px solid #ffffff;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--color-lavender-deep);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(192, 132, 252, 0.2);
  transition: var(--transition-fast);
}

.candle-blow-btn:hover {
  transform: scale(1.05);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(244, 114, 182, 0.35);
}

.wish-status-banner {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-pink-deep);
  margin-top: 6px;
  min-height: 18px;
  transition: var(--transition-fast);
}

/* Wishes interactive chips */
.wishes-mini-tray {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.wish-chip {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(244, 114, 182, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wish-chip:hover, .wish-chip.active {
  background: linear-gradient(135deg, #f472b6, #c084fc);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(192, 132, 252, 0.35);
  border-color: transparent;
}

.active-wish-display {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-lavender-deep);
  margin-bottom: 18px;
  border: 1px dashed rgba(192, 132, 252, 0.4);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease-out;
}

/* Action Buttons */
.reveal-action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid #ffffff;
  transition: var(--transition-smooth);
}

.replay-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text-dark);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.replay-btn:hover {
  background: #ffffff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 24px rgba(192, 132, 252, 0.3);
}

.confetti-blast-btn {
  background: linear-gradient(135deg, #f472b6, #c084fc);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(244, 114, 182, 0.4);
}

.confetti-blast-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 30px rgba(244, 114, 182, 0.6);
}

/* Interactive Floating Click Hearts */
.click-heart-fx {
  position: fixed;
  pointer-events: none;
  font-size: 1.4rem;
  z-index: 9999;
  animation: clickFloatUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes clickFloatUp {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5) rotate(0deg); }
  50% { transform: translate(-50%, -80px) scale(1.3) rotate(15deg); opacity: 0.9; }
  100% { opacity: 0; transform: translate(-50%, -140px) scale(1.5) rotate(-15deg); }
}

/* Animations Helper */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   RESPONSIVE ADJUSTMENTS
   ============================================== */
@media (max-width: 420px) {
  .app-card-wrapper {
    padding: 10px 10px 30px;
  }
  .main-bday-title {
    font-size: 1.75rem;
  }
  .main-bday-quote {
    font-size: 0.92rem;
  }
  .magical-subline {
    font-size: 1.35rem;
  }
  .char-img, .decor-img {
    width: 76px;
    height: 76px;
  }
  .coffee-card .char-img, .coffee-card .decor-img, .rajini-avatar-wrapper {
    width: 72px;
    height: 72px;
  }
  .magical-touch-btn {
    font-size: 1.2rem;
    padding: 16px 32px;
  }
  .reveal-decor-grid {
    min-height: 110px;
  }
  .char-bubble-card {
    max-width: 165px;
    padding: 4px 6px;
  }
  .mini-char-img, .mini-rajini-icon {
    width: 36px;
    height: 36px;
  }
  .speech-bubble {
    font-size: 0.62rem;
  }
}

@media (min-width: 768px) {
  .app-card-wrapper {
    max-width: 580px;
  }
  .main-celebration-card {
    padding: 34px 30px 28px;
  }
  .char-pos-top-left {
    top: 40px;
    left: -30px;
  }
  .char-pos-top-right {
    top: 40px;
    right: -30px;
  }
  .coffee-card {
    bottom: 50px;
    left: -35px;
  }
  .rajini-card {
    bottom: 50px;
    right: -35px;
  }
}
