/* Star Wars Bar Mitzvah CSS */

/* Font is now loaded via HTML <link> for better performance */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;  /* Remove blue tap highlight on iOS */
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible states for keyboard navigation */
:focus-visible {
    outline: 3px solid #feda4a;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #feda4a;
    outline-offset: 2px;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: #000;
    color: #feda4a;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;  /* Prevent text inflation on iOS */
    text-size-adjust: 100%;
}

/* Body scroll lock for modals on iOS */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Starfield Background */
.stars,
.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.stars {
    background: #000000;
    z-index: 0;
}

.stars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent),
        radial-gradient(1px 1px at 200px 120px, white, transparent),
        radial-gradient(1px 1px at 170px 150px, white, transparent),
        radial-gradient(2px 2px at 240px 40px, white, transparent),
        radial-gradient(1px 1px at 300px 200px, white, transparent),
        radial-gradient(1px 1px at 320px 90px, white, transparent);
    background-repeat: repeat;
    background-size: 350px 250px;
    opacity: 0.8;
}

.twinkling {
    background: transparent;
    z-index: 1;
}

.twinkling::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 40px 60px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 120px 130px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 180px 20px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 220px 180px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 280px 100px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 310px 160px, rgba(255, 255, 255, 0.9), transparent);
    background-repeat: repeat;
    background-size: 350px 220px;
    animation: move-twink-back 120s linear infinite;
    opacity: 0.6;
    will-change: transform;
}

@keyframes move-twink-back {
    from {transform: translateY(0);}
    to {transform: translateY(-220px);}
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* Sections */
.section {
    margin-bottom: 100px;
    min-height: 100vh;
    min-height: 100dvh;  /* Dynamic viewport height for iOS */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Save the Date Content */
.save-the-date-content {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
}

.logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 30px rgba(254, 218, 74, 0.8));
    animation: logo-pulse 3s ease-in-out infinite;
    will-change: transform;
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.intro-text {
    font-size: 1.2em;
    font-style: italic;
    text-align: center;
    margin-bottom: 50px;
    color: #6ec8e8;  /* Improved contrast: 5.5:1 ratio */
    font-weight: 400;
}

.episode-title {
    font-size: 3em;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 0.3em;
    font-weight: 900;
    text-shadow: 0 0 20px #feda4a;
}

.main-title {
    font-size: 4em;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
    letter-spacing: 0.2em;
    font-weight: 900;
    text-shadow: 0 0 30px #feda4a;
}

/* Save the Date Button */
.save-date-button {
    position: relative;
    margin-top: 60px;
    padding: 25px 60px;
    font-size: 2em;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #000;
    background: #feda4a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 40px rgba(254, 218, 74, 0.8),
                inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: button-pulse 2s ease-in-out infinite;
    -webkit-touch-callout: none;  /* Prevent callout on long press */
    touch-action: manipulation;  /* Remove 300ms tap delay */
    will-change: transform;
}

@keyframes button-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@media (hover: hover) {
    .save-date-button:hover {
        transform: scale(1.1);
        box-shadow: 0 0 80px rgba(254, 218, 74, 1),
                    inset 0 0 40px rgba(255, 255, 255, 0.6);
        background: #ffed4e;
    }
}

.save-date-button:active {
    transform: scale(1.05);
}

.button-text {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent);
    animation: button-shine 3s infinite;
}

@keyframes button-shine {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.video-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #feda4a;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(254, 218, 74, 0.8);
    animation: slideIn 0.5s ease;
    transform: translateZ(0);  /* GPU acceleration for iOS */
}

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-button {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 50px;
    height: 50px;
    background: #feda4a;
    color: #000;
    border: 3px solid #000;
    border-radius: 50%;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(254, 218, 74, 0.8);
    z-index: 1001;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

@media (hover: hover) {
    .close-button:hover {
        background: #fff;
        transform: rotate(90deg) scale(1.2);
        box-shadow: 0 0 40px rgba(254, 218, 74, 1);
    }
}

#announcement-video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(254, 218, 74, 0.5);
}

/* Information Section */
.info-panel {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #feda4a;
    border-radius: 15px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 0 50px rgba(254, 218, 74, 0.6),
                inset 0 0 50px rgba(254, 218, 74, 0.1);
    animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    letter-spacing: 0.3em;
    color: #feda4a;
    text-shadow: 0 0 20px #feda4a;
    font-weight: 900;
}

/* Hologram Effect */
.hologram-effect {
    position: relative;
    padding: 30px;
    animation: hologram-flicker 3s infinite;
    will-change: opacity;
}

@keyframes hologram-flicker {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.97; }
}

.hologram-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        transparent 50%,
        rgba(75, 163, 195, 0.1) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    animation: scanline 15s linear infinite;
    will-change: transform;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

.episode-subtitle {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #6ec8e8;  /* Improved contrast */
    letter-spacing: 0.2em;
}

.event-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    line-height: 1.3;
    letter-spacing: 0.15em;
    text-shadow: 0 0 30px #feda4a;
    font-weight: 900;
}

/* Event Details */
.event-details {
    margin: 40px 0;
}

.event-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    margin-bottom: 25px;
    background: rgba(254, 218, 74, 0.05);
    border: 2px solid #4ba3c3;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    -webkit-touch-callout: none;  /* Prevent callout on long press */
    touch-action: manipulation;  /* Remove 300ms tap delay */
}

/* Only apply hover effects on devices that support hover (not touch) */
@media (hover: hover) {
    .event-item:hover {
        background: rgba(254, 218, 74, 0.1);
        border-color: #feda4a;
        box-shadow: 0 0 30px rgba(254, 218, 74, 0.4);
        transform: scale(1.05);
    }
}

.click-hint {
    font-size: 0.8em;
    color: #6ec8e8;  /* Improved contrast */
    margin-top: 10px;
    font-style: italic;
    opacity: 0.7;
}

.click-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    animation: icon-pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.click-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid #feda4a;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(254, 218, 74, 0.8),
                0 0 20px rgba(254, 218, 74, 0.6),
                inset 0 0 10px rgba(254, 218, 74, 0.3);
}

.click-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 2px;
    background: #feda4a;
    box-shadow: 0 0 5px rgba(254, 218, 74, 0.8),
                0 -9px 0 0 #feda4a,
                0 9px 0 0 #feda4a,
                -9px 0 0 0 #feda4a,
                9px 0 0 0 #feda4a;
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (hover: hover) {
    .event-item:hover .click-icon {
        animation: icon-spin 1s linear infinite;
    }

    .event-item:hover .click-icon::before {
        border-color: #4ba3c3;
        box-shadow: 0 0 15px rgba(75, 163, 195, 1),
                    0 0 30px rgba(75, 163, 195, 0.8),
                    inset 0 0 15px rgba(75, 163, 195, 0.4);
    }

    .event-item:hover .click-icon::after {
        background: #4ba3c3;
        box-shadow: 0 0 8px rgba(75, 163, 195, 1),
                    0 -9px 0 0 #4ba3c3,
                    0 9px 0 0 #4ba3c3,
                    -9px 0 0 0 #4ba3c3,
                    9px 0 0 0 #4ba3c3;
    }
}

@keyframes icon-spin {
    0% {
        transform: scale(1.15) rotate(0deg);
    }
    100% {
        transform: scale(1.15) rotate(360deg);
    }
}

.label {
    font-size: 1.1em;
    color: #6ec8e8;  /* Improved contrast */
    letter-spacing: 0.15em;
}

.value {
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
                 0 0 30px rgba(255, 255, 255, 0.6);
}

/* Force Quote */
.force-quote {
    margin-top: 50px;
    text-align: center;
    padding: 30px;
    border-top: 2px solid #feda4a;
    border-bottom: 2px solid #feda4a;
}

.force-quote p {
    font-size: 1.8em;
    font-style: italic;
    color: #feda4a;
    text-shadow: 0 0 20px #feda4a;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Event Details Modal */
.event-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.event-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.event-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #feda4a;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(254, 218, 74, 0.8);
    animation: slideIn 0.5s ease;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;  /* Smooth scrolling on iOS */
    overscroll-behavior: contain;  /* Prevent scroll chaining to parent */
    transform: translateZ(0);  /* GPU acceleration for iOS */
}

#event-details-content {
    color: #feda4a;
    text-align: center;
}

.event-introduction {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    padding: 0;
}

.event-introduction p {
    margin: 15px 0 !important;
}

.event-introduction strong {
    color: #feda4a;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(254, 218, 74, 0.9);
}

#event-details-content h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.2em;
    text-shadow: 0 0 20px #feda4a;
}

#event-details-content h3 {
    font-size: 1.3em;
    margin: 15px 0 10px;
    color: #6ec8e8;  /* Improved contrast */
    letter-spacing: 0.1em;
    text-align: center;
}

#event-details-content p {
    font-size: 1.1em;
    margin: 8px 0;
    line-height: 1.5;
    text-align: center;
}

#event-details-content .detail-time {
    color: #feda4a;
    font-weight: 700;
    font-size: 1.3em;
    text-shadow: 0 0 15px #feda4a;
    text-align: center;
}

#event-details-content .detail-location {
    color: #fff;
    font-size: 1.5em;
    font-weight: 700;
    margin: 15px 0;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.05em;
}

#event-details-content .detail-address {
    color: #6ec8e8;  /* Improved contrast */
    font-size: 1em;
    margin-bottom: 15px;
    text-align: center;
}

#event-details-content .detail-note {
    color: #feda4a;
    font-style: italic;
    margin-top: 20px;
    text-align: center;
}

#event-details-content .action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

#event-details-content .map-link,
#event-details-content .calendar-link {
    display: inline-block;
    padding: 12px 30px;
    background: #feda4a;
    color: #000;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(254, 218, 74, 0.6);
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

@media (hover: hover) {
    #event-details-content .map-link:hover,
    #event-details-content .calendar-link:hover {
        background: #ffed4e;
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(254, 218, 74, 0.9);
    }
}

#event-details-content .calendar-link {
    background: #4ba3c3;
    color: #000;
    box-shadow: 0 0 20px rgba(75, 163, 195, 0.6);
}

@media (hover: hover) {
    #event-details-content .calendar-link:hover {
        background: #5cbce6;
        box-shadow: 0 0 30px rgba(75, 163, 195, 0.9);
    }
}

#event-details-content .dress-code {
    background: rgba(254, 218, 74, 0.1);
    border: 2px solid #feda4a;
    padding: 15px;
    margin-top: 15px;
    border-radius: 10px;
    text-align: center;
}

#event-details-content .dress-code-label {
    color: #6ec8e8;  /* Improved contrast */
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

#event-details-content .dress-code-value {
    color: #feda4a;
    font-size: 1.4em;
    font-weight: 700;
    text-shadow: 0 0 15px #feda4a;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Disable heavy animations on mobile for better performance */
    /* Hide twinkling layer entirely on mobile for smooth scrolling */
    .twinkling {
        display: none;
    }

    .stars::after {
        /* Simplify star background on mobile */
        background-image:
            radial-gradient(1px 1px at 20px 30px, white, transparent),
            radial-gradient(1px 1px at 60px 70px, white, transparent),
            radial-gradient(1px 1px at 130px 80px, white, transparent),
            radial-gradient(1px 1px at 200px 120px, white, transparent);
        background-size: 250px 200px;
    }

    .logo {
        animation: none;
    }

    .save-date-button {
        animation: none;
    }

    .button-glow {
        animation: none;
    }

    .click-icon {
        animation: none;
    }

    .hologram-effect {
        animation: none;
    }

    .hologram-effect::before {
        animation: none;
    }

    .info-panel {
        animation: none;
        box-shadow: 0 0 20px rgba(254, 218, 74, 0.4);
    }

    .mission-label {
        animation: none;
        text-shadow: 0 0 10px rgba(254, 218, 74, 0.7);
    }

    .value {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    }

    .event-item {
        transition: none;
    }

    .hologram-effect::before {
        display: none;
    }

    /* Disable modal animations on mobile for snappy feel */
    .event-modal {
        animation: none;
    }

    .event-modal-content {
        padding: 20px;
        max-height: 90vh;
        animation: none;
        box-shadow: 0 0 20px rgba(254, 218, 74, 0.5);
    }

    .video-modal-content {
        animation: none;
        box-shadow: 0 0 20px rgba(254, 218, 74, 0.5);
    }

    .event-introduction p {
        margin: 10px 0 !important;
        font-size: 0.95em !important;
    }

    #event-details-content h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    #event-details-content h3 {
        font-size: 1.2em;
        margin: 10px 0 8px;
    }

    #event-details-content p {
        font-size: 1em;
        margin: 6px 0;
    }

    /* Simplify text effects inside modal on mobile */
    #event-details-content h2 {
        text-shadow: 0 0 10px #feda4a;
    }

    #event-details-content .detail-location {
        text-shadow: none;
    }

    .event-introduction strong {
        text-shadow: none !important;
    }

    .event-introduction p {
        text-shadow: none !important;
    }

    #event-details-content .map-link,
    #event-details-content .calendar-link {
        box-shadow: none;
    }

    .logo {
        max-width: 150px;
        filter: drop-shadow(0 0 20px rgba(254, 218, 74, 0.8));
    }

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

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

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

    .section-title {
        font-size: 1.8em;
    }

    .info-panel {
        padding: 25px;
    }

    .label {
        font-size: 1.1em;
    }

    .value {
        font-size: 1em;
    }

    .force-quote p {
        font-size: 1.3em;
    }

    .crawl-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 120px;
        filter: drop-shadow(0 0 15px rgba(254, 218, 74, 0.8));
    }

    .episode-title {
        font-size: 1.5em;
        letter-spacing: 0.2em;
    }

    .main-title {
        font-size: 2em;
        letter-spacing: 0.1em;
    }

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

    .section-title {
        font-size: 1.5em;
        letter-spacing: 0.2em;
    }

    .info-panel {
        padding: 20px;
    }

    .event-item {
        padding: 20px;
    }

    .force-quote p {
        font-size: 1.1em;
    }
}

/* RSVP Section Styles */
.rsvp-message {
    text-align: center;
    padding: 30px;
}

.rsvp-info {
    color: #6ec8e8;  /* Improved contrast */
    font-size: 1.2em;
    line-height: 1.6;
}

.rsvp-form-container {
    max-width: 700px;
    margin: 0 auto;
}

.rsvp-guest-info {
    text-align: center;
    margin-bottom: 30px;
}

.guest-welcome {
    color: #feda4a;
    font-size: 1.5em;
    font-weight: 700;
    text-shadow: 0 0 15px #feda4a;
}

#guest-name {
    color: #fff;
}

.event-rsvp-group {
    background: rgba(254, 218, 74, 0.05);
    border: 2px solid #4ba3c3;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .event-rsvp-group:hover {
        background: rgba(254, 218, 74, 0.1);
        border-color: #feda4a;
    }
}

.mission-label {
    color: #feda4a;
    font-size: 1.5em;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(254, 218, 74, 0.9),
                 0 0 30px rgba(254, 218, 74, 0.7),
                 0 0 45px rgba(254, 218, 74, 0.5);
    animation: mission-glow 4s ease-in-out infinite;
}

@keyframes mission-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.event-rsvp-title {
    color: #fff;
    font-size: 1.3em;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
                 0 0 30px rgba(255, 255, 255, 0.6);
}

.rsvp-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.rsvp-radio-label {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

@media (hover: hover) {
    .rsvp-radio-label:hover {
        background: rgba(254, 218, 74, 0.1);
    }
}

.rsvp-radio-label input[type="radio"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #feda4a;
}

.rsvp-radio-label span {
    flex: 1;
}

.rsvp-guests-count {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.rsvp-guests-count label {
    color: #6ec8e8;  /* Improved contrast */
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rsvp-guests-count input[type="number"] {
    width: 80px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #4ba3c3;
    border-radius: 5px;
    color: #feda4a;
    font-size: 16px;  /* Minimum 16px to prevent iOS zoom on focus */
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

.rsvp-additional-info {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rsvp-label {
    color: #6ec8e8;  /* Improved contrast */
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rsvp-label textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #4ba3c3;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;  /* Minimum 16px to prevent iOS zoom on focus */
    font-family: 'Orbitron', sans-serif;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.rsvp-label textarea:focus {
    outline: none;
    border-color: #feda4a;
    box-shadow: 0 0 15px rgba(254, 218, 74, 0.3);
}

.rsvp-label textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.rsvp-submit-container {
    margin-top: 30px;
    text-align: center;
}

.rsvp-submit-btn {
    padding: 20px 50px;
    font-size: 1.5em;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #000;
    background: #feda4a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(254, 218, 74, 0.6);
    -webkit-touch-callout: none;  /* Prevent callout on long press */
    touch-action: manipulation;  /* Remove 300ms tap delay */
}

@media (hover: hover) {
    .rsvp-submit-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(254, 218, 74, 1);
        background: #ffed4e;
    }
}

.rsvp-submit-btn:active {
    transform: scale(0.98);
}

.rsvp-status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1em;
    text-align: center;
    display: none;
}

.rsvp-status-message.success {
    display: block;
    background: rgba(75, 163, 195, 0.2);
    border: 2px solid #6ec8e8;
    color: #6ec8e8;  /* Improved contrast */
}

.rsvp-status-message.error {
    display: block;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff4444;
    color: #ff4444;
}

/* Responsive RSVP */
@media (max-width: 768px) {
    .event-rsvp-group {
        padding: 20px;
    }

    .mission-label {
        font-size: 1.2em;
        letter-spacing: 0.2em;
    }

    .event-rsvp-title {
        font-size: 1.1em;
    }

    .rsvp-radio-label {
        font-size: 1em;
    }

    .rsvp-submit-btn {
        padding: 15px 40px;
        font-size: 1.2em;
    }
}

/* Lightsaber cursor effect (optional) */
body:hover {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="5" fill="%23feda4a"/></svg>'), auto;
}

/* Loading spinner for buttons */
.rsvp-submit-btn.loading {
    position: relative;
    pointer-events: none;
}

.rsvp-submit-btn .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .twinkling::after,
    .logo,
    .save-date-button,
    .button-glow,
    .click-icon,
    .hologram-effect,
    .hologram-effect::before,
    .info-panel,
    .mission-label {
        animation: none !important;
    }
}
