/* Arabic-first, elegant, animated birthday page for Rahma */
:root {
  --bg: #0a0616;
  --bg-2: #1a0f2e;
  --bg-3: #2d1b4e;
  --bg-4: #4a2c7a;
  --card: #1e1238;
  --card-hover: #2a1d4a;
  --text: #ffffff;
  --text-soft: #f0f4ff;
  --muted: #b8c5ff;
  --accent: #ff3d9a;
  --accent-2: #00f5e4;
  --accent-3: #3b82f6;
  --gold: #ffb800;
  --purple: #a855f7;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --orange: #f97316;
  --ring: rgba(255, 61, 154, 0.5);
  --shadow: 0 25px 80px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 60px rgba(255, 61, 154, 0.3);
  --shadow-mega: 0 40px 120px rgba(0,0,0,0.8);
  --gradient-primary: linear-gradient(135deg, #ff3d9a 0%, #00f5e4 30%, #a855f7 60%, #ffb800 100%);
  --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #06b6d4 50%, #10b981 100%);
  --gradient-card: linear-gradient(145deg, #1e1238 0%, #2a1d4a 50%, #1e1238 100%);
  --gradient-text: linear-gradient(135deg, #ff3d9a, #00f5e4, #ffb800);
  --gradient-rainbow: linear-gradient(90deg, #ff3d9a, #ffb800, #00f5e4, #a855f7, #ec4899, #10b981);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: 
    radial-gradient(circle at 10% 10%, rgba(255, 61, 154, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(0, 245, 228, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(168, 85, 247, 0.4) 0%, transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(255, 184, 0, 0.3) 0%, transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.2) 0%, transparent 40%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 20%, var(--bg-3) 60%, var(--bg-4) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 61, 154, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(0, 245, 228, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 30% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255, 184, 0, 0.1) 0%, transparent 40%);
  animation: backgroundFlow 25s ease-in-out infinite;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    conic-gradient(from 0deg at 50% 50%, 
      transparent 0%, rgba(255, 61, 154, 0.05) 10%, transparent 20%,
      transparent 30%, rgba(0, 245, 228, 0.05) 40%, transparent 50%,
      transparent 60%, rgba(168, 85, 247, 0.05) 70%, transparent 80%,
      transparent 90%, rgba(255, 184, 0, 0.05) 100%);
  animation: conicRotate 60s linear infinite;
  z-index: -2;
}

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

@keyframes backgroundFlow {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% { 
    transform: scale(1.1) rotate(2deg);
    opacity: 1;
  }
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.site-header { 
  padding: 40px 0 20px; 
  position: relative;
  z-index: 10;
}
.header-content { 
  display: grid; 
  gap: 16px; 
  justify-items: center; 
  text-align: center;
  animation: fadeInUp 1s ease-out;
}
.title {
  font-family: "Amiri", serif;
  font-weight: 900;
  font-size: clamp(40px, 7vw, 84px);
  letter-spacing: 1.2px;
  margin: 0;
  background: var(--gradient-rainbow);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(255, 61, 154, 0.6)) drop-shadow(0 0 80px rgba(0, 245, 228, 0.4));
  animation: titleGlow 2s ease-in-out infinite alternate, gradientShift 6s ease-in-out infinite;
  position: relative;
  text-shadow: 0 0 100px rgba(255, 61, 154, 0.8);
}

/* Override gradient text for the name span specifically */
.title .name {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--text) !important;
  background-clip: initial !important;
}

.title::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: 
    radial-gradient(ellipse at center, rgba(255, 61, 154, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse at center, rgba(0, 245, 228, 0.15) 0%, transparent 70%);
  border-radius: 50px;
  z-index: -1;
  filter: blur(30px);
  animation: titleHalo 3s ease-in-out infinite, titlePulse 4s ease-in-out infinite;
}

.title::after {
  content: '';
  position: absolute;
  inset: -30px;
  background: conic-gradient(from 0deg, 
    rgba(255, 61, 154, 0.1), rgba(0, 245, 228, 0.1), 
    rgba(168, 85, 247, 0.1), rgba(255, 184, 0, 0.1),
    rgba(255, 61, 154, 0.1));
  border-radius: 60px;
  z-index: -2;
  filter: blur(40px);
  animation: titleHalo 5s ease-in-out infinite reverse;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

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

@keyframes titleHalo {
  0%, 100% { 
    transform: scale(0.8);
    opacity: 0.3;
  }
  50% { 
    transform: scale(1.2);
    opacity: 0.6;
  }
}
.title .name { 
  display: inline-block;
  animation: bounce 2s infinite, nameShimmer 3s ease-in-out infinite;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 30px;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  transform-style: preserve-3d;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 61, 154, 0.5);
  backdrop-filter: blur(20px);
  /* Ensure text is visible */
  -webkit-text-fill-color: initial;
  background-clip: initial;
  color: var(--text);
}

.title .name::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: var(--gradient-primary);
  border-radius: 35px;
  z-index: -1;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.title .name:hover::before {
  opacity: 0.6;
}

.title .name:hover {
  transform: scale(1.15) rotateY(15deg) translateY(-5px);
  border-color: var(--gold);
  box-shadow: 
    0 20px 60px rgba(255, 61, 154, 0.4),
    0 0 80px rgba(255, 184, 0, 0.6),
    inset 0 0 30px rgba(255, 255, 255, 0.1);
  background: rgba(255, 184, 0, 0.1);
}

.title .name.moon-mode {
  font-size: 1.3em;
  animation: moonGlow 1.5s ease-in-out infinite alternate, moonFloat 3s ease-in-out infinite;
  border-color: var(--gold);
  background: rgba(255, 184, 0, 0.15);
  box-shadow: 
    0 0 40px rgba(255, 184, 0, 0.8),
    0 0 80px rgba(255, 255, 255, 0.4),
    inset 0 0 20px rgba(255, 184, 0, 0.2);
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

@keyframes nameShimmer {
  0%, 100% { 
    border-color: rgba(255, 61, 154, 0.3);
    background: rgba(255, 255, 255, 0.05);
  }
  33% { 
    border-color: rgba(0, 245, 228, 0.4);
    background: rgba(0, 245, 228, 0.08);
  }
  66% { 
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.08);
  }
}

@keyframes moonGlow {
  0% { 
    filter: drop-shadow(0 0 20px rgba(255, 184, 0, 0.8));
    transform: scale(1) rotate(-2deg);
  }
  100% { 
    filter: drop-shadow(0 0 60px rgba(255, 184, 0, 1)) drop-shadow(0 0 100px rgba(255, 255, 255, 0.8));
    transform: scale(1.1) rotate(2deg);
  }
}

@keyframes moonFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}
.subtitle { 
  margin: 8px 0 0; 
  color: var(--text-soft); 
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
}
.subtitle .dot { 
  margin: 0 12px; 
  color: var(--accent); 
  font-size: 18px;
}

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

@keyframes titleGlow {
  0% { filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.3)); }
  100% { filter: drop-shadow(0 0 40px rgba(255, 107, 157, 0.6)); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes sparkleExplosion {
  0% {
    transform: translate(0, 0) scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translate(calc(cos(var(--angle)) * 60px), calc(sin(var(--angle)) * 60px)) scale(1.2) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(cos(var(--angle)) * 100px), calc(sin(var(--angle)) * 100px)) scale(0) rotate(360deg);
    opacity: 0;
  }
}

.bg {
  position: fixed; 
  inset: 0; 
  z-index: -3;
  background: 
    radial-gradient(circle at 10% 10%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, rgba(255, 217, 61, 0.05) 0%, transparent 50%);
  animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(2deg); }
}

.stars {
  position: fixed; 
  inset: 0; 
  z-index: -2; 
  pointer-events: none; 
  opacity: 1;
  background-image: 
    /* Large bright stars */
    radial-gradient(4px 4px at 15% 25%, var(--gold) 40%, rgba(255, 184, 0, 0.8) 50%, transparent 60%),
    radial-gradient(3.5px 3.5px at 75% 15%, var(--accent) 40%, rgba(255, 61, 154, 0.8) 50%, transparent 60%),
    radial-gradient(4px 4px at 35% 85%, var(--accent-2) 40%, rgba(0, 245, 228, 0.8) 50%, transparent 60%),
    radial-gradient(3px 3px at 85% 65%, var(--purple) 40%, rgba(168, 85, 247, 0.8) 50%, transparent 60%),
    
    /* Medium stars */
    radial-gradient(2.5px 2.5px at 25% 75%, var(--pink) 40%, rgba(236, 72, 153, 0.7) 50%, transparent 60%),
    radial-gradient(3px 3px at 60% 40%, var(--cyan) 40%, rgba(6, 182, 212, 0.7) 50%, transparent 60%),
    radial-gradient(2.5px 2.5px at 90% 30%, var(--emerald) 40%, rgba(16, 185, 129, 0.7) 50%, transparent 60%),
    radial-gradient(2px 2px at 10% 60%, var(--orange) 40%, rgba(249, 115, 22, 0.7) 50%, transparent 60%),
    
    /* Small twinkling stars */
    radial-gradient(1.5px 1.5px at 70% 80%, var(--purple) 50%, transparent 60%),
    radial-gradient(1px 1px at 40% 20%, var(--accent-2) 50%, transparent 60%),
    radial-gradient(1.5px 1.5px at 80% 45%, var(--gold) 50%, transparent 60%),
    radial-gradient(1px 1px at 20% 40%, var(--pink) 50%, transparent 60%),
    radial-gradient(1.5px 1.5px at 65% 15%, var(--cyan) 50%, transparent 60%),
    radial-gradient(1px 1px at 30% 90%, var(--accent) 50%, transparent 60%),
    radial-gradient(1.5px 1.5px at 95% 75%, var(--emerald) 50%, transparent 60%),
    radial-gradient(1px 1px at 5% 35%, var(--orange) 50%, transparent 60%);
  
  animation: twinkle 2.5s ease-in-out infinite, starRotate 45s linear infinite;
}

@keyframes twinkle {
  0%, 100% { 
    opacity: 0.8; 
    transform: scale(1);
  }
  25% { 
    opacity: 1; 
    transform: scale(1.1);
  }
  50% { 
    opacity: 0.9; 
    transform: scale(1.05);
  }
  75% { 
    opacity: 1; 
    transform: scale(1.08);
  }
}

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

.hero { 
  padding: 40px 0 60px; 
  position: relative;
  z-index: 5;
}
.hero-grid {
  display: grid; 
  gap: 40px; 
  align-items: center;
  grid-template-columns: 1.1fr 1fr;
  animation: slideInUp 1.2s ease-out 0.3s both;
}
.hero-text { 
  display: grid; 
  gap: 20px;
  position: relative;
}
.hero-heading { 
  font-size: clamp(28px, 3.5vw, 48px); 
  margin: 0;
  font-family: "Amiri", serif;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
  animation: textShine 2s ease-in-out infinite alternate;
}
.hero-desc { 
  color: var(--text-soft); 
  line-height: 1.8; 
  margin: 0;
  font-size: 18px;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.hero-cta { 
  margin-top: 10px;
  animation: pulse 2s infinite;
}

.blessing {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-soft);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.blessing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 120px at 20% -40%, rgba(255, 61, 154, .12), transparent 60%),
              radial-gradient(600px 120px at 80% 140%, rgba(0, 245, 228, .12), transparent 60%);
  pointer-events: none;
}
.blessing #blessingText { 
  font-family: "Amiri", serif; 
  font-size: clamp(16px, 2.2vw, 20px); 
  line-height: 1.9; 
}
.blessing .caret {
  color: var(--gold);
  margin-inline-start: 2px;
  animation: caretBlink 1s steps(2) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes textShine {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.btn { 
  cursor: pointer; 
  border: 0; 
  border-radius: 20px; 
  padding: 16px 32px; 
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn.primary { 
  background: var(--gradient-primary);
  color: var(--bg);
  box-shadow: var(--shadow-mega), var(--shadow-glow);
  text-shadow: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-primary);
  border-radius: 22px;
  z-index: -1;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn.primary:hover::after {
  opacity: 0.8;
}

.btn.primary:hover { 
  transform: translateY(-5px) scale(1.08);
  box-shadow: 
    0 30px 100px rgba(0,0,0,0.8), 
    0 0 80px rgba(255, 61, 154, 0.6),
    0 0 120px rgba(0, 245, 228, 0.4),
    inset 0 0 30px rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255,255,255,0.4), 
    rgba(0, 245, 228, 0.3),
    rgba(255,255,255,0.4), 
    transparent);
  transition: left 0.6s ease;
}

.btn.primary:hover::before {
  left: 100%;
}
.btn.ghost { 
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 2px solid rgba(255, 107, 157, 0.3);
  padding: 12px 24px;
  backdrop-filter: blur(10px);
}
.btn.ghost:hover { 
  background: rgba(255, 107, 157, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
}

.photo-toggle {
  position: relative; 
  width: 100%; 
  aspect-ratio: 1; 
  max-width: 450px; 
  justify-self: center;
  perspective: 1200px;
  cursor: pointer;
  animation: photoFloat 6s ease-in-out infinite;
}
.photo-toggle .ring {
  position: absolute; 
  inset: -12%; 
  border-radius: 50%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 61, 154, 0.6) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 245, 228, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 184, 0, 0.4) 0%, transparent 50%),
    conic-gradient(from 0deg, 
      var(--accent) 0%, var(--gold) 20%, var(--accent-2) 40%, 
      var(--purple) 60%, var(--pink) 80%, var(--accent) 100%);
  filter: blur(12px); 
  z-index: -1; 
  animation: ringRotate 6s linear infinite, ringPulse 2.5s ease-in-out infinite;
}

.photo-toggle::before {
  content: '';
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255, 61, 154, 0.2), rgba(0, 245, 228, 0.2), 
    rgba(168, 85, 247, 0.2), rgba(255, 184, 0, 0.2),
    rgba(255, 61, 154, 0.2));
  filter: blur(20px);
  z-index: -2;
  animation: ringRotate 12s linear infinite reverse, megaRingPulse 4s ease-in-out infinite;
}

@keyframes megaRingPulse {
  0%, 100% { transform: scale(0.8); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes photoFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(1deg); }
  50% { transform: translateY(0px) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(-1deg); }
}

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

@keyframes ringPulse { 
  0%, 100% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

.photo {
  position: absolute; 
  inset: 0; 
  border-radius: 30px; 
  overflow: hidden; 
  box-shadow: var(--shadow), 0 0 50px rgba(255, 107, 157, 0.2);
  background-size: cover; 
  background-position: center; 
  transform-style: preserve-3d;
  transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
  border: 3px solid rgba(255, 255, 255, 0.1);
}
.photo--front { 
  z-index: 2;
  background-image: linear-gradient(45deg, rgba(255, 107, 157, 0.1), rgba(78, 205, 196, 0.1));
  background-blend-mode: overlay;
}
.photo--back { 
  z-index: 1; 
  filter: saturate(1.2) brightness(1.1) hue-rotate(10deg);
  background-image: linear-gradient(135deg, rgba(255, 217, 61, 0.1), rgba(183, 148, 246, 0.1));
  background-blend-mode: overlay;
}
.photo-toggle:hover .photo--front { 
  transform: rotateY(-10deg) rotateX(5deg) scale(1.02);
  box-shadow: var(--shadow), 0 0 80px rgba(255, 107, 157, 0.4);
}
.photo-toggle.active .photo--front { 
  transform: rotateY(180deg) scale(0.8); 
  opacity: 0; 
}
.photo-toggle.active .photo--back { 
  transform: rotateY(0deg) scale(1.05); 
  opacity: 1;
  box-shadow: var(--shadow), 0 0 100px rgba(78, 205, 196, 0.5);
}
.photo--back { 
  transform: rotateY(-180deg) scale(0.8); 
  opacity: 0; 
}

.sparkles::before, .sparkles::after {
  content: ""; 
  position: absolute; 
  inset: -12%; 
  background: conic-gradient(from 0deg, 
    transparent 0%, var(--accent) 10%, transparent 20%,
    var(--accent-2) 30%, transparent 40%,
    var(--gold) 50%, transparent 60%,
    var(--purple) 70%, transparent 80%,
    var(--pink) 90%, transparent 100%);
  mask: radial-gradient(closest-side, #000 15%, transparent 25%);
  animation: sparkleRotate 12s linear infinite;
  border-radius: 50%;
}
.sparkles::after { 
  animation-duration: 16s; 
  animation-direction: reverse;
  opacity: 0.6; 
  inset: -15%;
}

@keyframes sparkleRotate { 
  to { transform: rotate(360deg); } 
}

.section-title { 
  font-size: clamp(28px, 4vw, 48px); 
  margin: 30px 0 20px;
  font-family: "Amiri", serif;
  font-weight: 800;
  background: var(--gradient-rainbow);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  position: relative;
  filter: drop-shadow(0 0 20px rgba(255, 61, 154, 0.4));
  animation: sectionTitleShift 8s ease-in-out infinite;
}

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

.section-title::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(ellipse at center, rgba(255, 61, 154, 0.1) 0%, transparent 70%);
  border-radius: 20px;
  z-index: -1;
  filter: blur(15px);
  animation: sectionGlow 3s ease-in-out infinite;
}

@keyframes sectionGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.6; }
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(255, 61, 154, 0.6);
}
.section-desc { 
  color: var(--text-soft); 
  margin: 0 0 24px;
  text-align: center;
  font-size: 16px;
  opacity: 0.8;
}

.quotes { 
  padding: 30px 0 20px; 
  position: relative;
}
.quotes-viewport { 
  position: relative; 
  background: var(--gradient-card);
  border: 2px solid rgba(255, 107, 157, 0.2);
  border-radius: 25px; 
  box-shadow: var(--shadow), var(--shadow-glow);
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.quote-card { 
  margin: 0; 
  padding: 30px 35px; 
  text-align: center;
  position: relative;
}
.quote-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 60px;
  color: var(--accent);
  opacity: 0.3;
  font-family: serif;
}
.quote-card blockquote { 
  margin: 0; 
  font-family: "Amiri", serif; 
  font-size: clamp(20px, 2.5vw, 30px); 
  line-height: 1.7;
  color: var(--text-soft);
  position: relative;
  z-index: 2;
}
.quote-card figcaption { 
  margin-top: 16px; 
  color: var(--accent); 
  font-size: 16px;
  font-weight: 600;
}
.quote-controls { 
  position: absolute; 
  inset-inline: 15px; 
  bottom: 15px; 
  display: flex; 
  gap: 12px; 
  justify-content: space-between; 
}

.gallery { 
  padding: 40px 0 60px; 
  position: relative;
}
.gallery-head {
  margin-bottom: 40px;
}
.grid { 
  display: grid; 
  gap: 24px; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card { 
  background: var(--gradient-card);
  border: 2px solid rgba(255, 107, 157, 0.15);
  border-radius: 24px; 
  padding: 16px; 
  box-shadow: var(--shadow), var(--shadow-glow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}
.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(255, 107, 157, 0.3);
}
.thumb-toggle { 
  position: relative; 
  width: 100%; 
  aspect-ratio: 1; 
  border-radius: 20px; 
  overflow: hidden; 
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.thumb { 
  position: absolute; 
  inset: 0; 
  background-size: cover; 
  background-position: center; 
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.thumb--front { 
  z-index: 2;
  background-image: linear-gradient(45deg, rgba(255, 107, 157, 0.1), rgba(78, 205, 196, 0.1));
  background-blend-mode: overlay;
}
.thumb--back { 
  z-index: 1; 
  transform: scale(1.1) rotate(5deg); 
  opacity: 0;
  filter: saturate(1.3) brightness(1.1);
  background-image: linear-gradient(135deg, rgba(255, 217, 61, 0.1), rgba(183, 148, 246, 0.1));
  background-blend-mode: overlay;
}
.thumb-toggle.active .thumb--front { 
  transform: scale(0.8) rotate(-15deg); 
  opacity: 0; 
}
.thumb-toggle.active .thumb--back { 
  transform: scale(1) rotate(0); 
  opacity: 1; 
}
.card-title { 
  margin: 16px 8px 4px; 
  font-weight: 700;
  font-size: 18px;
  color: var(--text-soft);
  text-align: center;
}

.site-footer { 
  padding: 40px 0 60px; 
  text-align: center; 
  background: var(--gradient-card);
  margin-top: 40px;
  border-top: 2px solid rgba(255, 107, 157, 0.2);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}
.site-footer p {
  font-size: 18px;
  color: var(--text-soft);
  margin: 20px 0 0;
  font-family: "Amiri", serif;
  line-height: 1.6;
}
.site-footer .name {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}

/* Accessibility focus style */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

/* Confetti canvas */
#confetti { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* Goals */
.goals { 
  padding: 40px 0 30px; 
  position: relative;
}
.goals-head { 
  margin-bottom: 30px; 
}
.countdown { 
  margin: 20px 0 24px; 
  color: var(--gold); 
  font-weight: 700;
  font-size: 20px;
  text-align: center;
  background: var(--gradient-card);
  padding: 16px 24px;
  border-radius: 20px;
  border: 2px solid rgba(255, 217, 61, 0.3);
  box-shadow: var(--shadow-glow);
  animation: countdownPulse 2s ease-in-out infinite;
}
@keyframes countdownPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.goal-progress { 
  display: grid; 
  gap: 12px; 
  margin-bottom: 24px;
  background: var(--gradient-card);
  padding: 20px;
  border-radius: 20px;
  border: 2px solid rgba(255, 107, 157, 0.2);
  box-shadow: var(--shadow-glow);
}
.goal-progress .bar { 
  height: 16px; 
  background: rgba(255, 255, 255, 0.1); 
  border-radius: 999px; 
  overflow: hidden; 
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
}
.goal-progress .bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%);
  background-size: 20px 20px;
  animation: progressStripes 1s linear infinite;
}
@keyframes progressStripes {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}
.goal-progress .bar span { 
  display: block; 
  height: 100%; 
  background: var(--gradient-primary);
  transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}
.goal-progress .progress-text { 
  color: var(--text-soft); 
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.goals-list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  display: grid; 
  gap: 16px; 
}
.goal-item { 
  background: var(--gradient-card);
  border: 2px solid rgba(255, 107, 157, 0.15);
  border-radius: 20px; 
  box-shadow: var(--shadow), var(--shadow-glow);
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}
.goal-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(255, 107, 157, 0.3);
}
.goal { 
  display: grid; 
  grid-template-columns: auto 1fr; 
  gap: 16px; 
  align-items: start;
}
.goal input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--accent);
  cursor: pointer;
}
.goal-title { 
  font-weight: 800;
  font-size: 18px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.goal-desc { 
  color: var(--muted); 
  font-size: 15px;
  line-height: 1.5;
}
.goals-actions { 
  margin-top: 20px; 
  display: flex; 
  justify-content: center; 
}

/* Messages */
.messages { 
  padding: 40px 0 60px; 
  position: relative;
}
.cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 24px; 
}
.msg-card { 
  background: var(--gradient-card);
  border: 2px solid rgba(78, 205, 196, 0.2);
  border-radius: 24px; 
  padding: 24px; 
  box-shadow: var(--shadow), var(--shadow-glow);
  opacity: 0; 
  transform: translateY(30px) scale(0.95); 
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.msg-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}
.msg-card .msg-body { 
  font-family: "Amiri", serif; 
  line-height: 1.8;
  font-size: 18px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.msg-card .msg-from { 
  color: var(--accent-2); 
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.msg-card.revealed { 
  opacity: 1; 
  transform: translateY(0) scale(1); 
}
.msg-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-2);
  box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 60px rgba(78, 205, 196, 0.4);
}

.msg-card.empty-card {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.msg-card.empty-card .empty-msg {
  color: var(--muted);
  font-style: italic;
  opacity: 0.6;
}

/* Responsive additions */
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
}

/* Mobile optimizations */
@media (max-width: 540px) {
  .site-header { padding: 24px 0 12px; }
  .title { font-size: clamp(28px, 9vw, 44px); letter-spacing: 0.6px; }
  /* Disable heavy title glow animations on mobile */
  .title { animation: none; filter: none; text-shadow: none; background-size: 100% 100%; }
  .title::before, .title::after { display: none; }
  .subtitle { font-size: 13px; }
  .hero { padding: 24px 0 36px; }
  .hero-heading { font-size: clamp(20px, 6vw, 28px); }
  .hero-desc { font-size: 14px; line-height: 1.7; }
  .photo-toggle { max-width: 84vw; animation: none; }
  /* Disable heavy ring/sparkle halos on mobile */
  .photo-toggle .ring, .sparkles { display: none; }
  .photo-toggle::before { display: none; }
  .btn { padding: 12px 18px; font-size: 15px; border-radius: 16px; }
  .blessing { padding: 10px 12px; border-radius: 14px; }
  .blessing #blessingText { font-size: clamp(14px, 4vw, 16px); }
  .blessing #blessingText { transition: opacity 450ms ease; }
  .blessing .caret { display: none !important; }
  .quotes-viewport { border-radius: 16px; backdrop-filter: none; }
  .quote-card { padding: 18px 16px; }
  .quote-card blockquote { font-size: clamp(16px, 4.5vw, 20px); }
  .goal-progress .bar { height: 12px; }
  .cards { gap: 14px; }
  .msg-card { padding: 16px; border-radius: 18px; backdrop-filter: none; }
  .grid { gap: 14px; }
  .card { padding: 12px; border-radius: 18px; backdrop-filter: none; }
  .thumb-toggle { border-radius: 14px; }
  .section-title { font-size: clamp(20px, 6vw, 26px); margin: 14px 0 10px; }
  /* Disable animated starfield and background shift on mobile */
  .stars { display: none; }
  .bg { animation: none; background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%) !important; }
}

@media (max-width: 400px) {
  .title { font-size: clamp(24px, 10vw, 36px); letter-spacing: 0.5px; }
  .hero-heading { font-size: clamp(18px, 7vw, 24px); }
  .btn { padding: 10px 16px; font-size: 14px; }
  .site-footer p { font-size: 14px; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { 
    animation-duration: 0.001ms !important; 
    animation-iteration-count: 1 !important; 
    transition-duration: 0.001ms !important; 
    scroll-behavior: auto !important; 
  }
}


