* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

/* Typography */
h1, h2, h3, .event-name, .attendee-name {
    font-family: 'Playfair Display', serif;
}

h1 {
    font-weight: 700;
    letter-spacing: 1px;
}

input, button, select, textarea {
    font-family: 'Lato', sans-serif;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.image-section {
    position: relative;
    overflow: hidden;
}

.image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.details-section {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.details-section h1 {
    font-size: 3rem;
    color: #8b5a3c;
    margin-bottom: 10px;
    font-weight: 300;
}

.details-section h2 {
    font-size: 2.5rem;
    color: #d4a574;
    margin-bottom: 20px;
    font-weight: 400;
}

.date {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.details {
    margin-bottom: 40px;
    line-height: 1.8;
    color: #555;
}

.details p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.rsvp-button {
    background: linear-gradient(135deg, #d4a574 0%, #8b5a3c 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(139, 90, 60, 0.3);
}

.rsvp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 60, 0.4);
}

.rsvp-button:active {
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #8b5a3c;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

#password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#password-input {
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#password-input:focus {
    outline: none;
    border-color: #d4a574;
}

.submit-button {
    background: linear-gradient(135deg, #d4a574 0%, #8b5a3c 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
    font-family: inherit;
}

.submit-button:hover {
    transform: translateY(-2px);
}

.error-message {
    color: #d32f2f;
    margin-top: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Form Page */
.form-wrapper {
    max-width: 800px;
    width: 100%;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.form-wrapper h1 {
    color: #8b5a3c;
    margin-bottom: 30px;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* Events Information Section */
.events-info-section, .instructions-section {
    margin-bottom: 40px;
}

.events-info-section h2, .instructions-section h2 {
    color: #8b5a3c;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 400;
}

.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.event-info-card {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(139, 90, 60, 0.1);
    border: 2px solid #d4a574;
    transition: transform 0.3s, box-shadow 0.3s;
}

.event-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 60, 0.15);
}

.event-info-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4a574;
}

.event-info-header h3 {
    color: #8b5a3c;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    text-align: center;
}

.event-info-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.event-info-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1.5;
}

.event-info-label {
    font-weight: 600;
    color: #8b5a3c;
    min-width: 80px;
    flex-shrink: 0;
}

.event-info-value {
    color: #555;
    flex: 1;
    line-height: 1.6;
}

.attendee-group {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 15px;
    border-left: 4px solid #d4a574;
}

.attendee-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #8b5a3c;
    margin-bottom: 20px;
}

/* Grid container for event checkboxes - matches events-container structure */
.attendee-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.event-checkbox-group {
    margin-bottom: 0;
}

.event-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 100%;
}

.event-label:hover {
    background: #f0f0f0;
}

.event-label input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #d4a574;
    flex-shrink: 0;
}

.event-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.event-label.disabled:hover {
    background: white;
}

.event-name {
    font-weight: 500;
    color: #333;
}

/* Summary Page */
.summary-wrapper {
    max-width: 700px;
    width: 100%;
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.summary-content h1 {
    color: #8b5a3c;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.thank-you-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.8;
}

.summary-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: left;
}

.summary-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #8b5a3c;
    margin-bottom: 10px;
}

.summary-event {
    padding: 8px 0;
    color: #555;
    border-bottom: 1px solid #eee;
}

.summary-event:last-child {
    border-bottom: none;
}

.back-button {
    background: linear-gradient(135deg, #d4a574 0%, #8b5a3c 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 30px;
    transition: transform 0.3s;
    font-family: inherit;
}

.back-button:hover {
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .image-section {
        height: 300px;
    }

    .details-section {
        padding: 40px 30px;
    }

    .details-section h1 {
        font-size: 2rem;
    }

    .details-section h2 {
        font-size: 1.8rem;
    }

    .modal-content {
        margin: 20% auto;
        padding: 30px 20px;
    }

    .form-wrapper {
        padding: 30px 20px;
    }

    .summary-wrapper {
        padding: 40px 20px;
    }

    .summary-content h1 {
        font-size: 2rem;
    }

    .events-container {
        grid-template-columns: 1fr;
    }

    .events-info-section h2 {
        font-size: 1.5rem;
    }

    .event-info-card {
        padding: 20px;
    }

    .event-info-header h3 {
        font-size: 1.3rem;
    }

    .event-info-item {
        flex-direction: column;
        gap: 5px;
    }

    .event-info-label {
        min-width: auto;
    }

    .attendee-events-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .details-section h1 {
        font-size: 1.5rem;
    }

    .details-section h2 {
        font-size: 1.3rem;
    }

    .rsvp-button {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d4a574;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}