:root {
    --primary-color: #f7cac9; /* Rose Gold/Pink */
    --secondary-color: #6a0dad; /* Deep Purple */
    --accent-color: #ffd700; /* Gold */
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #2e0854 0%, #4b0082 50%, #6a0dad 100%);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Loader Styles */
.loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #4b0082 0%, #2e0854 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
    overflow: hidden;
}

.loader::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 60%);
    animation: rotateBg 10s linear infinite;
    z-index: -1;
}

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

.loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
    text-align: center;
    padding: 20px;
}

.wait-text {
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--primary-color);
    opacity: 0.9;
    font-family: var(--font-body);
}

.princess-text {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    font-weight: 400;
    background: linear-gradient(
        90deg, 
        rgba(255, 215, 0, 0.8) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 215, 0, 0.8) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 3s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
    line-height: 1.2;
}

@keyframes shimmerText {
    to { background-position: 200% center; }
}

.progress-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    animation: loading 3.5s ease-in-out forwards;
}

@keyframes loading {
    to { width: 100%; }
}

/* Intro Text Reveal Overlay */
.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: transparent; /* Changed from #000 to transparent */
    display: none;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.intro-overlay.active {
    display: flex;
}

/* Background Slideshow Styling */
.intro-bg-slideshow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Lower than text */
    background: #000; /* Fallback */
}

.intro-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: slideSequence 6s infinite linear;
}

/* Delay for each slide based on 6s total: 2s focus per image with 0.8s cross-fade */
.intro-slide:nth-child(1) {
    animation-delay: 0s;
}

.intro-slide:nth-child(2) {
    animation-delay: 2s;
}

.intro-slide:nth-child(3) {
    animation-delay: 4s;
}

@keyframes slideSequence {
    0% { opacity: 0; transform: scale(1.15); }
    5% { opacity: 1; }
    33% { opacity: 1; transform: scale(1); }
    38% { opacity: 0; }
    100% { opacity: 0; }
}

/* Dark vignette over slideshow for readability */
.intro-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 501;
    pointer-events: none;
}

.intro-text-overlay {
    position: relative;
    z-index: 502;
    text-align: center;
    transition: opacity 0.8s ease;
}

.intro-text-overlay.fade-out {
    opacity: 0;
}

@keyframes zoomOutReveal {
    0% { 
        transform: scale(4); 
        opacity: 0; 
        filter: blur(40px); 
        letter-spacing: 100px;
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
        filter: blur(0); 
        letter-spacing: 2px;
    }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.reveal-text {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    font-weight: 950;
    text-align: center;
    opacity: 0;
    margin: 0;
    line-height: 1.1;
    /* Golden Blossom Gradient */
    background: linear-gradient(
        90deg, 
        #ffd700, /* Gold */
        #ffb6c1, /* Blossom Pink */
        #ffdf5e, /* Golden Yellow */
        #ffb6c1, /* Blossom Pink */
        #ffd700  /* Gold */
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.4));
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.reveal-text.show {
    animation: zoomOutReveal 2.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards,
               shimmer 6s infinite linear;
}


.reveal-text.delayed {
    animation-delay: 0.6s;
    font-size: 8rem;
    filter: drop-shadow(0 0 35px rgba(122, 0, 255, 0.5));
}

/* Background Stars adjustment */
.stars-container {
    z-index: 2;
}

.balloons-container {
    z-index: 3;
}

/* Hero Section Visibility */
main.hidden-initially {
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

main.visible {
    opacity: 1;
    pointer-events: all;
}

.hero-section {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

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

.sub-greeting {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 300;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(to right, #f7cac9, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.message {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-body);
}

.btn.primary {
    background: linear-gradient(45deg, var(--primary-color), #ffb6c1);
    color: #4b0082;
    box-shadow: 0 10px 20px rgba(247, 202, 201, 0.3);
}

.btn.secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.memories-btn {
    background: linear-gradient(45deg, #7a00ff, #ff007a, #7a00ff);
    background-size: 200% auto;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(122, 0, 255, 0.4);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s linear infinite, glowPulsePurple 2s ease-in-out infinite;
    padding: 1.2rem 2.8rem;
    position: relative;
    overflow: hidden;
}

@keyframes glowPulsePurple {
    0%, 100% { box-shadow: 0 0 20px rgba(122, 0, 255, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(255, 0, 122, 0.6); transform: scale(1.05); }
}

.btn.memories-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
    transform: rotate(45deg);
    animation: sweep 3s infinite;
}

.btn.memories.vault-btn {
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% auto;
    color: #2e0854;
    border: 2px solid #ffffff;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s linear infinite, glowPulse 2s ease-in-out infinite;
    padding: 1.2rem 2.8rem;
    position: relative;
    overflow: hidden;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.7); transform: scale(1.05); }
}

.btn.memories.vault-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
    transform: rotate(45deg);
    animation: sweep 3s infinite;
}

/* Firework Button */
.btn.firework-btn {
    background: linear-gradient(45deg, #111, #333, #111);
    color: #ffd700;
    border: 2px solid #555;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(255, 215, 0, 0.2);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1.2rem 2.8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.btn.firework-btn:hover {
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 20px rgba(255, 215, 0, 0.5);
    background: linear-gradient(45deg, #222, #000, #222);
}

/* Fireworks Layers */
.night-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999; /* Highest priority */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out; /* Faster fade for impact */
    display: flex;
    justify-content: center;
    align-items: center;
}

.night-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#fireworksCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

@keyframes sweep {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.btn.premium.gold-shimmer {
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% auto;
    color: #2e0854;
    border: 2px solid white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s linear infinite;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    margin: 1rem;
}

.btn.premium.purple-glow {
    background: linear-gradient(45deg, #7a00ff, #ff007a, #7a00ff);
    background-size: 200% auto;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s linear infinite;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    margin: 1rem;
    box-shadow: 0 0 20px rgba(122, 0, 255, 0.5);
}

.btn.premium.orange-shimmer {
    background: linear-gradient(45deg, #ff8c00, #ffd700, #ff8c00);
    background-size: 200% auto;
    color: #2e0854;
    border: 2px solid white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s linear infinite;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    margin: 1rem;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
}

.btn.premium.rose-glow {
    background: linear-gradient(45deg, #ff4d6d, #ff85a1, #ff4d6d);
    background-size: 200% auto;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s linear infinite;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    margin: 1rem;
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.5);
}


/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 500px;
    width: 100%;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 10;
}

/* Zoom out animation for gallery title */
@keyframes zoomOutText {
    0% { transform: scale(3); opacity: 0; filter: blur(10px); }
    100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

.zoom-out-text {
    animation: zoomOutText 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* Surprise Gallery (Cinematic Grid) */
.surprise-gallery, .vault-modal-content {
    max-width: 95vw;
    max-height: 90vh;
    width: 1000px;
    overflow-y: auto;
    display: block;
    padding: 3rem 2rem;
}

.gallery-title {
    margin-bottom: 3rem;
    font-size: 3.5rem;
    display: inline-block;
    width: 100%;
}

.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px;
    justify-items: center;
    position: relative;
    min-height: 200px;
}

.no-moments {
    grid-column: 1 / -1;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px dashed var(--primary-color);
    animation: pulse 2s infinite;
}

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

/* Timeline & Special Dates Styling */
.moments-categories {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.moments-categories.hidden {
    display: none;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.timeline-container.hidden {
    display: none;
}

.milestone-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: left;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.milestone-card.show {
    opacity: 1;
    transform: translateY(0);
}

.milestone-date {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.milestone-desc {
    color: #ffffff;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
}

.milestone-card::before {
    content: '✨';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 1.5rem;
}

/* Unforgettable Moments Specific Styling */
.timeline-container.unforgettable {
    gap: 1.5rem;
}

.unforgettable-milestone {
    background: linear-gradient(135deg, rgba(122, 0, 255, 0.2), rgba(255, 0, 122, 0.2));
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 1.5rem 2.5rem;
    font-size: 1.3rem;
    color: white;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    opacity: 0;
    transform: scale(0.7) translateX(-50px);
    transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.unforgettable-milestone.show {
    opacity: 1;
    transform: scale(1) translateX(0);
}

.unforgettable-milestone:nth-child(even) {
    transform: scale(0.7) translateX(50px);
    background: linear-gradient(135deg, rgba(255, 0, 122, 0.2), rgba(122, 0, 255, 0.2));
}

.unforgettable-milestone:nth-child(even).show {
    transform: scale(1) translateX(0);
}

/* Funny Moments Specific Styling */
.timeline-container.funny {
    gap: 1.5rem;
}

.funny-milestone {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.3), rgba(255, 215, 0, 0.3));
    border: 3px dashed var(--accent-color);
    border-radius: 25px;
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    color: #ffd700;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-style: italic;
    font-weight: 600;
}

.funny-milestone.show {
    opacity: 1;
    transform: scale(1) rotate(0);
    animation: wobble 1.5s ease-in-out forwards;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg) scale(1.02); }
    75% { transform: rotate(-3deg) scale(0.98); }
}

.polaroid-card {
    background: white;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    transform: rotate(var(--rot));
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

.polaroid-card img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Prevents stretching/compressing */
    display: block;
    border: 1px solid #eee;
    background: #fdfdfd; 
}

.polaroid-card:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.polaroid-card::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    text-align: center;
}

/* Cartoon Wish Styling */
.cartoon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.cartoon-img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
    animation: bounce 2s ease-in-out infinite;
    z-index: 2;
}

.speech-bubble {
    background: white;
    border-radius: 20px;
    padding: 15px 20px;
    position: relative;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: scale(0);
    transform-origin: bottom center;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.speech-bubble.active {
    transform: scale(1);
    animation: bubblePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px 15px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes bubblePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Hearts & Petals Shower */
.hearts-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}

.heart-particle, .petal-particle {
    position: absolute;
    top: -50px;
    pointer-events: none;
    animation: rain linear forwards;
}

@keyframes rain {
    to {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Virtual Letter Styling */
.envelope-wrapper {
    perspective: 1000px;
    margin: 2rem auto;
    width: 250px;
    height: 180px;
    cursor: pointer;
    transition: transform 0.5s;
}

.envelope-wrapper:hover {
    transform: translateY(-10px);
}

.envelope {
    position: relative;
    width: 250px;
    height: 180px;
    background: #f7cac9;
    border-radius: 5px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transform-style: preserve-3d;
}

.envelope-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 120px;
    background: #f7cac9;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transition: transform 0.6s;
    transform-origin: top;
    z-index: 5;
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 120px;
    background: #f1b1b0;
    clip-path: polygon(0 0, 50% 40%, 100% 0, 100% 100%, 0 100%);
    z-index: 4;
}

.letter {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 150px;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.6s, height 0.6s;
    z-index: 3;
    overflow: hidden;
    color: #4b0082;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
}

.envelope-wrapper.open .envelope-top {
    transform: rotateX(180deg);
}

.envelope-wrapper.open .letter {
    transform: translateY(-120px);
    height: 250px;
    z-index: 10;
}

/* Music Player Styling */
.music-player-glass {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.music-btn:hover {
    transform: scale(1.1);
}

.music-icon {
    font-size: 1.5rem;
    z-index: 10;
}

.music-waves {
    position: absolute;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.music-btn.playing .music-waves {
    opacity: 1;
}

.music-waves span {
    width: 3px;
    background: var(--primary-color);
    animation: wave 1s ease-in-out infinite;
}

.music-waves span:nth-child(2) { animation-delay: 0.2s; height: 15px; }
.music-waves span:nth-child(3) { animation-delay: 0.4s; height: 10px; }

@keyframes wave {
    0%, 100% { height: 5px; }
    50% { height: 20px; }
}

/* CSS Interactive Cake */
.css-cake-container {
    position: relative;
    width: 200px;
    height: 250px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.cake-base {
    position: relative;
    width: 200px;
    height: 150px;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

.cake-layer {
    position: absolute;
    width: 100%;
    border-radius: 10px;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.1);
}

.layer-bottom {
    height: 60px;
    background: #5d3a24; /* Chocolate */
    bottom: 0;
    z-index: 1;
}

.layer-middle {
    height: 50px;
    background: #f7cac9; /* Pink */
    bottom: 40px;
    width: 180px;
    left: 10px;
    z-index: 2;
}

.layer-top {
    height: 40px;
    background: #ffffff; /* Vanilla */
    bottom: 75px;
    width: 150px;
    left: 25px;
    z-index: 3;
}

.cake-icing {
    position: absolute;
    top: 30px;
    left: 10px;
    width: 180px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    z-index: 4;
    box-shadow: 0 5px 15px rgba(255,255,255,0.8);
}

.candles-container {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 40px;
    z-index: 10;
}

.css-candle {
    width: 10px;
    height: 40px;
    background: linear-gradient(to bottom, #ffd700, #ff8c00);
    border-radius: 5px;
    position: relative;
}

.css-flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 18px;
    background: radial-gradient(circle at 50% 100%, #fff, #ffde00 60%, #ff8c00 90%);
    border-radius: 50% 50% 20% 20%;
    animation: flicker 0.3s infinite alternate;
    box-shadow: 0 0 10px #ffde00;
}

.css-candle.blown .css-flame {
    display: none;
}

/* Red Velvet Cake & Name Writing */
.cake-3d-wrapper {
    perspective: 1500px;
    width: 320px;
    height: 350px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.cake-base-3d {
    position: relative;
    width: 220px;
    height: 140px;
    transform-style: preserve-3d;
    transform: rotateX(25deg);
    transition: all 0.6s ease;
}

.cake-top {
    position: absolute;
    top: 0;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffb6c1 40%, #ff69b4 100%);
    border-radius: 50%;
    transform: rotateX(90deg) translateZ(70px);
    box-shadow: 
        inset 0 0 30px rgba(255, 105, 180, 0.2),
        0 2px 5px rgba(0,0,0,0.1);
    z-index: 5;
    animation: cakeShimmer 5s infinite alternate;
}

.cake-side {
    position: absolute;
    top: 110px;
    width: 220px;
    height: 140px;
    background: linear-gradient(to right, 
        #7d3c45 0%, 
        #ff85a1 15%, 
        #fffaf0 16%, 
        #fffaf0 22%,
        #ffb6c1 23%, 
        #ffb6c1 48%,
        #fffaf0 49%, 
        #fffaf0 55%,
        #ffb6c1 56%, 
        #ff85a1 80%,
        #7d3c45 100%);
    border-radius: 0 0 110px 110px / 0 0 45px 45px;
    transform: translateY(-110px);
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.4),
        inset 0 -5px 10px rgba(0,0,0,0.2);
}

.cake-plate {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%) translateZ(-10px) rotateX(0deg);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #f8f8f8 70%, #eeeeee 100%);
    border-radius: 50%;
    box-shadow: 
        0 15px 45px rgba(0,0,0,0.3),
        inset 0 -3px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: rotateX(90deg) translateZ(-80px);
}

.cream-dollops {
    position: absolute;
    width: 220px;
    height: 220px;
    top: 0;
    left: 0;
    transform: rotateX(90deg) translateZ(75px);
    transform-style: preserve-3d;
    z-index: 10;
}

.dollop {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ffe4e1 60%, #ffc0cb 100%);
    border-radius: 50% 50% 40% 40%;
    transform: 
        translate(-50%, -50%) 
        rotate(calc(var(--i) * 45deg)) 
        translate(92px) 
        rotateX(-90deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gold-pearls {
    position: absolute;
    width: 220px;
    height: 220px;
    top: 0;
    left: 0;
    transform: rotateX(90deg) translateZ(72px);
    transform-style: preserve-3d;
    z-index: 15;
}

.pearl {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ffd700 60%, #b8860b 100%);
    border-radius: 50%;
    transform: 
        translate(-50%, -50%) 
        rotate(calc(var(--i) * 36deg)) 
        translate(calc(15px + var(--i) * 8px)) 
        rotateX(-90deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes cakeShimmer {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.1); box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 105, 180, 0.3); }
}

/* Name Writing Overlay */
.name-writing-container {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotateX(25deg);
    width: 200px;
    height: 100px;
    z-index: 100;
    pointer-events: none;
}

.name-svg path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.8));
    transition: stroke-dashoffset 3s linear;
}

.name-svg path.writing {
    stroke-dashoffset: 0;
}

/* Refined Chef Knife & Writing Animation */
.cake-knife-v2 {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1001;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
    offset-path: path("M30,60 C30,30 50,30 50,60 M50,60 L50,80 M60,80 L60,50 C60,40 80,40 80,50 L80,80 M90,80 C90,60 110,60 110,80 M120,80 L120,50 C120,40 140,40 140,50 L140,80 M150,80 C150,60 170,60 170,80 M180,80 L180,50");
    offset-rotate: 0deg;
}

.knife-blade {
    width: 12px;
    height: 130px;
    background: linear-gradient(135deg, #e0e0e0, #ffffff 40%, #7f8c8d);
    border-radius: 60% 40% 2px 2px / 20% 10% 0 0;
    border: 1px solid rgba(0,0,0,0.2);
}

.knife-handle {
    width: 18px;
    height: 50px;
    background: linear-gradient(to right, #2c3e50, #000, #2c3e50);
    border-radius: 0 0 10px 10px;
}

.cake-knife-v2.writing {
    animation: drawName 3s linear forwards;
    opacity: 1;
}

@keyframes drawName {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

.cake-knife-v2.cutting {
    animation: realKnifeCutV4 1.5s ease-in-out forwards;
    opacity: 1;
    offset-path: none;
    transform: translate(0, -100px) rotate(0deg);
}

@keyframes realKnifeCutV4 {
    0% { transform: translate(0, -100px) rotate(0deg); }
    50% { transform: translate(0, 50px) rotate(10deg); }
    100% { transform: translate(150px, -100px) rotate(45deg); opacity: 0; }
}

/* 3D Wedge Slice (Red Velvet) */
.cake-slice-3d {
    position: absolute;
    inset: 0;
    z-index: 20;
    opacity: 0;
    transform-style: preserve-3d;
    transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s;
}

.cake-slice-3d.active {
    opacity: 1;
}

.cake-slice-3d.moving {
    transform: translate(80px, 60px) translateZ(40px) rotateY(35deg) rotateZ(20deg);
}

.slice-top {
    position: absolute;
    top: 0;
    width: 220px;
    height: 220px;
    background: #fffaf0;
    border-radius: 50%;
    clip-path: polygon(50% 50%, 100% 35%, 100% 65%);
    transform: rotateX(90deg) translateZ(70px);
}

.slice-side {
    position: absolute;
    top: 40px;
    left: 50%;
    width: 150px;
    height: 145px;
    background: linear-gradient(to bottom, 
        #fffaf0 0%, 
        #fffaf0 15%, 
        #9b111e 16%, /* Red Velvet layer */
        #9b111e 45%, 
        #fffaf0 46%, /* Middle frosting layer */
        #fffaf0 55%, 
        #9b111e 56%, 
        #7b0a0a 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.side-1 {
    transform: rotateY(-75deg) translateZ(2px);
    transform-origin: left;
}

.side-2 {
    transform: rotateY(-105deg) translateZ(-2px);
    transform-origin: left;
}

.slice-front {
    position: absolute;
    top: 40px;
    left: 160px;
    width: 62px;
    height: 145px;
    background: linear-gradient(to bottom, #fffaf0 20%, #9b111e 21%, #9b111e 45%, #fffaf0 46%, #9b111e 100%);
    border-radius: 0 0 32px 32px / 0 0 10px 10px;
}

/* Cake Base Cut Effect */
.cake-base-3d.cut {
    clip-path: polygon(0 0, 100% 0, 100% 35%, 50% 50%, 100% 65%, 100% 100%, 0 100%);
}

.cake-base-3d.cut::before, .cake-base-3d.cut::after {
    content: '';
    position: absolute;
    top: 40px; left: 50%;
    width: 150px; height: 145px;
    background: linear-gradient(to bottom, #fffaf0 15%, #9b111e 16%, #9b111e 45%, #fffaf0 46%, #fffaf0 55%, #9b111e 100%);
    opacity: 0.9;
}

.cake-base-3d.cut::before { transform: rotateY(-75deg); transform-origin: left; }
.cake-base-3d.cut::after { transform: rotateY(-105deg); transform-origin: left; }

.video-presentation-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    border-radius: 20px;
}

.video-presentation-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.video-container-glass {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-presentation-overlay.active .video-container-glass {
    transform: scale(1) translateY(0);
}

.birthday-video {
    width: 100%;
    border-radius: 20px;
    display: block;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.close-video-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
    transition: transform 0.3s ease;
}

.close-video-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Hide cake when video is active */
.video-active-hide {
    opacity: 0.2;
    filter: blur(5px);
    transform: scale(0.9);
}

.balloons-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.balloon {
    position: absolute;
    bottom: -150px;
    width: 60px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.7;
    animation: floatUp var(--speed) linear infinite;
}

@keyframes floatUp {
    to { transform: translateY(-120vh) translateX(var(--drift)); }
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    animation: twinkle var(--speed) ease-in-out infinite alternate;
}

@keyframes twinkle {
    to { opacity: 0.1; }
}

/* Comprehensive Responsiveness */
@media (max-width: 768px) {
    /* Loader Responsive */
    .princess-text {
        font-size: 2.5rem;
    }
    
    .wait-text {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    
    .progress-bar {
        width: 80%;
        max-width: 250px;
    }

    /* Intro Slideshow Text Scaling */
    .reveal-text {
        font-size: 2.8rem;
    }
    
    .reveal-text.delayed {
        font-size: 4rem;
    }

    /* Hero Section Responsive */
    .hero-section {
        padding: 20px;
    }

    .glass-container {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
    }

    .main-title {
        font-size: 2.8rem;
        word-break: break-word;
    }

    .sub-greeting {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .message {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* CTA Buttons Responsive */
    .cta-group {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    /* Modals Responsive */
    .modal-content {
        padding: 2rem 1.5rem;
        width: 90%;
        margin: auto;
    }

    .gallery-title {
        font-size: 2.2rem;
    }

    .polaroid-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    /* Letter/Envelope Responsive */
    .letter {
        padding: 15px;
        font-size: 0.85rem;
    }

    .envelope-wrapper {
        width: 100%;
        max-width: 220px;
        height: 160px;
    }
    
    .envelope {
        width: 100%;
        height: 100%;
    }

    .music-player-glass {
        bottom: 20px;
        right: 20px;
    }

    .music-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .reveal-text {
        font-size: 2.2rem;
    }
    
    .reveal-text.delayed {
        font-size: 3rem;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .princess-text {
        font-size: 2rem;
    }
    
    .polaroid-grid {
        grid-template-columns: 1fr;
    }
}

/* Special Wall Specific Styling */
.special-wall-content {
    max-width: 800px;
    width: 90% !important;
}

.special-wall-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.special-wall-item {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatingPulse 3s ease-in-out infinite;
    position: relative;
    border: 3px solid #f7cac9;
}

@keyframes floatingPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.special-wall-item:hover {
    transform: scale(1.2) translateY(-15px);
    box-shadow: 0 15px 30px rgba(255, 77, 109, 0.4);
}

.special-wall-item.revealed {
    width: 100%;
    height: auto;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #fff 0%, #f7cac9 100%);
    color: #4b0082;
    cursor: default;
    font-weight: 600;
    font-family: var(--font-body);
    animation: revealPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

@keyframes revealPop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.helper-text {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Flowers Bloom Specific Styling */
.flowers-bloom-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
}

.flower-particle {
    position: absolute;
    pointer-events: none;
    font-size: 2.5rem;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

@keyframes bloomRain {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(0) rotate(20deg) scale(1);
    }
    100% {
        transform: translateY(110vh) rotate(720deg) scale(1.2);
        opacity: 0;
    }
}

/* Back Button & Generic Hidden Class */
.hidden {
    display: none !important;
}

.back-btn {
    margin: 1rem auto 2rem !important;
    display: block !important;
    width: fit-content;
    font-size: 0.9rem;
    padding: 8px 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: scale(1.05) translateX(-5px);
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* 3D Cake Modal & Interactive Elements */
.cake-modal-content {
    max-width: 600px !important;
    padding: 3rem 1rem !important;
    overflow: visible !important;
}

.cake-wish-text {
    font-family: 'Great Vibes', cursive;
    font-size: 2.8rem;
    color: var(--accent-color);
    margin-top: 50px;
    min-height: 4rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease;
}

.cake-wish-text.show {
    opacity: 1;
    transform: translateY(0);
}

.candles-container {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.css-candle {
    width: 14px;
    height: 50px;
    background: linear-gradient(to right, #ffd700, #ff8c00, #ffd700);
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.css-flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 26px;
    background: radial-gradient(circle at 50% 100%, #fff, #ffde00 40%, #ff8c00 70%, #d35400 100%);
    border-radius: 50% 50% 20% 20%;
    animation: flicker 0.2s infinite alternate;
    box-shadow: 0 0 20px #ffde00, 0 0 40px #ff8c00;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.css-flame:hover {
    transform: translateX(-50%) scale(1.2);
}

.css-flame.blown {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0);
}

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

/* Smoke effect for blown candle */
.smoke {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: riseSmoke 2s ease-out forwards;
}

@keyframes riseSmoke {
    0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.6; }
    100% { transform: translateX(-50%) translateY(-100px) scale(3); opacity: 0; filter: blur(5px); }
}


/* Wishing Well Specific Styling */
.wishing-well-content {
    max-width: 600px !important;
    padding: 3rem 1.5rem !important;
    background: rgba(10, 10, 30, 0.4) !important;
    overflow: visible !important;
}

.well-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 40px auto;
    perspective: 1000px;
}

.water-pool {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #00d2ff 0%, #3a7bd5 50%, #004e92 100%);
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 30px rgba(0, 210, 255, 0.4),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    cursor: crosshair;
}

.water-pool::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.ripple {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleEffect 2s linear forwards;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
        border-width: 0.1px;
    }
}

.coin-wrapper {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: grab;
    transition: transform 0.1s;
}

.coin-wrapper:active {
    cursor: grabbing;
}

.gold-coin {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), inset 0 0 10px rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.3);
    animation: floatingCoin 3s ease-in-out infinite, shineCoin 3s infinite;
}

@keyframes floatingCoin {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(180deg); }
}

@keyframes shineCoin {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.gold-coin.tossing {
    animation: tossCoinAnim 1s cubic-bezier(0.5, -0.5, 0.5, 1.5) forwards;
}

@keyframes tossCoinAnim {
    0% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0.2) translateY(200px); opacity: 0; }
}

.well-message-text {
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-top: 30px;
    min-height: 3rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s ease;
}

.well-message-text.show {
    opacity: 1;
    transform: translateY(0);
}
/* Magic Slider Styling */
.magic-slider-wrapper {
    margin-top: 4rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.3); /* Golden border */
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255, 215, 0, 0.1);
    position: relative;
    z-index: 100;
}

.slider-label {
    display: block;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.magic-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.magic-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, var(--accent-color), #ff8c00);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-color);
    transition: transform 0.2s;
}

.magic-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Surprise Overlay Content */
.surprise-reveal-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    text-align: center;
    width: 100%;
    padding: 20px;
    pointer-events: none;
}

.surprise-reveal-text h1 {
    font-family: var(--font-heading);
    font-size: 6rem; /* Bigger */
    color: white;
    margin: 0;
    line-height: 1.1;
    opacity: 0;
    transform: scale(0.3);
    filter: blur(20px);
    transition: all 1.8s cubic-bezier(0.19, 1, 0.22, 1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.surprise-reveal-text.revealed h1 {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.surprise-reveal-text .highlight-name {
    font-size: 10rem; /* Mega Highlighting */
    background: linear-gradient(to bottom, #fff700, #ff8c00, #ff4500);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    font-weight: 900;
    letter-spacing: 5px;
    filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.6));
    animation: megaGlow 2s ease-in-out infinite alternate;
}

@keyframes megaGlow {
    from { 
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(255, 140, 0, 0.3));
        letter-spacing: 5px;
    }
    to { 
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 80px rgba(255, 69, 0, 0.6));
        letter-spacing: 8px;
    }
}

.surprise-reveal-text p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s ease 0.8s;
}

.surprise-reveal-text.revealed p {
    opacity: 1;
    transform: translateY(0);
}

.surprise-reveal-text .btn {
    pointer-events: all;
    margin-top: 3rem;
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1.5s;
}
.launch-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 10005;
    pointer-events: all;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.launch-btn.hidden {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.surprise-reveal-text.revealed .btn {
    transform: scale(1);
}

.hidden {
    display: none !important;
}

/* Sorry Button Style */
.sorry-btn {
    background: rgba(255, 182, 193, 0.2);
    border: 1px solid rgba(255, 182, 193, 0.4);
    color: #ffb6c1;
}

.sorry-btn:hover {
    background: rgba(255, 182, 193, 0.4);
    box-shadow: 0 0 20px rgba(255, 182, 193, 0.3);
}

/* Sorry Card Modal */
.sorry-card {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #333;
    max-width: 550px; /* Slightly wider for longer text */
    padding: 2.5rem;
    text-align: left; /* Left align for the letter look */
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.sorry-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-align: center;
    animation: heartbeat 1.5s infinite;
}

.sorry-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #d63384;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Vertical Layout (Classic Scroll) */
.timeline-container {
    display: flex;
    flex-direction: column; /* Back to vertical */
    gap: 20px;
    padding: 20px 0;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 10px;
}

.milestone-card, .unforgettable-milestone, .funny-milestone {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
}

.milestone-card.show, .unforgettable-milestone.show, .funny-milestone.show {
    opacity: 1;
    transform: translateY(0);
}

.sorry-message-area {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(214, 51, 132, 0.3) transparent;
}

.letter-page {
    font-size: 1.15rem;
    line-height: 1.8;
    font-style: italic;
    color: #444;
    margin-bottom: 1.5rem;
}

.letter-page p {
    margin-bottom: 0.8rem;
}

.sorry-footer {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #d63384;
    margin-top: 2rem;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.milestone-card:hover, .unforgettable-milestone:hover, .funny-milestone:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.milestone-date {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.milestone-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

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



/* Cake Ceremony Cinematic Styling */
.cake-modal {
    background: rgba(0, 0, 0, 0.98) !important;
    transition: background 1.5s ease;
}

.cake-modal.active {
    background: radial-gradient(circle, rgba(60, 20, 20, 0.9) 0%, rgba(0,0,0,1) 100%) !important;
}

.cake-modal.blown {
    background: rgba(0, 0, 0, 0.9) !important;
}

.cake-ceremony-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    width: 95%;
    max-width: 700px;
    padding: 4rem 2rem;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.cake-canvas {
    perspective: 1500px;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cake-3d {
    position: relative;
    width: 350px;
    height: 350px;
    transform-style: preserve-3d;
    transform: rotateX(10deg);
    transition: transform 1s ease;
}

.cake-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.8));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cake-overlay-top {
    position: absolute;
    top: 20%;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 30;
}

.candles-container {
    width: 80%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
}

.candle {
    position: relative;
    width: 20px;
    height: 60px;
    transition: transform 0.5s ease;
    animation: floatCandle 3s infinite alternate ease-in-out;
    animation-delay: calc(var(--i) * 0.2s);
}

@keyframes floatCandle {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


.candle-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 22px;
    background: radial-gradient(circle at 50% 100%, #fff, #ffd700 40%, #ff4500 80%, transparent);
    border-radius: 50% 50% 20% 20%;
    animation: flicker 0.15s infinite alternate, flameGlow 2s infinite alternate;
    box-shadow: 0 0 20px #ff4500, 0 0 40px rgba(255, 69, 0, 0.4);
}

@keyframes flameGlow {
    from { box-shadow: 0 0 20px #ff4500; }
    to { box-shadow: 0 0 40px #ff4500, 0 0 60px rgba(255, 69, 0, 0.6); }
}

.flame.out {
    animation: none;
    background: none;
    box-shadow: none;
    opacity: 0;
}

/* Smoke Effect */
.smoke-particle {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(200, 200, 200, 0.4);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

@keyframes riseSmoke {
    0% { transform: translate(-50%, 0) scale(1); opacity: 0.4; }
    100% { transform: translate(calc(-50% + var(--drift)), -100px) scale(4); opacity: 0; }
}

.ceremony-knife {
    position: absolute;
    font-size: 6rem;
    top: -150px;
    right: 50px;
    z-index: 200;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
}

.ceremony-knife.active {
    opacity: 1;
    top: 100px;
}

.ceremony-knife.cutting {
    animation: cutMotion 1.5s forwards;
}

@keyframes cutMotion {
    0% { transform: translate(0, 0) rotate(0deg); }
    30% { transform: translate(-180px, 120px) rotate(-45deg); }
    60% { transform: translate(-200px, 160px) rotate(-60deg); }
    100% { transform: translate(-220px, 200px) rotate(-45deg); opacity: 0; }
}

.cake-slice-reveal {
    position: absolute;
    width: 200px;
    z-index: 100;
    opacity: 0;
    transform: translate(0, 0) scale(0);
    transition: all 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 30px 50px rgba(0,0,0,0.6));
}

.cake-slice-reveal.show {
    opacity: 1;
    transform: translate(200px, 100px) rotate(20deg) scale(1.2);
    animation: floatSlice 3s infinite alternate ease-in-out 1.5s;
}

@keyframes floatSlice {
    from { transform: translate(200px, 100px) rotate(20deg) scale(1.2); }
    to { transform: translate(200px, 80px) rotate(25deg) scale(1.25); }
}

.ceremony-controls {
    margin-top: 3rem;
    text-align: center;
    z-index: 100;
}

.ceremony-controls h2 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    font-family: var(--font-heading);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .cake-3d { width: 250px; height: 250px; }
    .ceremony-controls h2 { font-size: 1.8rem; }
    .cake-slice-reveal.show { transform: translate(80px, 50px) rotate(15deg) scale(1); }
}




/* Chinnari Vault Story Styles */
.story-modal {
    background: #000 !important;
}

.story-container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    margin: 0 auto;
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.story-progress {
    position: absolute;
    top: 15px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 100;
}

.progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    transition: width linear;
}

.progress-fill.active {
    width: 100%;
}

.progress-fill.completed {
    width: 100% !important;
    transition: none !important;
}

.story-header {
    position: absolute;
    top: 30px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.story-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
}

.story-username {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.story-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-left: 5px;
}

.story-close {
    color: #fff !important;
    font-size: 2.5rem !important;
    position: static !important;
    line-height: 1 !important;
    opacity: 0.8;
}

.story-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.story-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keeps entire picture visible */
    opacity: 0;
    transition: opacity 0.3s ease;
    background: #000;
}

.story-img.active {
    opacity: 1;
}

.story-nav-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 50;
}

.story-nav-area {
    flex: 1;
    cursor: pointer;
}

/* Vault Lock Overlay */
.vault-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.5s ease;
}

.vault-lock-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

.vault-lock-content {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    max-width: 320px;
    width: 100%;
}

.vault-lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

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

.vault-title {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.vault-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: #fff;
    text-align: center;
    margin-bottom: 1rem;
}

.vault-error {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Final Message Styles */
.final-btn { background: linear-gradient(135deg, #ff4d6d, #c9184a) !important; color: white !important; border: 2px solid rgba(255, 255, 255, 0.4) !important; animation: heartPulse 2s infinite; box-shadow: 0 0 20px rgba(255, 77, 109, 0.5); }
@keyframes heartPulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.final-card { background: #fff !important; color: #333; text-align: center; padding: 3.5rem 2rem; border-radius: 30px; box-shadow: 0 15px 50px rgba(0,0,0,0.5); max-width: 500px; }
.sparkle-icon-final { font-size: 4rem; margin-bottom: 1.5rem; animation: sparkleSlow 3s infinite alternate; }
@keyframes sparkleSlow { from { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 5px #ff4d6d); } to { transform: scale(1.2) rotate(15deg); filter: drop-shadow(0 0 15px #ff4d6d); } }
.always-happy-text { font-family: Playfair Display, serif; font-size: 3.5rem; background: linear-gradient(to bottom, #ff4d6d, #c9184a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; letter-spacing: -1px; }
.final-subtext { font-family: Dancing Script, cursive; font-size: 1.5rem; color: #666; margin-top: 1rem; }
