@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #2d1b69 0%, #5b3a8f 25%, #1e3a5f 50%, #2d5a4f 75%, #4a5d23 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.page-container {
    min-height: 100vh;
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 860px;
    margin: 0 auto;
}

/* Left Column Styles */
.left-column {
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.event-title {
    font-family: 'Outfit', sans-serif;
    font-size: 4em;
    font-weight: 700;
    color: white;
    margin-bottom: 0;
    letter-spacing: -2px;
    line-height: 1;
}

.event-datetime {
    margin-bottom: 0;
}

.event-date {
    font-size: 1.75em;
    font-weight: 500;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.event-time {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.85);
}

.timezone-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.timezone-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    color: white;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timezone-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.timezone-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.remind-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remind-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.more-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.host-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
}

.host-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.host-email:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: white;
}

.host-email:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.email-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.email-text {
    letter-spacing: 0.2px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #4ade80;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 1.1em;
}

.location-info {
    margin-bottom: 0;
}

.location-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.location-note {
    margin-top: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
    text-align: left;
}

.full-location {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
    display: inline-block;
    max-width: fit-content;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.venue-name-main {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35em;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.venue-address-main {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.venue-time-main {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-bottom: 16px;
}

.venue-links {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 16px;
}

.venue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    font-size: 1em;
    font-weight: 400;
    transition: all 0.2s ease;
}

.venue-link:hover {
    color: white;
    text-decoration-color: rgba(255, 255, 255, 0.8);
}

.link-icon {
    font-size: 1.1em;
}

.event-description {
    font-size: 1.25em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: 0;
}

/* Right Column Styles */
.right-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding-top: 40px;
}

.event-photo {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    filter: grayscale(100%);
}

.photo-disclaimer {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-top: -20px;
    text-align: center;
    max-width: 500px;
}

.cta-btn {
    width: 100%;
    max-width: 500px;
    padding: 18px 32px;
    background: white;
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    font-size: 1.25em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.95);
}

.print-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    font-size: 0.9em;
    max-width: 200px;
}

.print-main-btn:hover {
    background: linear-gradient(135deg, #7d8ef5 0%, #8a5ab8 100%);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.print-main-btn .print-icon {
    font-size: 1em;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    padding: 48px;
    border-radius: 24px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    font-size: 2em;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25em;
    color: #1a1a1a;
    margin-bottom: 32px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -1px;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

#attendingFields .form-group {
    margin-top: 24px;
}

#attendingFields .form-group:first-child {
    margin-top: 0;
}

.form-group label {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.975em;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.25s ease;
    background: white;
    font-family: inherit;
    color: #1a1a1a;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.phone-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.custom-select-wrapper {
    position: relative;
    flex: 0 0 auto;
}

.country-code-select {
    width: 110px;
    height: 100%;
    padding: 14px 8px 14px 12px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.25s ease;
    background: white;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.country-code-select::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    right: 8px;
    pointer-events: none;
}

.country-code-select:hover,
.country-code-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.country-code-select .fi {
    font-size: 1.25em;
}

.country-code-select .code-text {
    font-size: 0.95em;
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 130px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.country-dropdown.open {
    display: block;
}

.country-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    white-space: nowrap;
    color: #1a1a1a;
}

.country-option:hover {
    background: rgba(102, 126, 234, 0.08);
}

.country-option .fi {
    font-size: 1.25em;
    flex-shrink: 0;
}

.phone-input-group input[type="tel"] {
    flex: 1;
    min-width: 0;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.125em;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.success-message {
    text-align: center;
    padding: 36px;
    background: linear-gradient(135deg, rgba(76, 217, 100, 0.08), rgba(52, 199, 89, 0.08));
    border-radius: 12px;
    margin-top: 24px;
}

.success-message h3 {
    font-family: 'Outfit', sans-serif;
    color: #34c759;
    font-size: 1.625em;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.success-message p {
    color: #333;
    font-size: 1.125em;
    line-height: 1.6;
    margin-bottom: 8px;
}

.location-revealed-note {
    margin-top: 16px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    color: #1a1a1a;
}

.event-detail-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.event-detail-date {
    font-size: 1.125em;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.event-detail-venue {
    font-size: 1.05em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.event-detail-address {
    font-size: 1.05em;
    color: #667eea;
    margin-bottom: 0;
}

.print-btn {
    margin-top: 20px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.print-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.print-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.error-message {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.08), rgba(255, 69, 58, 0.08));
    border-radius: 12px;
    margin-top: 24px;
}

.error-message p {
    color: #ff3b30;
    font-weight: 500;
    font-size: 1.05em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .left-column {
        order: 2;
        padding-top: 0;
        text-align: center;
        gap: 32px;
    }

    .timezone-buttons,
    .action-buttons,
    .host-info,
    .host-email,
    .location-row {
        justify-content: center;
    }


    .full-location {
        text-align: center;
    }

    .location-note {
        text-align: center;
    }

    .venue-links {
        justify-content: center;
    }

    .venue-name-main {
        font-size: 1.25em;
    }

    .venue-address-main {
        font-size: 1em;
    }

    .venue-time-main {
        font-size: 0.95em;
    }

    .right-column {
        order: 1;
        padding-top: 0;
        gap: 32px;
    }

    .event-photo {
        max-width: 300px;
        width: 100%;
    }

    .photo-disclaimer {
        max-width: 300px;
    }

    .cta-btn {
        max-width: 300px;
    }

    .event-title {
        font-size: 3em;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 30px 20px;
    }

    .content-grid {
        gap: 40px;
    }

    .left-column {
        gap: 24px;
    }

    .right-column {
        padding-top: 0;
        gap: 24px;
    }

    .event-photo {
        max-width: 250px;
    }

    .photo-disclaimer {
        max-width: 250px;
    }

    .cta-btn {
        max-width: 250px;
        font-size: 1.125em;
        padding: 14px 28px;
    }

    .event-title {
        font-size: 2.5em;
    }

    .event-date {
        font-size: 1.35em;
    }

    .event-time {
        font-size: 1.125em;
    }

    .event-description {
        font-size: 1.05em;
    }

    .modal-content {
        padding: 32px 24px;
    }

    .phone-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .custom-select-wrapper {
        width: auto;
    }

    .country-code-select {
        width: auto;
        min-width: 130px;
    }

    .country-dropdown {
        width: auto;
        min-width: 130px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 24px 16px;
    }

    .content-grid {
        gap: 32px;
    }

    .left-column {
        gap: 20px;
    }

    .right-column {
        padding-top: 0;
        gap: 20px;
    }

    .event-photo {
        max-width: 220px;
    }

    .photo-disclaimer {
        max-width: 220px;
    }

    .cta-btn {
        max-width: 220px;
        font-size: 1em;
        padding: 12px 24px;
    }

    .event-title {
        font-size: 2em;
    }

    .event-date {
        font-size: 1.25em;
    }

    .event-time {
        font-size: 1em;
    }

    .event-description {
        font-size: 1em;
    }

    .timezone-buttons {
        flex-wrap: wrap;
    }

    .action-buttons {
        flex-direction: column;
    }

    .remind-btn,
    .more-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    @page {
        size: auto;
        margin: 15mm;
    }

    body {
        background: white;
        color: #1a1a1a;
        animation: none;
    }

    .page-container {
        padding: 0;
        max-width: 100%;
        min-height: 0;
        display: flex;
        justify-content: center;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
        align-items: center;
        justify-items: center;
    }

    .left-column {
        order: 2;
        padding-top: 0;
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .right-column {
        order: 1;
        padding-top: 0;
        gap: 12px;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .event-title {
        color: #1a1a1a;
        font-size: 2.5em;
        page-break-after: avoid;
        margin-bottom: 16px;
        text-align: center;
    }

    .event-datetime,
    .location-info,
    .event-description {
        color: #1a1a1a;
        text-align: center;
    }

    .event-datetime {
        margin-bottom: 16px;
        text-align: center;
    }

    .event-date,
    .event-time,
    .location-text,
    .venue-name-main,
    .venue-address-main,
    .venue-time-main {
        color: #1a1a1a;
        text-align: center;
    }

    .host-email {
        background: #f0f0f0;
        border-color: #ccc;
        color: #1a1a1a;
        margin-left: auto;
        margin-right: auto;
    }

    .full-location {
        display: block !important;
        background: #f9f9f9;
        border-color: #ccc;
        margin-bottom: 16px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .venue-links {
        justify-content: center;
    }

    .location-info {
        margin-bottom: 16px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .event-description {
        margin-bottom: 0;
        text-align: center;
    }

    /* Hide interactive elements */
    .cta-btn,
    .modal,
    .print-btn,
    .print-main-btn,
    .venue-link,
    button {
        display: none !important;
    }

    .event-photo {
        filter: grayscale(100%);
        max-width: 300px;
        page-break-inside: avoid;
        margin-bottom: 12px;
        margin-left: auto;
        margin-right: auto;
    }

    .photo-disclaimer {
        color: #666;
        font-size: 0.7em;
        margin-left: auto;
        margin-right: auto;
        margin-top: -8px;
        margin-bottom: 12px;
    }

    /* Ensure good page breaks */
    .left-column,
    .right-column,
    .location-info {
        page-break-inside: avoid;
    }

    /* Prevent orphaned content */
    * {
        page-break-after: auto;
    }
}
