:root {
    --primary: #FFA600;
    --primary-dark: #DE9300;
    --bg-light: #F4F7F9;
    --text-dark: #2C3E50;
    --white: #FFFFFF;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Segoe UI', sans-serif;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.main-header {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container { display: flex; justify-content: space-between; align-items: center; }

.logo-area { display: flex; align-items: center; gap: 12px; }
.nav-logo { width: 50px; height: auto; }
.logo-text h1 { font-size: 20px; color: var(--primary-dark); margin: 0; }
.logo-text p { font-size: 12px; color: #7f8c8d; margin: 0; }

/* NAV */
.main-nav { display: flex; gap: 20px; align-items: center; }
.nav-link { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 14px; transition: 0.3s; }
.nav-link.active, .nav-link:hover { color: var(--primary); }
.btn-support { background: var(--primary); color: white; border: none; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; }

/* TABLA CORPORATIVA */
.content-area { padding-top: 40px; }
.table-container { background: var(--white); border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); overflow: hidden; }

.table-header { padding: 25px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 12px; color: #999; }
.search-box input { padding: 10px 10px 10px 35px; border: 1px solid #ddd; border-radius: 8px; width: 250px; }

.version-table { width: 100%; border-collapse: collapse; }
.version-table th { background: #fcfcfc; padding: 15px; text-align: left; font-size: 13px; color: #7f8c8d; text-transform: uppercase; }
.version-table td { padding: 18px 15px; border-bottom: 1px solid #f9f9f9; font-size: 14px; }

.badge-new { background: #e3f9e5; color: #1f9d55; padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: bold; margin-left: 5px; }
.status-stable { color: #27ae60; font-weight: bold; }

.btn-download { background: #f8f9fa; border: 1px solid #ddd; padding: 8px 15px; border-radius: 8px; cursor: pointer; transition: 0.3s; }
.btn-download:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-download i { margin-right: 5px; animation: bounce 2s infinite; }

/* ANIMACIONES */
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-3px);} }

/* MODAL OVERLAY (AISLADO) */
/* MODAL OVERLAY (AISLADO) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active { 
    display: flex; 
}

.subscription-modal {
    background: white;
    width: 90%;
    max-width: 450px; /* Un poco más ancho para mejor legibilidad */
    border-radius: 20px;
    position: relative;
    animation: slideUp 0.3s ease;
    overflow: hidden; /* Evita que contenido interno sobresalga */
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

@keyframes slideUp { 
    from { transform: translateY(30px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

/* CABECERA */
.modal-header { 
    padding: 30px 30px 10px; 
    text-align: center; 
}

.modal-logo { 
    width: 65px; 
    height: 65px; 
    background: var(--primary); 
    color: white; 
    border-radius: 18px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto 15px; 
    font-size: 28px; 
}

.modal-title {
    font-size: 22px;
    color: #333;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: #666;
}

/* CONTENIDO Y FORMULARIO */
.modal-content {
    padding: 10px 30px; /* Margen interno para que nada toque los bordes */
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
    text-align: left;
}

.form-input { 
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid #ddd; 
    border-radius: 10px; 
    box-sizing: border-box; /* IMPORTANTE: evita que el input se salga del div */
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--primary);
}

/* CHECKBOX SECCIÓN */
.terms-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
    text-align: left;
}

.terms-group input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
}

.terms-label { 
    font-size: 12.5px; 
    color: #555; 
    line-height: 1.4;
    cursor: pointer;
}

/* BOTONES */
.modal-buttons { 
    display: flex; 
    gap: 12px; 
    padding: 10px 30px 30px; 
}

.download-btn { 
    flex: 2; 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 14px; 
    border-radius: 12px; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cancel-btn { 
    flex: 1; 
    background: #f0f0f0; 
    border: none; 
    padding: 14px; 
    border-radius: 12px; 
    cursor: pointer; 
    color: #666;
    font-weight: 600;
}

.cancel-btn:hover { background: #e5e5e5; }

.close-modal { 
    position: absolute; 
    top: 15px; 
    right: 20px; 
    cursor: pointer; 
    color: #bbb; 
    font-size: 20px;
    transition: color 0.3s;
}

.close-modal:hover { color: #888; }

/* Estilos adicionales para campos específicos de soporte */

/* Estilo para los inputs dentro de este formulario */
#supportForm .form-input {
    width: 100%;
    box-sizing: border-box;
}


#supportForm select.form-input {
    cursor: pointer;
    appearance: none; /* Quita el estilo por defecto del sistema */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

#supportForm textarea.form-input {
    padding-top: 15px;
    line-height: 1.5;
}

#supportForm .form-input:focus {
    border-color: #007BFF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Contenedor de fila solo dentro de supportForm */
#supportForm .form-row {
    display: flex;
    gap: 20px; /* Espacio entre columnas */
    margin-bottom: 5px;
}
/* Cada grupo dentro de la fila toma el 50% */
#supportForm .form-row .form-group {
    flex: 1;
    min-width: 0; /* Previene desbordamiento en flex */
}

/* Ajuste para dispositivos móviles (vuelve a una columna) */
@media (max-width: 480px) {
    #supportForm .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Asegurar que las etiquetas flotantes no se corten */
#supportForm .form-group {
    position: relative;
    margin-bottom: 20px;
}


/*errror de al descargar las versiones************************************************************************/
/* La franja superior del modal */
.alert-modal {
    border-top: 6px solid #e74c3c !important; /* Grosor y color de la franja */
    overflow: visible; /* Permite que las ondas del icono no se corten */
}
/* --- Efecto de Onda (Pulse) --- */
.pulse-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Movimiento flotante del icono */
    animation: floating 2s ease-in-out infinite; 
}

.pulse-container::before,
.pulse-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #e74c3c;
    opacity: 0.6;
    z-index: -1;
    /* Animación de onda */
    animation: pulse-red 2s linear infinite;
}

.pulse-container::after {
    animation-delay: 1s; /* Segunda onda con retraso */
}

/* --- Animaciones --- */

/* Onda expansiva roja */
@keyframes pulse-red {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Movimiento flotante suave */
@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Mantener el temblor original del modal */
.shake-animation {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
}

/* Estilos de mensaje de error interno */
.status-message-container.error {
    display: block;
    background: #fff5f5;
    color: #e74c3c;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    animation: fadeInDown 0.3s ease;
}

/*-------------LOGIN------------------------------------*/
/* Efecto de fondo desenfocado para el overlay */
.modal-overlay.blur-bg {
    background-color: rgba(0, 0, 0, 0.7); /* Oscurece más el fondo (70%) */
    backdrop-filter: blur(8px);           /* Aplica el desenfoque */
    -webkit-backdrop-filter: blur(8px);    /* Compatibilidad para Safari */
    display: none;                         /* Se activa con la clase .active */
}

.modal-overlay.active {
    display: flex !important;
}

/* Estilo de etiquetas para que no tengan fondo azul (Estilo Limpio) */
#loginForm .floating-label-login {
    background: white;
    color: #007BFF;
    padding: 0 5px;
    font-size: 0.85rem;
    font-weight: 600;
    position: absolute;
    top: -10px;
    left: 12px;
    z-index: 10;
}

/* Consistencia de inputs */
#loginForm .form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#loginForm .form-input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}
/* Posicionamiento de iconos dentro del input */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #007BFF;
    font-size: 1.1rem;
}

#loginForm .form-input {
    padding-left: 40px !important; /* Espacio para el icono */
    height: 45px;
}

/* Animación de apertura (Clases que disparará JS) */
.unlock-animation {
    animation: unlockKey 0.6s forwards;
}

@keyframes unlockKey {
    0% { transform: rotate(0deg); scale: 1; }
    50% { transform: rotate(-15deg) scale(1.2); }
    100% { transform: rotate(0deg) scale(1); }
}

.fade-out-modal {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s ease;
}
/* Contenedor relativo para que el icono se posicione respecto a este div */
.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Posicionamiento absoluto del icono */
.input-group-custom .input-icon {
    position: absolute;
    left: 12px; /* Distancia desde el borde izquierdo */
    z-index: 5;
    color: #007BFF;
    pointer-events: none; /* Evita que el icono interfiera con el clic */
}

/* Ajuste del Input para dejar espacio al icono */
#loginForm .form-input {
    width: 100%;
    padding: 12px 12px 12px 40px !important; /* El 40px a la izquierda es VITAL */
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box; /* Asegura que el padding no agrande el input */
}

/* Ajuste de etiquetas para que no choquen */
.floating-label-login {
    position: absolute;
    top: -10px;
    left: 12px;
    background: white;
    padding: 0 5px;
    font-size: 0.85rem;
    z-index: 10;
}

/* Reduce el espacio que genera el formulario al final */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espaciado general entre grupos */
}

/* Elimina márgenes por defecto de los párrafos en el footer */
.modal-footer p {
    margin-bottom: 2px !important;
}

/* Estilo para el enlace de olvido de contraseña */
.modal-footer a {
    display: inline-block;
    margin-top: 2px;
}

/* Asegura que el contenedor de botones no tenga márgenes excesivos */
.modal-buttons {
    margin-top: 10px;
}

/**biblioteca............................*/
/* ==========================================
   BIBLIOTECA DE VIDEOS - ESTILO NETFLIX 3D
   ========================================== */

/* 1. Contenedores Principales */
.netflix-gallery {
    padding: 60px 0 20px 0;
    background: #f4f7f6; /* Fondo oscuro corporativo */
    perspective: 1000px;  /* Profundidad para efectos 3D */
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: 100%;
    padding: 40px 0; /* Espacio para que el zoom no se corte */
}

/* 2. Tarjeta de Video 3D */
.video-card-3d {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
    transform-style: preserve-3d;
    max-width: 500px;
    margin: 0 auto;
}

.video-card-3d:hover {
    transform: scale(1.05) translateZ(30px) rotateY(5deg);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   REPRODUCTOR DE VIDEO - CONTROLES NATIVOS
   ========================================== */

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Relación 16:9 */
    background: #000;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    /* Eliminado transform: scale(1.02) que causaba desfase en controles */
}



/* 4. Información del Video */
.video-details {
    padding: 20px;
    color: #ffffff;
}

.video-details h3 {
    font-size: 1.5rem;
    color: #007BFF;
    margin: 10px 0;
}

.video-details p {
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.4;
}

.badge {
    background: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 5. Iconos de Materiales Didácticos */
.material-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.material-icons i {
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.material-icons i:hover {
    transform: translateY(-8px) scale(1.2);
}

/* Colores específicos de archivos */
.pdf-icon   { color: #e74c3c; }
.excel-icon { color: #27ae60; }
.word-icon  { color: #2980b9; }
.zip-icon   { color: #f39c12; }

/* 6. Pie de Página y Navegación */
.gallery-footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #252525;
    color: #666;
    font-size: 0.8rem;
    margin-top: 40px;
}

.swiper-button-next, 
.swiper-button-prev {
    color: #007BFF;
    transition: transform 0.3s ease;
}

.swiper-button-next:hover, 
.swiper-button-prev:hover {
    transform: scale(1.2);
}

/* Restauración de color de fondo anterior */
.video-library-mix {
    padding: 40px 20px;
    background: #f4f7f6; /* Color original restaurado */
}

.main-layout-video {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Lista de videos (Mix lateral) */
.video-playlist {
    flex: 0 0 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    max-height: 550px;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    background: #007BFF;
    color: white;
    padding: 15px;
    font-weight: bold;
}

.playlist-items {
    overflow-y: auto;
}

.item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
    border-bottom: 1px solid #eee;
}

.item:hover { background: #e9ecef; }
.item.active { background: #d1e7ff; border-left: 4px solid #007BFF; }

.item img { width: 80px; border-radius: 4px; }
.item span { font-size: 0.85rem; color: #333; font-weight: 500; }

/* Ajuste del área de reproducción */
.video-display-area {
    flex: 1;
}

/* Mejora visual para la tarjeta sin interferir con el iframe */
.video-card-3d {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
    transform-style: preserve-3d;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* El hover ahora solo afecta la tarjeta, NO el iframe interno */
.video-card-3d:hover {
    transform: scale(1.03) translateZ(20px);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Ajuste para que el iframe no herede transformaciones 3D problemáticas */
.video-card-3d:hover .video-container iframe {
    transform: none;
}

.video-details { color: #333; }
.video-details p { color: #666; }