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

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background: #f8f8f8;
    overflow-x: hidden;
}


/* Open Invitation Overlay */

.invitation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: all 0.8s ease-in-out;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('./img/Day 1/Look 1/GIE_2025.jpg');
    background-size: cover;
    background-position: center;
    /* start hidden below */
    /* transform: translateY(100%);
    transition: transform 0.8s ease-in-out; */
}


/* .invitation-overlay.active {
    transform: translateY(0);
} */

.invitation-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

.invitation-card {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    transform: translateY(0);
    animation: float 3s ease-in-out infinite;
}

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

.invitation-card h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 300;
}

.invitation-card p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.8;
}

.open-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.open-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}


/* Main Content */

.main-content {
    opacity: 0;
    transition: opacity 0.8s ease-in-out 0.3s;
}

.main-content.visible {
    opacity: 1;
}


/* Hero Section */

.hero {
    height: 100vh;
    /* background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23f0f0f0" width="1200" height="800"/><text x="50%" y="50%" text-anchor="middle" fill="%23ccc" font-size="24" font-family="serif">Beautiful Wedding Photo</text></svg>'); */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('./img/Day 1/Look 1/GIE_2025.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4em;
    margin-bottom: 20px;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}


/* Section Styles */

.section {
    padding: 80px 20px;
    /* max-width: 1200px; */
    margin: 0 auto;
}

.section h2 {
    font-size: 3em;
    text-align: center;
    margin-bottom: 50px;
    color: #667eea;
    font-weight: 300;
}


/* Countdown */

.countdown {
    position: relative;
    display: inline-block;
    /* section height follows image */
    width: 100%;
    text-align: center;
    color: white;
}

.countdown-img {
    display: block;
    width: 100%;
    height: auto;
    /* responsive */
}

.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* tint */
}

.countdown-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}


/* Countdown Section */

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    /* force one row */
    margin-top: 30px;
    text-align: center;
}

.time-unit {
    /* background: rgba(255, 255, 255, 0.1); */
    /* backdrop-filter: blur(10px); */
    padding: 20px 15px;
    border-radius: 15px;
    min-width: 70px;
    /* smaller min width */
}

.time-unit .number {
    font-size: clamp(1rem, 6vw, 3rem);
    /* auto shrink */
    font-weight: bold;
    display: block;
}

.time-unit .label {
    font-size: clamp(0.5rem, 2vw, 1rem);
    /* auto shrink */
    text-transform: uppercase;
    letter-spacing: 2px;
}


/* Bride & Groom */

.couple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 60px;
    align-items: center;
}

.person-card {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.person-card:hover {
    transform: translateY(-5px);
}

.person-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin: 0 auto 30px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #999;
    overflow: hidden;
}

.person-card h3 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 15px;
}

.person-card p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #666;
}


/* Wedding Details */

.wedding-details {
    background: #f8f8f8;
    text-align: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.detail-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.detail-card h3 {
    font-size: 1.8em;
    color: #667eea;
    margin-bottom: 20px;
}

.detail-card p {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
}


/* RSVP */

.rsvp {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    text-align: center;
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}


/* Quote */

.quote {
    background: #f8f8f8;
    text-align: center;
    font-style: italic;
}

.quote blockquote {
    font-size: 2em;
    line-height: 1.6;
    color: #667eea;
    max-width: 800px;
    margin: 0 auto;
}

.quote cite {
    display: block;
    margin-top: 30px;
    font-size: 0.8em;
    color: #999;
    font-style: normal;
}


/* Gallery */

.gallery {
    padding: 80px 0;
    overflow: hidden;
    /* hide scrollbar */
    position: relative;
    cursor: grab;
}

.gallery-container {
    display: flex;
    gap: 20px;
    animation: scroll-left 10s linear infinite;
    /* infinite auto-scroll */
}

.gallery-container:hover {
    animation-play-state: paused;
    /* pause when hovered */
}

.gallery-item {
    flex-shrink: 0;
    /* width: 300px; */
    height: 400px;
    background: #f0f0f0;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    transition: transform 0.3s ease;
}

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

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
    /* move half for duplicated items */
}


/* Responsive */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }
    .section h2 {
        font-size: 2.5em;
    }
    .couple {
        grid-template-columns: 1fr;
    }
    .countdown-timer {
        gap: 15px;
    }
    .time-unit {
        min-width: 80px;
        padding: 20px 15px;
    }
    .time-unit .number {
        font-size: 2em;
    }
    .invitation-card {
        padding: 40px 30px;
    }
    .invitation-card h1 {
        font-size: 2em;
    }
    .countdown {
        background-size: contain;
        /* fit whole image */
        background-position: center top;
        /* adjust alignment */
    }
}


/* WISH SECTION */

.wish-section {
    /* max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.wish-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.wish-list {
    list-style: none;
    padding: 0;
}

.wish-list li {
    background: #e0f7fa;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.wish-list li:hover {
    background: #b2ebf2;
    color: black;
}

.loading {
    text-align: center;
    color: #777;
}

.error {
    text-align: center;
    color: red;
}


/* WISH SECTION */

#guestNameTitle {
    white-space: pre-line;
}


/* message wish section */


/* Section wrapper with gradient */

#messages.invitation-section {
    /* margin-top: 2rem; */
    padding: 2rem 1rem;
    /* border-radius: 16px; */
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    /* ensures text is readable */
}


/* Title consistent but readable on gradient */

#messages .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: #fff;
    font-family: inherit;
}


/* Scrollable container */

#messages .messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}


/* Custom scrollbar for contrast */

#messages .messages-list::-webkit-scrollbar {
    width: 8px;
}

#messages .messages-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
}

#messages .messages-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}


/* Message cards (white so they pop on gradient) */

#messages .message-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    text-align: left;
    max-width: 500px;
    width: 100%;
    color: #333;
}


/* Message text */

#messages .message-text {
    font-style: italic;
    margin-bottom: 0.6rem;
    color: #444;
    line-height: 1.5;
}


/* Author */

#messages .message-author {
    font-weight: 600;
    color: #764ba2;
    /* echo gradient color for harmony */
    text-align: right;
    font-size: 0.9rem;
}