/* Custom Aesthetic Styles for Echa's Birthday Invitation */

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

:root {
  --primary: #f43f5e;
  --primary-light: #fda4af;
  --primary-soft: #fff1f2;
  --accent-gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #fffafb;
  color: #374151;
  overflow-x: hidden;
}

.font-script {
  font-family: 'Dancing Script', cursive;
}

.font-serif-title {
  font-family: 'Playfair Display', serif;
}

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px -5px rgba(244, 63, 94, 0.08), 0 20px 40px -15px rgba(225, 29, 72, 0.05);
}

.glass-card-warm {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 241, 242, 0.85));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(253, 164, 175, 0.35);
  box-shadow: 0 15px 35px -5px rgba(244, 63, 94, 0.12);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, #e11d48, #db2777, #ea580c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold-gradient {
  background: linear-gradient(135deg, #b45309, #d97706, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Floating animation */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(10px) rotate(-2deg); }
}

.animate-float {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-delay {
  animation: floatReverse 7s ease-in-out infinite 1s;
}

/* Candle flame glow & flicker */
@keyframes flicker {
  0%, 100% {
    transform: scale(1) rotate(-1deg);
    opacity: 0.95;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9));
  }
  25% {
    transform: scale(1.08, 0.95) rotate(1deg);
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 1));
  }
  50% {
    transform: scale(0.96, 1.05) rotate(-2deg);
    opacity: 0.9;
    filter: drop-shadow(0 0 7px rgba(251, 191, 36, 0.8));
  }
  75% {
    transform: scale(1.04, 1.02) rotate(2deg);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.95));
  }
}

.flame {
  animation: flicker 1.8s infinite ease-in-out;
  transform-origin: bottom center;
  transition: all 0.5s ease-out;
}

.flame.blown-out {
  opacity: 0 !important;
  transform: scale(0.2) translateY(-20px) !important;
  filter: none !important;
}

/* Smoke puff when candle blown */
@keyframes smokeRise {
  0% {
    opacity: 0.8;
    transform: translateY(0) scale(0.6);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-25px) scale(1.4) translateX(5px);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(2) translateX(-8px);
  }
}

.smoke {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(180, 180, 180, 0.6);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.smoke.active {
  animation: smokeRise 1.6s ease-out forwards;
}

/* Polaroid Photo Card */
.polaroid-card {
  background: white;
  padding: 12px 12px 20px 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 6px;
  position: relative;
}

.polaroid-card:hover {
  transform: translateY(-8px) scale(1.03) rotate(0deg) !important;
  box-shadow: 0 20px 35px rgba(244, 63, 94, 0.2);
  z-index: 20;
}

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 22px;
  background-color: rgba(254, 205, 211, 0.8);
  backdrop-filter: blur(2px);
  border: 1px dashed rgba(244, 63, 94, 0.3);
  z-index: 5;
}

/* Envelope Modal Animation */
#envelopeModal {
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#envelopeModal.hidden-modal {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

/* Heart pulse */
@keyframes heartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.18); }
  70% { transform: scale(1); }
}

.animate-heartbeat {
  animation: heartBeat 2.2s infinite;
}

/* Smooth custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf2f4;
}
::-webkit-scrollbar-thumb {
  background: #fda4af;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f43f5e;
}
