/* Fuentes para boda */
body {
    font-family: 'Questrial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

/* Audio oculto para móviles */
#backgroundAudio {
    display: none;
}

/* Control de música universal - Desktop y Móvil */
.music-control-mobile {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    background: transparent;
    display: block;
}

.music-toggle {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    /* Cross-browser fixes */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Asegurar posicionamiento */
    position: relative;
    z-index: 1;
    margin: 0;
}

.music-toggle:hover,
.music-toggle:active,
.music-toggle:focus {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
    outline: none;
}

.music-toggle.playing {
    background: rgba(34, 139, 34, 0.8);
    animation: pulse 2s infinite;
}

.music-toggle.playing:hover,
.music-toggle.playing:active,
.music-toggle.playing:focus {
    background: rgba(34, 139, 34, 0.9);
    outline: none;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 4px 25px rgba(0, 200, 0, 0.4); }
    100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .music-control-mobile {
        bottom: 15px;
    }
    
    .music-toggle {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Fix para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .music-control-mobile {
        bottom: 25px;
    }
}

/* Optimizaciones de rendering */
.music-toggle {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Modal de Confirmación de Asistencia */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Times New Roman', serif;
    font-size: 1.8rem;
    color: #2c2c2c;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-text {
    font-family: 'Questrial', sans-serif;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
    text-align: center;
}

.guest-selection {
    margin-bottom: 30px;
}

.guest-info-modal {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
}

.guest-label {
    font-family: 'Questrial', sans-serif;
    color: #666;
    font-size: 1rem;
}

.guest-total {
    font-family: 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: bold;
    color: #2c2c2c;
    margin: 0 10px;
}

.guest-counter {
    text-align: center;
}

.counter-label {
    font-family: 'Questrial', sans-serif;
    font-size: 1.1rem;
    color: #333;
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
}

.counter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.counter-btn {
    background: linear-gradient(135deg, #333, #555);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.counter-btn:hover {
    background: linear-gradient(135deg, #222, #444);
    transform: scale(1.1);
}

.counter-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.counter-number {
    font-family: 'Times New Roman', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c2c2c;
    min-width: 60px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    font-family: 'Questrial', sans-serif;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 110px;
    flex: 1;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.modal-btn-cancel:hover {
    background: #e9ecef;
    color: #333;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.modal-btn-confirm:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.modal-btn-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.modal-btn-decline {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.modal-btn-decline:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Responsive para desktop */
@media (min-width: 769px) {
    .modal-actions {
        gap: 15px;
    }
    
    .modal-btn {
        padding: 15px 25px;
        font-size: 0.95rem;
        min-width: 140px;
        max-width: 180px;
        flex: none;
    }
}

/* Responsive para tablets */
@media (min-width: 601px) and (max-width: 768px) {
    .modal-actions {
        gap: 12px;
    }
    
    .modal-btn {
        padding: 13px 22px;
        font-size: 0.92rem;
        min-width: 120px;
        max-width: 160px;
    }
}

/* Responsive para móviles */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px 25px 10px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .counter-controls {
        gap: 15px;
    }
    
    .counter-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-btn {
        width: 100%;
        max-width: none;
        flex: none;
        padding: 15px 20px;
        font-size: 1rem;
    }
}

/* Modal de Resultado */
.result-modal {
    max-width: 400px;
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin: 20px 0;
    display: block;
}

.result-message {
    font-family: 'Questrial', sans-serif;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.result-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

.result-details p {
    font-family: 'Questrial', sans-serif;
    color: #666;
    margin-bottom: 15px;
}

.contact-info {
    text-align: left;
}

.contact-info p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.contact-info strong {
    color: #333;
}

/* Safari-specific fixes (solo si es necesario) */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .modal-overlay {
        -webkit-backdrop-filter: blur(5px);
    }
}


/* Página de Login */
.login-container {
    height: 100vh;
    background: url('FotosBoda/Login.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-overlay {
    background: rgba(249, 249, 249, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin: 0 20px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.wedding-title {
    font-family: 'Times New Roman', serif;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
    text-transform: uppercase;
}

.login-subtitle {
    font-family: 'Questrial', sans-serif;
    font-size: 1.0rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 300;
}

.wedding-input {
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.wedding-input:focus {
    border-color: #666;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    outline: none;
    background: white;
}

.wedding-btn {
    background: linear-gradient(135deg, #333, #555);
    border: none;
    color: white !important;
    padding: 12px 35px;
    font-size: 1.0rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Questrial', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
}

.wedding-btn:hover {
    background: linear-gradient(135deg, #222, #444);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: white !important;
}

.wedding-btn:active,
.wedding-btn:focus {
    color: white !important;
    text-decoration: none !important;
}

.wedding-btn-outline {
    background: transparent;
    border: 2px solid #333;
    color: #333;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Questrial', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.wedding-btn-outline:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.wedding-btn-large {
    background: linear-gradient(135deg, #333, #555);
    border: none;
    color: white !important;
    padding: 18px 45px;
    font-size: 1.2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-family: 'Questrial', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    display: inline-block;
}

.wedding-btn-large:hover {
    background: linear-gradient(135deg, #222, #444);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: white !important;
}

.wedding-btn-large:active,
.wedding-btn-large:focus {
    color: white !important;
    text-decoration: none !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
    font-family: 'Questrial', sans-serif;
}

/* Página de Invitación */
.full-image-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.full-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

.info-section {
    background-color: #F9F9F9 !important;
    background: #F9F9F9 !important;
    padding: 80px 0;
    text-align: center;
}

.ceremony-info {
    background: #f1f1f1;
    padding: 50px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.ceremony-title {
    font-family: 'Times New Roman', serif;
    font-size: 2.4rem;
    color: #2c2c2c;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.venue-name {
    font-family: 'Times New Roman', serif;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
}

.venue-address {
    font-family: 'Questrial', sans-serif;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 300;
}

.map-buttons {
    margin-top: 30px;
}

.confirmation-section {
    height: 100vh;
    background: url('FotosBoda/Fondo2.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.confirmation-overlay {
    background: rgba(249, 249, 249, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin: 0 20px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.confirmation-content {
    padding: 20px;
}

.confirmation-title {
    font-family: 'Times New Roman', serif;
    font-size: 2.4rem;
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.confirmation-text {
    font-family: 'Questrial', sans-serif;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 300;
}

.guest-info {
    font-family: 'Questrial', sans-serif;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 400;
    text-align: center;
}

.guest-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 10px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-overlay {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .wedding-title {
        font-size: 1.8rem;
    }
    
    .ceremony-title, .confirmation-title {
        font-size: 2.0rem;
    }
    
    .venue-name {
        font-size: 1.5rem;
    }
    
    .ceremony-info {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .confirmation-overlay {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .confirmation-content {
        padding: 15px;
    }
    
    .map-buttons .btn {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
    
    .map-buttons .me-3 {
        margin-right: 0 !important;
    }
}

@media (max-width: 576px) {
    .wedding-title {
        font-size: 1.4rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .wedding-input {
        font-size: 1rem;
        padding: 12px;
    }
    
    .wedding-btn, .wedding-btn-outline {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
    
    .wedding-btn-large {
        font-size: 1.0rem;
        padding: 15px 30px;
    }
}