body {
    margin: 0; padding: 0;
    font-family: 'Playfair Display', serif;
    color: #fff;
    overflow-x: hidden;
    background-color: #111;
}

#siteBackground {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('bg.jpg'); 
    background-size: cover; background-position: center; background-repeat: no-repeat;
    z-index: -1; filter: brightness(0.5) contrast(1.1);
}

/* 🌟 Bismillah Responsive Text - വലുപ്പം കുറച്ചു */
.bismillah-text {
    font-family: 'Amiri', serif; 
    font-size: 2.2rem; /* മുമ്പ് 3.5rem ആയിരുന്നു */
    color: #d4af37;
    text-align: center; margin-bottom: 5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- 💌 PREMIUM ENVELOPE --- */
.invitation-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: radial-gradient(circle, rgba(40,40,40,0.9), #000);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 1.5s;
    perspective: 1000px;
}
.envelope { position: relative; width: 340px; height: 230px; background: linear-gradient(145deg, #d4af37, #b8860b); border-radius: 8px; box-shadow: 0 15px 40px rgba(0,0,0,0.8); transform-style: preserve-3d; }
.envelope-back { position: absolute; width: 100%; height: 100%; background: #996e00; border-radius: 8px; }
.envelope-front { position: absolute; top: 0; left: 0; width: 0; height: 0; border-style: solid; border-width: 115px 170px; border-color: transparent #d4af37 #a67c00 #d4af37; z-index: 3; pointer-events: none; border-radius: 0 0 8px 8px; }
.flap { position: absolute; top: 0; left: 0; width: 0; height: 0; border-style: solid; border-width: 120px 170px 0 170px; border-color: #ffda6a transparent transparent transparent; z-index: 4; transform-origin: top; transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), z-index 1s; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3)); }
.flap.open { transform: rotateX(180deg); z-index: 1; filter: none; }
.wax-seal { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; background: radial-gradient(circle at 35% 30%, #fff5e0 0%, #ffb3c6 32%, #ff5f96 65%, #ad1457 100%); border: 2px solid #f4d78c; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-size: 27px; box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 18px rgba(255,120,160,0.7), inset 0 0 10px rgba(0,0,0,0.3); z-index: 5; transition: opacity 0.5s; cursor: pointer; overflow: visible; }
.wax-seal::before { content: ''; position: absolute; top: 7px; left: 11px; width: 16px; height: 10px; background: rgba(255,255,255,0.5); border-radius: 50%; filter: blur(2px); transform: rotate(-25deg); pointer-events: none; }
.wax-seal::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,0.95) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 22% 68%, rgba(255,255,255,0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 80%, rgba(255,255,255,0.85) 0 1px, transparent 2px); }
.flap.open .wax-seal { opacity: 0; }
.letter { position: absolute; bottom: 5px; left: 6px; right: 6px; height: 218px; background: #fffdf5; border-radius: 5px; display: flex; align-items: center; justify-content: center; text-align: center; color: #333; z-index: 2; transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.5s; box-shadow: 0 0 15px rgba(0,0,0,0.2); backface-visibility: hidden; transform-style: flat; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.letter-border { border: 2px dashed #d4af37; padding: 15px; border-radius: 5px; width: 90%; height: 85%; display: flex; flex-direction: column; justify-content: center; align-items: center;}
.letter.rise { transform: translateY(-130px); z-index: 5; box-shadow: 0 20px 40px rgba(0,0,0,0.6);}
.cover-names { font-size: 1.8rem; color: #b8860b; font-family: 'Cinzel', serif; margin: 0; backface-visibility: hidden; }
.emotional-text { font-size: 0.85rem; font-style: italic; color: #666; margin: 15px 0; }
.open-hint { font-size: 0.8rem; color: #b8860b; font-weight: bold; margin-top: 10px; animation: hintPulse 1.8s ease-in-out infinite; }
.invitation-wrapper.awaiting-continue { cursor: pointer; }
@keyframes hintPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.wax-seal { animation: rosePulse 1.8s ease-in-out infinite; }
@keyframes rosePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 18px rgba(255,120,160,0.7), inset 0 0 10px rgba(0,0,0,0.3); }
  50% { transform: translate(-50%, -50%) scale(1.14); box-shadow: 0 6px 16px rgba(0,0,0,0.55), 0 0 32px rgba(255,120,160,1), inset 0 0 10px rgba(0,0,0,0.3); }
}

/* --- GLASSMORPHISM CONTAINERS --- */
.section-glass { background: rgba(20, 20, 20, 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin: 30px auto; border-radius: 20px; border: 1px solid rgba(255, 215, 0, 0.25); box-shadow: 0 10px 30px rgba(0,0,0,0.5); padding: 40px 20px; max-width: 800px; text-align: center; }
.golden-text { background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c); -webkit-background-clip: text; color: transparent; margin-bottom: 25px; font-family: 'Cinzel', serif; font-size: 2.2rem; }
.couple-photos { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 30px; }
.couple-photos img { width: 130px; height: 130px; border-radius: 50%; border: 4px solid #d4af37; object-fit: cover; box-shadow: 0 0 20px rgba(212, 175, 55, 0.5); }
.heart-center { font-size: 30px; animation: heartbeat 1.5s infinite; }
@keyframes heartbeat { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.countdown-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.time-box { background: rgba(212, 175, 55, 0.15); border: 1px solid rgba(212, 175, 55, 0.5); padding: 15px; border-radius: 12px; min-width: 65px; }
.time-box span { font-size: 2rem; font-weight: bold; color: #ffda6a; }

/* --- 🖼️ 3D SWIPE CAROUSEL --- */
.carousel-container { position: relative; width: 100%; height: 320px; display: flex; align-items: center; justify-content: center; perspective: 1200px; touch-action: none; }
.carousel-track { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; cursor: grab; }
.carousel-slide { position: absolute; width: 220px; height: 280px; border-radius: 15px; object-fit: cover; border: 3px solid #d4af37; box-shadow: 0 10px 30px rgba(0,0,0,0.8); transition: transform 0.4s ease-out, opacity 0.4s ease-out; }
.carousel-slide.active { transform: translateX(0) scale(1.1); z-index: 10; opacity: 1; box-shadow: 0 0 25px rgba(212, 175, 55, 0.6); }
.carousel-slide.prev { transform: translateX(-130px) scale(0.8) translateZ(-80px) rotateY(15deg); z-index: 5; opacity: 0.5; pointer-events: none; }
.carousel-slide.next { transform: translateX(130px) scale(0.8) translateZ(-80px) rotateY(-15deg); z-index: 5; opacity: 0.5; pointer-events: none; }
.carousel-slide.hidden { opacity: 0; z-index: 1; transform: scale(0.4); pointer-events: none;}
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: linear-gradient(135deg, #d4af37, #aa7c11); color: #fff; border: none; width: 45px; height: 45px; border-radius: 50%; font-size: 20px; cursor: pointer; z-index: 20; }
.prev-btn { left: 10px; } .next-btn { right: 10px; }

/* --- 🎫 SCRATCH CARD --- */
.premium-scratch-wrap { display: inline-block; padding: 8px; border-radius: 20px; background: linear-gradient(145deg, #fceabb, #f8b500); box-shadow: 0 15px 35px rgba(0,0,0,0.5); position: relative; z-index: 10; }
.scratch-container { position: relative; width: 300px; height: 150px; border-radius: 12px; overflow: hidden; background: white; touch-action: none;}
.date-reveal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #fff; color: #b8860b; font-size: 2.2rem; font-weight: bold; border: 2px dashed #d4af37; box-sizing: border-box; border-radius: 12px; }
#scratchCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: crosshair; }

/* 🌸 Magic Fade Flowers */
.scratch-petal-fade {
    position: fixed; pointer-events: none; z-index: 9999; font-size: 26px;
    animation: fadeFloat 0.8s ease-out forwards;
    transform: translate(-50%, -50%);
}
@keyframes fadeFloat {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.5) rotate(180deg); opacity: 0; }
}

/* --- ⌚ SMART WATCH UI BOX --- */
.watch-section { padding: 20px 10px; }
#watch-container {
    width: 100%; height: 200px; background: #727272; border-radius: 20px; 
    position: relative; overflow: hidden; touch-action: none; cursor: grab;
    border: 3px solid #040404; box-shadow: inset 0 0 30px rgba(0,0,0,1);
}
#watch-container:active { cursor: grabbing; }
#watch-canvas { position: absolute; top: 50%; left: 50%; width: 0; height: 0; }
.watch-bubble {
    position: absolute; border-radius: 50%; object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.9);
    border: 2px solid #fff; 
    transform-origin: center; will-change: transform; pointer-events: none;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    margin-top: -35px; margin-left: -35px;
}

/* --- 📍 VENUE SECTION --- */
.venue-section { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.venue-address { font-size: 1.2rem; margin-bottom: 20px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); white-space: pre-line; line-height: 1.5; }
.map-btn { display: inline-block; padding: 12px 30px; background: linear-gradient(45deg, #25D366, #128C7E); color: white; text-decoration: none; border-radius: 30px; font-weight: bold; font-size: 1.1rem; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); }

/* --- 📅 ADD TO CALENDAR --- */
.calendar-btn {
    margin-top: 22px; padding: 12px 28px; border: 1px solid rgba(212,175,55,0.7);
    background: rgba(212,175,55,0.12); color: #f4d78c; font-weight: bold; font-size: 0.95rem;
    border-radius: 30px; cursor: pointer; backdrop-filter: blur(4px);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.calendar-btn:hover { background: rgba(212,175,55,0.25); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(212,175,55,0.35); }
.calendar-btn:active { transform: translateY(0); }

/* --- ❝ WELCOMING QUOTE --- */
.quote-section { padding: 45px 25px; }
.quote-mark { font-family: 'Playfair Display', serif; font-size: 3.2rem; color: #d4af37; line-height: 1; opacity: 0.85; margin-bottom: 5px; }
.quote-text { max-width: 520px; margin: 0 auto; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.35rem; color: #f4e9c9; line-height: 1.7; }
.quote-divider { margin-top: 22px; color: #d4af37; font-size: 0.9rem; letter-spacing: 4px; }
.quote-divider span { display: inline-block; padding: 0 10px; position: relative; }
.quote-divider::before, .quote-divider::after { content: ''; display: inline-block; width: 60px; height: 1px; background: rgba(212,175,55,0.5); vertical-align: middle; }
.music-player {
    position: fixed; top: 15px; right: 15px; z-index: 1000;
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, rgba(60,40,10,0.75), rgba(10,10,10,0.75));
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212,175,55,0.6);
    padding: 8px 16px 8px 14px; border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 0 rgba(212,175,55,0.5);
    transition: box-shadow 0.4s ease;
}
.music-player.playing { box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 16px rgba(212,175,55,0.55); }

.eq-bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.eq-bars span {
    display: block; width: 3px; height: 4px; border-radius: 2px;
    background: linear-gradient(180deg, #f4d78c, #d4af37);
    opacity: 0.55;
    transition: opacity 0.3s ease;
}
.music-player.playing .eq-bars span {
    opacity: 1;
    animation: eqBounce 0.9s ease-in-out infinite;
}
.eq-bars span:nth-child(1) { animation-delay: 0s; }
.eq-bars span:nth-child(2) { animation-delay: 0.15s; }
.eq-bars span:nth-child(3) { animation-delay: 0.3s; }
.eq-bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes eqBounce {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
}

#playBtn {
    background: transparent; border: none; outline: none; box-shadow: none;
    color: #f4d78c; font-size: 1.1rem; line-height: 1; cursor: pointer;
    padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    transition: transform 0.25s ease, color 0.25s ease;
}
#playBtn:hover { color: #fff; transform: scale(1.15); }
#playBtn:active { transform: scale(0.92); }

/* 📱 MOBILE RESPONSIVE FIXES */
@media (max-width: 600px) {
    .bismillah-text { font-size: 1.6rem; } /* മൊബൈലിൽ ബിസ്മിയുടെ വലിപ്പം കുറച്ചു */
    .envelope { width: 300px; height: 200px; }
    .envelope-front { border-width: 100px 150px; }
    .flap { border-width: 100px 150px 0 150px; }
    .letter { height: 180px; }
    .section-glass { margin: 15px; padding: 30px 15px; }
    .golden-text { font-size: 1.8rem; }
    .carousel-slide { width: 170px; height: 230px; }
    .carousel-slide.prev { transform: translateX(-90px) scale(0.8) translateZ(-50px); }
    .carousel-slide.next { transform: translateX(90px) scale(0.8) translateZ(-50px); }
}