
:root {
    --gold: #d4af37;
    --black: #121212;
    --burgundy: #800020;
    --cream: #f5f5f5;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--black), #2a2a2a);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    color: var(--black);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    color: var(--burgundy);
    margin-bottom: 10px;
}

.subtitle {
    font-style: italic;
    color: var(--gold);
    margin-bottom: 30px;
}

.envelope {
    perspective: 1000px;
    max-width: 800px;
    width: 100%;
}

.card {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 90vh;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

.card-front, .card-back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    background: var(--cream);
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow);
}

.card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.card-back {
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

.card-back header p {
    line-height: 1.6;
    margin-bottom: 1em;
    /* font-size: 0.95rem; */
}

.card-back header p:last-of-type {
    margin-bottom: 0; 
}

.section-title {
    margin-bottom: 20px;
    text-align: center;
    color: var(--burgundy);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
}

.section-icon {
    vertical-align: middle;
    flex-shrink: 0;
}

.detail-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.detail-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.detail-section h2 {
    color: var(--gold);
    margin-bottom: 10px;
}

.card-front {
    transform: rotateY(0deg);
    text-align: center;
    justify-content: center;
    align-items: center;
}

.card-back {
    transform: rotateY(180deg);
}

.flip-button {
    padding: 15px 30px;
    background: var(--burgundy);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    margin-top: 20px;
    transition: background 0.3s;
}

.flip-button:hover {
    background: var(--gold);
}

.card.flipped {
    transform: rotateY(180deg);
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.6;
    pointer-events: none;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern.svg');
    opacity: 0.05;
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: url('../images/border.svg') repeat-x;
    background-size: contain;
}

header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.details {
    padding: 30px 0;
}

.detail-section:not(.schedule) {
    text-align: center;
}

.detail-section .location {
    margin-bottom: 20px;
}

.location, .countdown-started {
    font-style: italic;
}

/* .schedule {
    max-width: 500px;
    margin: 0 auto;
} */

.schedule h3 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--burgundy);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-icon {
    vertical-align: middle;
}

.timeline {
    list-style: none;
}

.timeline li {
    padding: 15px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.timeline span {
    font-weight: bold;
    color: var(--burgundy);
}

.mystery {
    text-align: center;
    margin-top: 20px;
    font-style: italic;
    color: var(--gold);
}

.mystery:after {
    content: '?';
    display: inline-block;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

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

.rsvp {
    background: rgba(212, 175, 55, 0.1);
    padding: 40px;
    border-radius: 8px;
    margin: 30px auto;
    max-width: 90%;
    width: 600px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rsvp h3 {
    text-align: center;
    margin-bottom: 20px;
}

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

.rsvp label {
    display: block;
    margin-bottom: 8px;
    color: var(--burgundy);
}

.rsvp input, .rsvp select, .rsvp textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
}

.rsvp textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.rsvp button {
    width: 100%;
    padding: 12px;
    background: var(--burgundy);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.rsvp button:hover {
    background: var(--gold);
}

.rsvp.confirmed {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

footer {
    text-align: center;
    padding-top: 20px;
    font-style: italic;
}

@media (max-width: 768px) {
    .card {
        padding: 25px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .detail-section h2 {
        font-size: 1.5rem;
    }
    
    .rsvp {
        padding: 20px;
    }
}

.countdown-section, .map-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.countdown-section h3, .map-section h3 {
    color: var(--burgundy);
    margin-bottom: 15px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
    padding: 15px;
    background: var(--cream);
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

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

.countdown-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--burgundy);
    display: block;
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    .envelope {
        margin: 10px;
    }
    .countdown-number {
        font-size: 1.5rem;
    }
    .countdown-container {
        gap: 15px;
        padding: 10px;
    }
    .countdown-item {
        min-width: 70px;
    }
    #event-map {
        height: 200px;
    }
    .map-section {
        padding: 15px;
        margin: 10px 0;
    }
    .card {
        padding: 15px;
    }
    h1 {
        font-size: 1.5rem;
    }
    .subtitle {
        font-size: 0.9rem;
    }
    .envelope {
        padding: 10px;
    }
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--gold);
}

#event-map {
    height: 250px;
    width: 100%;
    border-radius: 4px;
    margin-top: 20px;
}

:focus-visible { 
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 2px;
}

.checkbox-group input[type="checkbox"]:focus-visible + label {
    box-shadow: 0 0 0 3px var(--gold);
}
