/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #fff9e6 50%, #fce4ec 100%);
    color: #5a5a5a;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: calc(100vw - 191px);
    margin: 0;
    margin-left: 191px;
    margin-right: 0;
    background: rgb(255, 255, 255);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    text-align: center;
    min-height: 100vh;
    padding: 0;
}

/* Header Styles */
.header {
    background: linear-gradient(to bottom, #e1f5fe, #ffffff);
    padding: 60px 20px 40px;
    text-align: center;
    position: relative;
    border-bottom: 3px solid #ffd700;
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.7) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.angel-wings {
    font-size: 3em;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite, sparkle 4s ease-in-out infinite;
    position: relative;
    z-index: 10;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    25% { 
        opacity: 0.7;
        transform: rotate(90deg) scale(1.2);
    }
    50% { 
        opacity: 1;
        transform: rotate(180deg) scale(0.9);
    }
    75% { 
        opacity: 0.7;
        transform: rotate(270deg) scale(1.1);
    }
}

.heaven-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5em;
    font-weight: 700 !important;
    color: #000 !important;
    text-shadow: none !important;
    margin: 20px auto;
    letter-spacing: 0px;
    line-height: 1.5;
    background: #fff !important;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    -webkit-text-fill-color: #000 !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    position: relative;
    z-index: 10;
}

.divider {
    width: 150px;
    height: 2px;
    background: linear-gradient(to right, transparent, #ffd700, transparent);
    margin: 20px auto;
}

/* Invitation Content */
.invitation {
    padding: 60px 40px;
    background: white;
}

.invitation-content {
    text-align: center;
}

.intro-text {
    font-size: 1.1em;
    color: #000000;
    margin-bottom: 30px;
    font-weight: 500;
}

.name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4em;
    color: #4a90e2;
    margin: 20px 0;
    font-weight: 600;
    animation: slideIn 1.2s ease-out;
}

.event-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2em;
    color: #7b68ee;
    font-weight: 400;
    margin-bottom: 40px;
    animation: slideIn 1.4s ease-out;
}

.highlight-one {
    font-size: 1.3em;
    font-weight: 700;
    color: #7b68ee;
    display: inline-block;
}

.angel-divider {
    margin: 40px 0;
}

/* Joshua's Photo */
.photo-container {
    margin: 40px auto;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.3);
    animation: photoZoom 4s ease-in-out infinite;
}

.joshua-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.photo-container:hover .joshua-photo {
    transform: scale(1.05);
}

@keyframes photoZoom {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 15px 40px rgba(74, 144, 226, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 20px 50px rgba(123, 104, 238, 0.4);
    }
}

.angel {
    font-size: 3em;
    display: inline-block;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* Details Section */
.details {
    margin: 50px 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff8e1 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideIn 1.6s ease-out;
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

.icon {
    font-size: 2.5em;
    min-width: 60px;
    animation: pulse 3s ease-in-out infinite;
}

.date-image {
    min-width: 60px;
    max-width: 60px;
    animation: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-image img {
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.date-box {
    background: linear-gradient(to bottom, #e74c3c 0%, #e74c3c 30%, white 30%, white 100%);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    min-width: 70px;
    animation: none;
}

.date-box .month {
    color: white;
    font-size: 0.5em;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.date-box .day {
    color: #333;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
}

.time-box {
    animation: none;
}

.detail-content {
    text-align: left;
}

.detail-content h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5em;
    color: #4a90e2;
    margin-bottom: 10px;
}

.detail-content p {
    margin: 5px 0;
    font-size: 1.1em;
    color: #555;
}

.detail-content strong {
    color: #333;
}

.sub-detail {
    font-size: 0.95em !important;
    color: #888 !important;
}

/* Directions Section */
.directions {
    margin: 50px 0;
    padding: 30px;
    background: linear-gradient(135deg, #e8eaf6 0%, #fff9c4 100%);
    border-radius: 15px;
    border-left: 5px solid #4a90e2;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2em;
    color: #4a90e2;
    margin-bottom: 20px;
    text-align: center;
}

.directions-content {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.direction-step {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.05em;
    line-height: 1.8;
}

.direction-step:last-child {
    border-bottom: none;
}

.direction-step strong {
    color: #4a90e2;
    display: inline-block;
    min-width: 100px;
}

.waze-link {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.waze-link:hover {
    color: #7b68ee;
    border-bottom: 2px solid #7b68ee;
}

/* RSVP Section */
.rsvp {
    margin: 1px 0 0 0;
    padding: 40px;
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
    border-radius: 15px;
    border: 3px solid #ffd700;
}

.rsvp-content {
    font-size: 1.1em;
}

.rsvp-content p {
    margin: 10px 0;
    color: #555;
}

.rsvp-deadline {
    font-size: 1.4em !important;
    color: #d32f2f !important;
    font-weight: 600 !important;
    margin: 15px 0 !important;
}

.phone-number {
    display: inline-block;
    font-size: 1.2em;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    margin: 15px 0;
    padding: 12px 24px;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.phone-number:hover {
    background: #4a90e2;
    color: white;
    transform: scale(1.05);
}

/* Closing Section */
.closing {
    margin-top: 50px;
}

.blessing {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5em;
    color: #7b68ee;
    font-style: italic;
    margin: 20px 0;
}

.hearts {
    font-size: 2em;
    margin: 20px 0;
    animation: pulse 2s ease-in-out infinite;
}

/* Footer */
.footer {
    background: linear-gradient(to top, #e1f5fe, #ffffff);
    padding: 40px 20px;
    text-align: center;
    position: relative;
    border-top: 3px solid #ffd700;
}

.clouds-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.7) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.6) 0%, transparent 50%);
    pointer-events: none;
}

.footer-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3em;
    color: #7b68ee;
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 0;
        margin-left: calc(8em + 2px);
        margin-right: 2px;
        width: calc(100% - 8em - 4px);
        padding: 0;
    }
    
    .header {
        padding: 30px 15px 25px;
    }

    .invitation {
        padding: 30px 15px;
    }

    .invitation-content {
        text-align: center;
        max-width: 100%;
        padding: 0 15px;
    }

    .heaven-text {
        font-size: 1.2em;
        padding: 15px;
        margin: 15px 10px;
        background: #ffffff !important;
        color: #000 !important;
        font-weight: 700 !important;
        -webkit-text-fill-color: #000 !important;
        background-clip: border-box !important;
        -webkit-background-clip: border-box !important;
    }

    .name {
        font-size: 3em;
    }

    .event-title {
        font-size: 1.5em;
    }

    .photo-container {
        max-width: 100%;
        margin: 30px auto;
    }

    .detail-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-content {
        text-align: center;
    }

    .directions-content {
        padding: 0 10px;
    }

    .phone-number {
        font-size: 1.1em;
        padding: 10px 20px;
    }
    
    /* Mobile Form Optimizations */
    .rsvp-section {
        padding: 30px 15px;
        background: #ffffff;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group select {
        width: 100%;
        padding: 16px 14px;
        font-size: 16px;
        min-height: 52px;
        border: 2px solid #2d3748;
        border-radius: 8px;
        background: #ffffff;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
        padding-right: 40px;
    }
    
    .attendee-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .name-field,
    .type-field {
        width: 100%;
        min-width: 100%;
    }
    
    .submit-btn {
        width: 100%;
        padding: 18px;
        font-size: 18px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        margin-left: calc(6em + 2px);
        margin-right: 2px;
        width: calc(100% - 6em - 4px);
    }
    
    .header {
        padding: 25px 10px 20px;
    }

    .heaven-text {
        font-size: 1em;
        padding: 12px;
        margin: 10px 5px;
        background: #ffffff !important;
        color: #000 !important;
        font-weight: 700 !important;
        -webkit-text-fill-color: #000 !important;
        background-clip: border-box !important;
        -webkit-background-clip: border-box !important;
    }
    
    .invitation {
        padding: 20px 10px;
    }
    
    .invitation-content {
        padding: 0 10px;
    }
    
    /* Extra small phone optimizations */
    .form-group input,
    .form-group select {
        font-size: 16px;
        padding: 14px 12px;
        min-height: 50px;
    }
    
    .rsvp-section {
        padding: 20px 10px;
    }

    .name {
        font-size: 2.5em;
    }

    .event-title {
        font-size: 1.3em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .direction-step strong {
        display: block;
        margin-bottom: 5px;
    }
}

/* Film Strip Container - Left Side for Dropping Media */
.film-strip-container {
    position: fixed;
    left: 0;
    top: 0;
    width: 191px;
    height: 100vh;
    background: linear-gradient(to left, transparent, rgba(135, 206, 250, 0.3));
    z-index: 100;
    overflow: hidden;
    pointer-events: none;
}

/* Heaven clouds decoration */
.heaven-clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cloud {
    position: absolute;
    font-size: 2em;
    opacity: 0.6;
    animation: floatCloud 20s ease-in-out infinite;
}

.cloud-1 {
    left: 10%;
    top: 10%;
    animation-delay: 0s;
}

.cloud-2 {
    left: 60%;
    top: 30%;
    animation-delay: 5s;
}

.cloud-3 {
    left: 20%;
    top: 60%;
    animation-delay: 10s;
}

.cloud-4 {
    left: 70%;
    top: 80%;
    animation-delay: 15s;
}

@keyframes floatCloud {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-30px) translateX(10px);
        opacity: 0.9;
    }
}

.film-strip {
    position: absolute;
    top: 0;
    left: 20px;
    width: 151px;
    /* JS-driven seamless downward scroll (no duplicated assets) */
    transform: translateY(0);
    animation: none;
    will-change: transform;
    backface-visibility: hidden;
}

.film-frame {
    width: 151px;
    height: 151px;
    margin-bottom: 20px;
    border: 8px solid #87CEEB;
    border-radius: 12px;
    box-shadow: 
        0 8px 20px rgba(135, 206, 250, 0.6),
        0 4px 10px rgba(255, 255, 255, 0.8),
        inset 0 0 30px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.film-frame::before,
.film-frame::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        #87CEEB 0px,
        #87CEEB 8px,
        #B0E0E6 8px,
        #B0E0E6 12px
    );
    left: 0;
    z-index: 10;
}

.film-frame::before {
    top: -8px;
}

.film-frame::after {
    bottom: -8px;
}

.film-frame img,
.film-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
}

/* Cloud overlay on each photo */
.cloud-overlay {
    position: absolute;
    font-size: 1.5em;
    opacity: 0.4;
    pointer-events: none;
    z-index: 15;
    animation: cloudFloatOnPhoto 8s ease-in-out infinite;
}

.film-frame:nth-child(odd) .cloud-overlay {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.film-frame:nth-child(even) .cloud-overlay {
    bottom: 15%;
    right: 10%;
    animation-delay: 2s;
}

.film-frame:nth-child(3n) .cloud-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes cloudFloatOnPhoto {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0.3;
    }
    50% {
        transform: translateX(8px) translateY(-8px);
        opacity: 0.6;
    }
}

@keyframes scrollFilmDown {
    0% {
        transform: translateY(calc(-100% / 3));
    }
    100% {
        transform: translateY(0);
    }
}

/* Drop from heaven animation */
@keyframes dropFromHeaven {
    0% {
        transform: translateY(-20px) scale(0.95);
        opacity: 0.7;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 8px 20px rgba(135, 206, 250, 0.6);
    }
    50% {
        transform: translateY(0) scale(1);
        opacity: 1;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.7), 0 8px 20px rgba(135, 206, 250, 0.6);
    }
    100% {
        transform: translateY(-20px) scale(0.95);
        opacity: 0.7;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 8px 20px rgba(135, 206, 250, 0.6);
    }
}

/* RSVP Form Styles */
.rsvp-form {
    max-width: 90%;
    margin: 30px auto;
    text-align: left;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #2d3748;
    border-radius: 12px;
    font-size: 1em;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #000000;
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.35), 0 0 0 3px rgba(44, 82, 130, 0.15);
    background: white;
    transform: translateY(-2px);
}

.attendee-group {
    background: linear-gradient(135deg, #fdfeff 0%, #f8f9ff 50%, #fef9f3 100%);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 2px solid #e8eaf6;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.attendee-group::before {
    content: '✨';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    opacity: 0.3;
    animation: sparkle 4s ease-in-out infinite;
}

.attendee-group:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transform: translateY(-3px);
    border-color: #d4d9fc;
}

.attendee-group h5 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6em;
    color: #2c5282;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(44, 82, 130, 0.2);
}

.attendee-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.name-field {
    flex: 3;
}

.name-field input {
    height: 52px;
}

.type-field {
    flex: 1;
    min-width: 180px;
}

.type-field > label:first-child {
    font-size: 1.05em;
    margin-bottom: 8px;
    display: block;
    font-weight: 700;
    color: #1a365d;
}

.type-field select {
    height: 52px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Toggle Switch Styles */
.toggle-switch-container {
    position: relative;
    height: 52px;
    width: 100%;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    background: #8b5cf6;
    border-radius: 26px;
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    user-select: none;
}

.toggle-text {
    flex: 1;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    z-index: 2;
    transition: all 0.3s ease;
    padding: 0 10px;
    color: white;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: white;
    border-radius: 22px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Adult selected (default - checked state) */
.toggle-input:checked ~ .toggle-label {
    background: #8b5cf6;
}

.toggle-input:checked ~ .toggle-label .toggle-slider {
    left: 4px;
}

.toggle-input:checked ~ .toggle-label .toggle-text.adult {
    color: #8b5cf6;
    font-weight: 700;
}

.toggle-input:checked ~ .toggle-label .toggle-text.child {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Child selected (unchecked state) */
.toggle-input:not(:checked) ~ .toggle-label {
    background: #8b5cf6;
}

.toggle-input:not(:checked) ~ .toggle-label .toggle-slider {
    left: calc(50%);
}

.toggle-input:not(:checked) ~ .toggle-label .toggle-text.adult {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.toggle-input:not(:checked) ~ .toggle-label .toggle-text.child {
    color: #8b5cf6;
    font-weight: 700;
}

.toggle-label:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.toggle-label:active .toggle-slider {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.radio-group {
    display: flex;
    gap: 8px;
    margin-top: 0;
    height: 52px;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 0 12px;
    border: 2px solid #2d3748;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    transition: all 0.3s ease;
    flex: 1;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.radio-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radio-label:hover {
    border-color: #4c51bf;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 81, 191, 0.3);
}

.radio-label:hover::before {
    opacity: 1;
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4c51bf;
    position: relative;
    z-index: 1;
}

.radio-label span {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    color: #2d3748;
}

.radio-label input[type="radio"]:checked + span {
    color: #2c5282;
    font-weight: 700;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #2c5282;
    background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4), 0 0 0 3px rgba(44, 82, 130, 0.15);
    transform: translateY(-2px);
}

.radio-label:has(input[type="radio"]:checked)::before {
    opacity: 0;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 35px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    margin-top: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.form-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* Mobile responsive for film strip */
@media (max-width: 768px) {
    .container {
        width: calc(100vw - 115px);
        margin-left: 115px;
    }
    
    .film-strip-container {
        width: 115px;
    }
    
    .film-strip {
        width: 95px;
        left: 10px;
    }
    
    .film-frame {
        width: 95px;
        height: 95px;
        margin-bottom: 10px;
        border: 3px solid #87CEEB;
    }
    
    .film-frame img,
    .film-frame video {
        border-radius: 3px;
    }
    
    /* Minimalist Mobile RSVP Design */
    .rsvp {
        margin: 0;
        padding: 20px 15px;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid #ffd700;
    }
    
    .rsvp-form {
        max-width: 100%;
        margin: 0;
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.95em;
        margin-bottom: 6px;
        font-weight: 600;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 15px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 8px;
        border: 1.5px solid #cbd5e0;
        background: #ffffff;
        box-shadow: none;
    }
    
    .form-group input:focus,
    .form-group select:focus {
        border-color: #4c51bf;
        box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
        transform: none;
    }
    
    /* Remove decorative boxes on mobile */
    .attendee-group {
        background: transparent;
        padding: 0;
        margin-bottom: 20px;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    
    .attendee-group::before {
        display: none;
    }
    
    .attendee-group:hover {
        box-shadow: none;
        transform: none;
    }
    
    .attendee-group h5 {
        font-size: 1.2em;
        margin-bottom: 12px;
        text-align: left;
        text-shadow: none;
        color: #2c5282;
        padding: 10px 0;
        border-bottom: 2px solid #e2e8f0;
    }
    
    /* Stack form fields vertically */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .attendee-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .name-field,
    .type-field {
        min-width: 100%;
        flex: 1;
    }
    
    .name-field input,
    .type-field select {
        height: 48px;
        width: 100%;
    }
    
    /* Simplified mobile-friendly select */
    .type-field select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%232c5282' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        padding-right: 40px;
    }
    
    /* Toggle switch optimized for mobile */
    .toggle-switch-container {
        height: 48px;
    }
    
    .toggle-label {
        border-radius: 24px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .toggle-text {
        font-size: 0.85em;
        padding: 0 8px;
    }
    
    .toggle-slider {
        border-radius: 20px;
    }
    
    /* Radio buttons optimized for touch */
    .radio-group {
        height: 48px;
        gap: 10px;
    }
    
    .radio-label {
        padding: 0 10px;
        border-radius: 8px;
        border: 1.5px solid #cbd5e0;
        background: #ffffff;
        box-shadow: none;
    }
    
    .radio-label:hover {
        transform: none;
        box-shadow: none;
    }
    
    .radio-label input[type="radio"] {
        width: 18px;
        height: 18px;
    }
    
    .radio-label span {
        font-size: 0.85em;
    }
    
    .radio-label:has(input[type="radio"]:checked) {
        background: #eef2ff;
        border-color: #4c51bf;
        box-shadow: none;
        transform: none;
    }
    
    /* Submit button optimized for mobile */
    .submit-btn {
        padding: 14px 30px;
        font-size: 1.05em;
        border-radius: 8px;
        margin-top: 20px;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .submit-btn:hover {
        transform: none;
    }
    
    .submit-btn:active {
        transform: scale(0.98);
    }
    
    /* Header optimization */
    .header {
        padding: 30px 15px 20px;
    }
    
    .heaven-text {
        font-size: 1.2em;
        padding: 20px;
        max-width: 100%;
        margin: 15px 0;
        color: #000 !important;
        background: #fff !important;
        font-weight: 700 !important;
        -webkit-text-fill-color: #000 !important;
        background-clip: border-box !important;
        -webkit-background-clip: border-box !important;
    }
    
    /* Invitation section */
    .invitation {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        width: calc(100vw - 96px);
        margin-left: 96px;
    }
    
    .film-strip-container {
        width: 96px;
    }
    
    .film-strip {
        width: 76px;
        left: 10px;
    }
    
    .film-frame {
        width: 76px;
        height: 76px;
        margin-bottom: 8px;
        border: 2px solid #87CEEB;
    }
    
    /* Extra small screens - even more compact */
    .rsvp {
        padding: 15px 10px;
    }
    
    .rsvp-form {
        padding: 15px 10px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .attendee-group h5 {
        font-size: 1.1em;
    }
    
    .heaven-text {
        font-size: 1.1em;
        padding: 15px;
        color: #000 !important;
        background: #fff !important;
        font-weight: 700 !important;
        -webkit-text-fill-color: #000 !important;
        background-clip: border-box !important;
        -webkit-background-clip: border-box !important;
    }
    
    .header {
        padding: 20px 10px 15px;
    }
    
    .invitation {
        padding: 15px 10px;
    }
}

/* Responsive Design */

/* Background Music Player */
.music-player {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

/* (Autoplay prompt styles removed) */

.music-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    animation: musicPulse 2s ease-in-out infinite;
}

.music-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.music-button.playing {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: musicPlaying 1s ease-in-out infinite;
}

.music-icon {
    font-size: 1.3em;
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(102, 126, 234, 0.7);
    }
}

@keyframes musicPlaying {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Floating Magical Elements */
.magical-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    font-size: 2em;
    opacity: 0;
    animation: floatMagical 15s infinite ease-in-out;
    animation-fill-mode: forwards;
}

.floating-element:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.floating-element:nth-child(2) {
    left: 80%;
    top: 10%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.floating-element:nth-child(3) {
    left: 25%;
    top: 60%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.floating-element:nth-child(4) {
    left: 70%;
    top: 50%;
    animation-delay: 1s;
    animation-duration: 13s;
}

.floating-element:nth-child(5) {
    left: 40%;
    top: 30%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.floating-element:nth-child(6) {
    left: 90%;
    top: 70%;
    animation-delay: 5s;
    animation-duration: 11s;
}

.floating-element:nth-child(7) {
    left: 15%;
    top: 80%;
    animation-delay: 2.5s;
    animation-duration: 14.5s;
}

.floating-element:nth-child(8) {
    left: 60%;
    top: 15%;
    animation-delay: 4.5s;
    animation-duration: 12.5s;
}

.floating-element:nth-child(9) {
    left: 35%;
    top: 75%;
    animation-delay: 1.5s;
    animation-duration: 16.5s;
}

.floating-element:nth-child(10) {
    left: 75%;
    top: 35%;
    animation-delay: 3.5s;
    animation-duration: 13.5s;
}

.floating-element:nth-child(11) {
    left: 50%;
    top: 55%;
    animation-delay: 6s;
    animation-duration: 17s;
}

.floating-element:nth-child(12) {
    left: 20%;
    top: 40%;
    animation-delay: 2.8s;
    animation-duration: 14.2s;
}

.floating-element:nth-child(13) {
    left: 85%;
    top: 85%;
    animation-delay: 5.5s;
    animation-duration: 11.5s;
}

.floating-element:nth-child(14) {
    left: 45%;
    top: 10%;
    animation-delay: 4.2s;
    animation-duration: 15.8s;
}

.floating-element:nth-child(15) {
    left: 65%;
    top: 65%;
    animation-delay: 3.2s;
    animation-duration: 13.8s;
}

@keyframes floatMagical {
    0% {
        transform: translate(0, -100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    25% {
        transform: translate(30px, 25vh) rotate(90deg) scale(1.2);
        opacity: 0.9;
    }
    50% {
        transform: translate(-20px, 50vh) rotate(180deg) scale(0.8);
        opacity: 0.6;
    }
    75% {
        transform: translate(40px, 75vh) rotate(270deg) scale(1.1);
        opacity: 0.8;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate(0, 100vh) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* Twinkling Stars */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.star-twinkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Magic Particles */
.magic-particle {
    position: absolute;
    bottom: -50px;
    font-size: 20px;
    opacity: 0.8;
    animation: riseUp 5s linear forwards;
    pointer-events: none;
    z-index: 3;
}

@keyframes riseUp {
    0% {
        bottom: -50px;
        opacity: 0.8;
        transform: translateX(0) rotate(0deg);
    }
    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(50px) rotate(360deg);
    }
}

/* Confetti */
.confetti {
    position: fixed;
    font-size: 20px;
    animation: confettiFall 4s linear forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Magical Glow Effect */
.magical-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05),
                    0 0 20px rgba(255, 215, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2),
                    0 0 30px rgba(255, 215, 0, 0.3);
    }
}

/* Enhanced Container with magical glow */
.container {
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15),
                0 0 100px rgba(102, 126, 234, 0.1);
}

/* Enhance existing animations with magical effects */
.detail-item {
    transition: all 0.3s ease, box-shadow 0.3s ease;
}

.detail-item:hover {
    box-shadow: 0 12px 30px rgba(74, 144, 226, 0.3),
                0 0 25px rgba(255, 215, 0, 0.2);
}

/* Magical shimmer on main photo */
.joshua-photo {
    position: relative;
    animation: photoMagic 5s ease-in-out infinite;
}

@keyframes photoMagic {
    0%, 100% {
        filter: brightness(1) contrast(1);
    }
    50% {
        filter: brightness(1.1) contrast(1.05);
    }
}

.photo-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Play page (full-screen slideshow) */
body.play-page {
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(20, 34, 64, 0.7), rgba(10, 16, 32, 0.9)), #050910;
    color: #f5f7ff;
    min-height: 100vh;
    overflow: hidden;
}

.play-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 0;
    position: relative;
    isolation: isolate;
}

.play-full {
    padding: 0;
}

.play-panel {
    width: min(1200px, 92vw);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 22px;
    box-shadow:
        0 20px 70px rgba(16, 35, 71, 0.18),
        0 0 80px rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 28px;
    position: relative;
    z-index: 5;
}

.play-eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.8em;
    color: #7b68ee;
    margin-bottom: 10px;
}

.play-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #344675;
    margin-bottom: 10px;
}

.play-subtitle {
    font-size: 1.05em;
    color: #3f4a66;
    margin-bottom: 22px;
}

.slideshow-frame {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 30% 30%, rgba(45, 64, 108, 0.55), rgba(8, 13, 25, 0.95));
    border-radius: 0;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

.slide-soft-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4), transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.35), transparent 40%);
    z-index: 2;
}

.slides {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: none;
    transition: opacity 0.8s ease;
    display: grid;
    place-items: center;
    padding: 0;
}

.slide.active {
    opacity: 1;
    z-index: 3;
    animation: none;
}

.slide.bounce-restart {
    animation: none;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    max-width: 100vw;
    max-height: 100vh;
    transform: none !important;
    display: block;
    border-radius: 0;
    background: #000;
}

.slide video {
    background: #000;
}

@keyframes bounceIn {}
@keyframes floatPulse {}

.play-controls {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border-radius: 999px;
}

.play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.slide-dots {
    position: absolute;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 80%;
    z-index: 4;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 999px;
}

.slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid rgba(16, 35, 71, 0.3);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.slide-dot.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(240, 147, 251, 0.25);
}

.play-home-link {
    position: fixed;
    top: 18px;
    left: 16px;
    z-index: 10001;
    color: #f5f7ff;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.play-page .music-player {
    top: 20px;
    right: 20px;
}

@media (max-width: 900px) {
    .play-panel {
        padding: 20px;
    }

    .slide-dots {
        bottom: 56px;
    }

    .play-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .play-btn {
        padding: 9px 14px;
    }
}

@media (max-width: 600px) {
    .play-panel {
        padding: 18px;
    }

    .slideshow-frame {
        border-radius: 14px;
    }

    .play-home-link {
        font-size: 0.9em;
        padding: 8px 12px;
        top: 16px;
        left: 14px;
    }

    .play-btn {
        font-size: 0.95em;
    }
}

/* Mobile responsiveness for magical elements */
@media (max-width: 768px) {
    .music-player {
        top: 10px;
        right: 10px;
    }
    
    .music-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .music-text {
        display: none;
    }
    
    .floating-element {
        font-size: 1.5em;
    }
    
    .star-twinkle {
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .music-button {
        padding: 8px 16px;
    }
    
    .floating-element {
        font-size: 1.2em;
    }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element,
    .magic-particle,
    .confetti,
    .star-twinkle,
    .film-strip {
        animation: none !important;
        display: none;
    }
}

