:root {
    --primary-color: #d4a373;
    --text-color: #2c3e50;
    --bg-overlay: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: white;
    min-height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/wedding-bg.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    z-index: 0;
}

.container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 900px;
    width: 100%;
    animation: fadeIn 1.5s ease-out;
}

.hero {
    margin-bottom: 3rem;
}

.wedding-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: 0.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.names {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.time {
    font-weight: 200;
    letter-spacing: 4px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    border-radius: 15px;
    padding: 2rem;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-10px);
}

.number {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
}

.label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 300;
    opacity: 0.8;
}

.footer {
    margin-top: 2rem;
    font-weight: 300;
    font-style: italic;
    opacity: 0.9;
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.calendar-link {
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        /* On mobile, sometimes central alignment hides content if it overflows */
        align-items: flex-start;
        padding: 4rem 1rem;
    }

    .container {
        padding: 1rem;
    }

    .wedding-title {
        font-size: 3rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .names {
        font-size: 1.6rem;
    }

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

    .countdown-container {
        gap: 0.8rem;
        margin-bottom: 2rem;
    }

    .countdown-item {
        min-width: calc(50% - 0.4rem);
        /* 2 per row on smaller screens */
        padding: 1.2rem;
    }

    .number {
        font-size: 2.2rem;
    }

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

/* Extra small devices optimization */
@media (max-width: 380px) {
    .wedding-title {
        font-size: 2.5rem;
    }

    .countdown-item {
        padding: 1rem;
    }

    .number {
        font-size: 2rem;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    body {
        align-items: center;
        padding: 2rem 0;
    }
}