:root {
    --primary-pink: #ff75a0;
    --secondary-pink: #ffacc5;
    --accent-gold: #ffd700;
    --soft-white: #fff5f8;
    --dark-pink: #d4418e;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: #4a4a4a;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2 {
    font-family: 'Dancing Script', cursive;
}

/* Background Animations */
#bg-animation-container, #confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-heart {
    position: absolute;
    color: var(--primary-pink);
    font-size: 20px;
    animation: floatUp 6s linear infinite;
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(255,117,160,0.5));
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 4s ease-in infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(-10vh) scale(1.5) rotate(360deg); opacity: 0; }
}

@keyframes confettiFall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--dark-pink);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #7a5c65;
}

.btn-glow {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: var(--primary-pink);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--primary-pink);
    font-family: 'Poppins', sans-serif;
}

.btn-glow:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--primary-pink), 0 0 10px var(--accent-gold);
    background: var(--dark-pink);
}

/* Main Content Transitions */
.hidden {
    display: none !important;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: slideUp 1s ease-out;
}

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

/* Message Section */
#message-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

#typing-text {
    font-size: 1.8rem;
    line-height: 1.6;
    min-height: 100px;
}

.heart-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: pulse 1.5s infinite;
}

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

.scroll-indicator {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #888;
    animation: bounce 2s infinite;
}

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

/* Photo Gallery */
#gallery-section {
    padding: 80px 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

#gallery-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    color: var(--dark-pink);
    margin-bottom: 3rem;
    animation: glowText 3s ease-in-out infinite alternate;
}

@keyframes glowText {
    from { text-shadow: 0 0 10px #fff, 0 0 20px var(--primary-pink); }
    to { text-shadow: 0 0 20px #fff, 0 0 30px var(--dark-pink); }
}


.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    aspect-ratio: 3/4;
    min-height: 250px; /* Ensures container is visible on mobile */
    background-color: #fce4ec; /* Light pink background while loading */
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.photo-container:hover {
    transform: translateY(-10px) rotate(3deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.photo-container:hover img {
    transform: scale(1.1) rotate(-3deg);
}

.photo-container:hover .photo-overlay {
    opacity: 1;
}

/* Cake Emoji Animation */
.cake-emoji-container {
    position: relative;
    display: inline-block;
    font-size: 80px;
    margin: 0 auto 20px auto;
    text-align: center;
    width: 100%;
}

.cake-emoji {
    display: block;
    animation: cakeBounce 2s ease-in-out infinite;
}

.emoji-flame {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 18px;
    background: orange;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 10px orange, 0 0 20px yellow;
    animation: emojiFlameFlicker 0.1s infinite alternate;
    z-index: 10;
}

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

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

/* Cake Animation */
.cake-container {

    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cake {
    position: relative;
    width: 120px;
    height: 100px;
}

.plate {
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 140px;
    height: 15px;
    background: #e0e0e0;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.layer {
    position: absolute;
    width: 120px;
    border-radius: 10px 10px 0 0;
}

.layer-bottom {
    bottom: 0;
    height: 40px;
    background: #ff8fa3;
}

.layer-middle {
    bottom: 40px;
    height: 30px;
    background: #ffb3c1;
}

.layer-top {
    bottom: 70px;
    height: 30px;
    background: #ffc2d1;
}

.icing {
    position: absolute;
    top: 70px;
    left: 0;
    width: 120px;
    height: 15px;
    background: #fff;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 0 #f0f0f0;
}

.candle {
    position: absolute;
    top: 40px;
    left: 55px;
    width: 10px;
    height: 30px;
    background: var(--accent-gold);
    border-radius: 5px;
    z-index: 2;
}

.flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 18px;
    background: orange;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 10px orange, 0 0 20px yellow;
    animation: flicker 0.1s infinite alternate;
}

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

/* Lightbox Styling */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(8px);
}

.lightbox.visible {
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(255, 117, 160, 0.5);
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.visible img {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.close-btn:hover {
    color: var(--primary-pink);
    transform: rotate(90deg) scale(1.2);
}

/* Final Wish Section */
#final-wish {


    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.final-card {
    background: linear-gradient(135deg, rgba(255,117,160,0.3), rgba(255,172,197,0.3));
    border: 2px solid var(--primary-pink);
}

.final-card h2 {
    font-size: 2.5rem;
    color: var(--dark-pink);
    margin-bottom: 1rem;
}

.final-card p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
}

/* Animations for Entry */
.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.5s;
}

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

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .photo-grid {
        grid-template-columns: 1fr;
    }
}
