/**
 * FINAL MODAL CSS
 * Modal que aparece al terminar la secuencia AR
 */

.final-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
}

.final-modal.active {
    display: flex;
    pointer-events: auto;
    animation: fadeIn 0.4s ease;
}

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

/* Contenedor del contenido */
.final-modal-content {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 90%);
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    padding: 2rem 1.5rem 2.5rem;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Imagen del robot */
.final-modal-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border: 4px solid #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Texto de subtítulos */
.final-modal-caption {
    text-align: center;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    padding: 0 1rem;
    min-height: 2.5rem;
}

/* Banner con URL */
.final-modal-banner {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.final-modal-banner-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Separador */
.final-modal-divider {
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #667eea 50%, transparent 100%);
    border-radius: 2px;
}

/* Texto de llamada a la acción */
.final-modal-cta-text {
    text-align: center;
    font-size: 1rem;
    color: #444;
    font-weight: 500;
}

/* Botón de acción */
.final-modal-button {
    width: 100%;
    max-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.final-modal-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.final-modal-button:hover::before,
.final-modal-button:active::before {
    width: 300px;
    height: 300px;
}

.final-modal-button:hover,
.final-modal-button:active {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.final-modal-button .material-icons {
    font-size: 28px;
    position: relative;
    z-index: 1;
}

.final-modal-button span:not(.material-icons) {
    position: relative;
    z-index: 1;
}

/* Animación de pulso en el botón */
@keyframes pulse {
    0% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.7);
    }
    100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
}

.final-modal-button.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 400px) {
    .final-modal-content {
        padding: 1.5rem 1rem 2rem;
        gap: 1.2rem;
    }
    
    .final-modal-image {
        width: 150px;
        height: 150px;
    }
    
    .final-modal-banner-text {
        font-size: 1rem;
    }
    
    .final-modal-button {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

/* Landscape */
@media (orientation: landscape) and (max-height: 500px) {
    .final-modal-content {
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .final-modal-image {
        width: 120px;
        height: 120px;
    }
}
