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

:root {
    --primary: #2C3E50;
    --secondary: #95A5A6;
    --accent: #ECF0F1;
    --gold: #D4AF37;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--primary);
    background: white;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: linear-gradient(135deg, var(--primary) 0%, #34495E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    overflow: hidden;
}

.cover.opened {
    transform: translateY(-100%);
}

.cover-content {
    text-align: center;
    color: white;
    padding: 20px;
    width: 100%;
    max-width: 500px;
}

.cover-line {
    width: 100px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 30px;
}

.cover-names {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 20px;
}

.cover-date {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 40px;
    color: var(--gold);
}

.btn-open {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 15px 50px;
    font-size: 1rem;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
    font-family: 'Lato', sans-serif;
}

.btn-open:hover {
    background: var(--gold);
    color: var(--primary);
}

nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 30px;
    transition: all 0.5s ease;
    width: max-content;
    max-width: 90vw;
}

nav.visible {
    display: flex;
}

nav a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

nav a:hover {
    color: var(--gold);
    transform: translateY(-5px);
    background: rgba(44, 62, 80, 0.1);
}

nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.4);
}

.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s;
    display: none;
}

.music-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.music-btn.playing {
    background: var(--gold);
}

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

.container {
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gold);
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #34495E 100%);
    color: white;
}

.hero-content {
    text-align: center;
}

.hero-initials {
    font-family: 'Playfair Display', serif;
    font-size: 8rem;
    font-weight: 700;
    color: var(--gold);
    opacity: 0.3;
    margin-bottom: -40px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero-date {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--gold);
}

.couple {
    background: var(--accent);
}

.couple-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 60px;
    align-items: center;
}

.couple-item {
    text-align: center;
}

.couple-initial {
    width: 120px;
    height: 120px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--gold);
    margin: 0 auto 30px;
}

.couple-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.couple-item p {
    line-height: 1.8;
    color: var(--secondary);
}

.couple-divider {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--gold);
}

.event {
    background: white;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.countdown-box {
    text-align: center;
}

.countdown-box span {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.countdown-box label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
}

.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.event-card {
    background: var(--accent);
    padding: 40px;
    border-left: 3px solid var(--gold);
}

.event-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 30px;
}

.event-info p {
    margin: 15px 0;
    text-align: left;
}

.event-info i {
    color: var(--gold);
    margin-right: 10px;
    width: 20px;
}

.location {
    background: var(--accent);
}

.location-box {
    background: white;
    padding: 60px;
    border: 2px solid var(--gold);
    max-width: 600px;
    margin: 0 auto;
}

.location-box i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.location-box p {
    line-height: 1.8;
    margin-bottom: 30px;
}

.btn-map {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-map:hover {
    background: var(--gold);
    color: var(--primary);
}

.gallery {
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: var(--accent);
    transition: transform 0.3s;
}

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

footer {
    background: var(--primary);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.quote {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 20px;
    color: var(--gold);
}

.footer-text {
    margin-bottom: 30px;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .cover-names {
        font-size: 2.5rem;
    }

    .hero-initials {
        font-size: 5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .couple-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .couple-divider {
        transform: rotate(90deg);
    }

    .countdown {
        gap: 15px;
    }

    .countdown-box span {
        font-size: 2rem;
    }

    nav {
        gap: 15px;
        padding: 12px 20px;
    }

    nav a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* RSVP Section */
.rsvp {
    padding: 80px 20px;
    background: var(--accent);
}

.rsvp-subtitle {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:has(.form-group:nth-child(2)) {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    .form-row:has(.form-group:nth-child(2)) {
        grid-template-columns: 1fr;
    }

    .rsvp-form {
        padding: 25px;
    }
}

/* RSVP List */
.rsvp-list {
    margin-top: 60px;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.rsvp-list-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.rsvp-list-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gold);
}

.rsvp-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.rsvp-items::-webkit-scrollbar {
    width: 6px;
}

.rsvp-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.rsvp-items::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.rsvp-item {
    background: var(--accent);
    padding: 20px;
    border-left: 3px solid var(--gold);
    transition: all 0.3s ease;
}

.rsvp-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.rsvp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.rsvp-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary);
}

.rsvp-time {
    font-size: 0.85rem;
    color: var(--secondary);
}

.rsvp-message {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.guest-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 20px 0;
    color: var(--gold);
    letter-spacing: 2px;
}

.guest-name strong {
    font-size: 1.8rem;
    display: block;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .rsvp-list {
        padding: 25px;
    }

    .rsvp-list-title {
        font-size: 1.5rem;
    }

    .rsvp-items {
        max-height: 400px;
    }
}

/* Mobile Optimization for Cover */
@media (max-width: 768px) {
    .cover-names {
        font-size: 3rem;
    }

    .cover-date {
        font-size: 1rem;
    }

    .btn-open {
        padding: 12px 40px;
        font-size: 0.9rem;
    }

    .guest-name {
        font-size: 1.1rem;
    }

    .guest-name strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cover-content {
        padding: 15px;
    }

    .cover-names {
        font-size: 2.5rem;
    }

    .cover-date {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .btn-open {
        padding: 10px 30px;
        font-size: 0.85rem;
    }
}
