:root {
    --primary-color: #5D5C61;
    --secondary-color: #B1A296;
    /* Rose Gold/Champagne tone */
    /* Rose Gold/Champagne tone */
    /* Rose Gold/Champagne tone */
    --accent-color: #9E8D7D;
    --bg-color: #eae7de;
    /* Distinctly darker warm beige */
    /* Cream/Off-white */
    --text-color: #333;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Hero Section */
.hero {
    height: 70vh;
    /* Slightly taller for impact */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Soft, elegant gradient matching the new bg */
    background: linear-gradient(135deg, #eae7de 0%, #fdfbf7 100%);
    margin-bottom: 3rem;
    position: relative;
}

/* Subtle border/frame effect inside hero */
.hero::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid rgba(177, 162, 150, 0.3);
    /* Very subtle rose gold border */
    pointer-events: none;
}

.hero-content {
    z-index: 2;
    animation: simpleFadeIn 2s ease-out;
    /* Slow, elegant entry */
}

.hero-content h1 {
    font-family: 'Great Vibes', cursive;
    /* Calligraphy font */
    font-size: 5.5rem;
    /* Large and expressive */
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 0px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.hero-content .date {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 6px;
    /* Wide spacing for elegance */
    margin-top: 1rem;
    font-weight: 300;
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-box span:first-child {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.time-box .label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.hero-content .scroll-ind {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--accent-color);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    animation: gentleBounce 2.5s infinite;
}

/* Animations */
@keyframes simpleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Gallery Grid */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 100vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1;
    /* Make items square mostly */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    /* Start hidden for fade-in */
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.gallery-item img.loaded {
    opacity: 1;
    /* Fade in when loaded */
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-size: 1.2rem;
    font-family: var(--font-heading);
    border: 1px solid var(--white);
    padding: 0.5rem 1rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--white);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.slideshow-btn {
    position: absolute;
    top: 30px;
    /* Top positioning */
    left: 50%;
    /* Center horizontally */
    transform: translateX(-50%);

    /* Glassmorphism effect (matching download-btn) */
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--primary-color);

    padding: 12px 30px;
    /* Similar padding to download btn */
    width: auto;
    height: auto;
    border-radius: 50px;
    /* Pill shape */

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;

    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    /* Match download btn text style */
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.slideshow-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateX(-50%) translateY(3px) scale(1.05);
    /* Slight move down on hover */
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    border-color: var(--secondary-color);
}

.slideshow-btn.playing {
    background-color: var(--primary-color);
    /* Darker background for better contrast */
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.download-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    /* Glassmorphism effect */
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--primary-color);
    padding: 14px 35px;
    /* Larger click area */
    text-decoration: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    z-index: 1002;
}

.download-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    /* Gold glow */
    border-color: var(--secondary-color);
}

.download-btn svg {
    transition: transform 0.3s ease;
}

.download-btn:hover svg {
    transform: translateY(2px);
    /* Icon specific animation */
}

.download-btn:active {
    transform: translateX(-50%) scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    padding: 0 20px;
    transition: color 0.3s ease;
}

.nav-btn:hover {
    color: var(--secondary-color);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* Music Button */
.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1003;
    /* Above lightbox download button if needed */
    transition: transform 0.3s ease, background 0.3s ease;
    animation: pulse-music 2s infinite;
}

.music-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}

.music-btn.playing {
    animation: none;
    /* Stop pulsing when playing */
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

@keyframes pulse-music {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(177, 162, 150, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(177, 162, 150, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(177, 162, 150, 0);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        /* Smaller to fit on one line */
        white-space: nowrap;
    }

    .splash-title {
        font-size: 2.5rem;
        /* Smaller to fit on one line */
        white-space: nowrap;
    }

    .countdown {
        gap: 1rem;
    }

    .time-box span:first-child {
        font-size: 1.8rem;
    }

    .time-box .label {
        font-size: 0.7rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0 10px;
        font-size: 2rem;
    }

    /* Mobile Lightbox Fixes */
    .gallery-overlay {
        display: none;
    }

    .lightbox {
        flex-direction: column;
        justify-content: flex-end;
        /* Align to bottom to keep button accessible */
        padding-bottom: 30px;
        padding-top: 60px;
        /* Space for top close button */
    }

    .lightbox-img {
        max-height: 65vh;
        /* Reduced slightly from 75vh */
        max-width: 100%;
        width: auto;
        margin-bottom: 15px;
        /* Minimal gap */
        border: none;
        box-shadow: none;
        /* remove heavy shadow on mobile for cleaner look */
    }

    .download-btn {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 80%;
        /* Wider button for easier tapping */
        max-width: 300px;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1rem;
        background: var(--white);
        color: var(--primary-color);
        border: 1px solid #eee;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        margin: 0 auto;
        /* Center button */
    }

    .download-btn:hover,
    .download-btn:active {
        transform: scale(0.98);
        background: #f9f9f9;
        color: var(--primary-color);
        box-shadow: none;
    }

    .close-btn {
        top: 20px;
        /* safe area */
        right: 20px;
        background: rgba(255, 255, 255, 0.8);
        color: #333;
        width: 44px;
        /* Larger touch target */
        height: 44px;
        font-size: 2rem;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding-bottom: 4px;
    }

    .slideshow-btn {
        position: relative;
        /* In flow, like download button */
        top: auto;
        left: auto;
        right: auto;
        transform: none;

        width: 80%;
        /* Match download button width */
        max-width: 300px;
        padding: 10px 20px;
        background-color: var(--white);
        /* Solid background like download button */
        color: var(--primary-color);
        border: 1px solid #eee;

        margin: 0 auto 15px auto;
        /* Center and add gap below */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .slideshow-btn:hover,
    .slideshow-btn:active {
        background: #f9f9f9;
        transform: scale(0.98);
        box-shadow: none;
    }

    .slideshow-btn.playing {
        background-color: var(--primary-color) !important;
        color: var(--white) !important;
        border-color: var(--primary-color);
    }


    .slideshow-btn .slide-text {
        font-size: 0.9rem;
    }
}

/* Splash Screen - Curtain Effect */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    /* Let clicks pass through after animation */
}

.curtain-left,
.curtain-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50.5%;
    /* Slight overlap to prevent gap lines */
    background-color: var(--bg-color);
    /* Same as body bg */
    z-index: 10000;
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.curtain-left {
    left: 0;
    transform-origin: left;
}

.curtain-right {
    right: 0;
    transform-origin: right;
}

/* Class to trigger opening */
#splash-screen.open .curtain-left {
    transform: translateX(-100%);
}

#splash-screen.open .curtain-right {
    transform: translateX(100%);
}

.splash-content {
    position: relative;
    z-index: 10001;
    text-align: center;
    transition: opacity 0.5s ease;
}

#splash-screen.open .splash-content {
    opacity: 0;
}

.splash-title {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.splash-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary-color);
    letter-spacing: 3px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Hearts */
.heart-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    /* Behind everything */
}

.heart {
    position: absolute;
    bottom: -20px;
    background-color: var(--secondary-color);
    /* Or accent color */
    display: inline-block;
    height: 10px;
    width: 10px;
    margin: 0;
    transform: rotate(-45deg);
    opacity: 0;
    animation: floatUp 10s linear infinite;
}

.heart::before,
.heart::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: inherit;
    border-radius: 50%;
}

.heart::before {
    top: -5px;
    left: 0;
}

.heart::after {
    left: 5px;
    top: 0;
}

@keyframes floatUp {
    0% {
        bottom: -20px;
        opacity: 0;
        transform: translateX(0) rotate(-45deg) scale(0.5);
    }

    10% {
        opacity: 0.6;
    }

    50% {
        transform: translateX(15px) rotate(-45deg) scale(1);
    }

    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(-15px) rotate(-45deg) scale(0.8);
    }
}