/* ============================================
   VARIABLES COHERENTES CON PROFILE.PHP E INDEX.PHP
   ============================================ */
:root {
    /* COLORES PRINCIPALES */
    --accent-primary: #C9A96E;            /* Dorado elegante */
    --accent-secondary: #B89A5E;          /* Dorado más oscuro */
    --accent-light: #E8D9B0;              /* Dorado claro */
    
    /* FONDOS - MÁS OSCUROS */
    --bg-primary: #0a0a15;                /* Negro azulado muy oscuro */
    --bg-secondary: #101022;              /* Azul noche más oscuro */
    --bg-dark: #000000;                   /* Negro puro */
    --bg-glass: rgba(10, 10, 21, 0.95);   /* Fondo glass más oscuro */
    
    /* TEXTOS */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* BORDES */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.2);
    --border-gold: rgba(201, 169, 110, 0.4);
    
    /* SOMBRAS */
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 15px 50px rgba(0, 0, 0, 0.4);
    --shadow-large: 0 25px 70px rgba(0, 0, 0, 0.5);
    
    /* EFECTOS GLASS */
    --glass-bg: rgba(10, 10, 21, 0.9);
    --glass-border: rgba(201, 169, 110, 0.2);
    --glass-blur: blur(25px);
}

/* ============================================
   RESET Y TIPOGRAFÍA ELEGANTE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "Cormorant Garamond", "Playfair Display", serif;
    line-height: 1.6;
    min-height: 100vh;
    background: var(--bg-dark); /* Fondo negro sólido */
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden; /* Evitar scroll */
}

/* Fondo con textura sutil y degradado oscuro */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(201, 169, 110, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 169, 110, 0.02) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    pointer-events: none;
    z-index: -2;
}

/* Capa negra semitransparente para mayor oscuridad */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   CONTENEDOR PRINCIPAL - COMPACTO
   ============================================ */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1100px; /* Reducido para ser más compacto */
    max-height: 90vh; /* Máximo 90% de la altura de la ventana */
    min-height: 600px; /* Altura mínima reducida */
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px; /* Radio más pequeño */
    overflow: hidden;
    box-shadow: 
        var(--shadow-large),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}

/* ============================================
   COLUMNA DEL VIDEO - COMPACTA Y CLARA
   ============================================ */
.video-column {
    flex: 1;
    position: relative;
    min-height: 300px;
    overflow: hidden;
    background: #000; /* Fondo negro para video */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-column video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Usar cover para llenar sin espacios */
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    filter: brightness(1.1) contrast(1.05); /* Mejorar brillo y contraste */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%, /* REDUCIDO de 0.9 a 0.4 */
        rgba(0, 0, 0, 0.2) 50%, /* REDUCIDO de 0.7 a 0.2 */
        rgba(0, 0, 0, 0.4) 100% /* REDUCIDO de 0.9 a 0.4 */
    );
    z-index: 1;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 1rem;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   COLUMNA DEL FORMULARIO - MÁS COMPACTA
   ============================================ */
.form-column {
    flex: 1;
    padding: 2.5rem 2.5rem 2rem; /* Padding reducido */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(10, 10, 21, 0.7);
    max-height: 100%;
    overflow-y: auto; /* Scroll interno si es necesario */
    overflow-x: hidden;
}

.login-form {
    width: 100%;
    max-width: 380px; /* Ancho máximo reducido */
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   LOGO Y DECORACIÓN - MÁS COMPACTO
   ============================================ */
.form-logo {
    text-align: center;
    margin-bottom: 2rem; /* Reducido */
}

.form-logo h1 {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem; /* Reducido de 3rem */
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(201, 169, 110, 0.3);
}

.form-logo p {
    color: var(--text-secondary);
    font-size: 1rem; /* Reducido de 1.1rem */
    margin-bottom: 1.2rem; /* Reducido */
    font-weight: 500;
    letter-spacing: 0.5px;
}

.logo-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem; /* Reducido de 1rem */
    margin-top: 1.2rem; /* Reducido */
}

.decoration-line {
    width: 50px; /* Reducido de 60px */
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.luxury-dot {
    width: 5px; /* Reducido de 6px */
    height: 5px; /* Reducido de 6px */
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-primary); /* Reducido */
}

/* ============================================
   MENSAJES DE ESTADO - COMPACTO
   ============================================ */
.error, .success {
    padding: 1rem; /* Reducido */
    border-radius: 10px; /* Reducido */
    margin-bottom: 1.2rem; /* Reducido */
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
    font-size: 0.95rem; /* Reducido */
}

.error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

/* ============================================
   FORMULARIO - COMPACTO
   ============================================ */
.form-group {
    margin-bottom: 1.5rem; /* Reducido de 1.8rem */
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem; /* Reducido */
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem; /* Reducido */
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 13px 18px; /* Reducido */
    border-radius: 10px; /* Reducido */
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem; /* Reducido de 1.1rem */
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 2px rgba(201, 169, 110, 0.1), /* Reducido de 3px */
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* BOTÓN PARA MOSTRAR/OCULTAR CONTRASEÑA */
.password-toggle {
    position: absolute;
    right: 12px; /* Ajustado */
    top: 37px; /* Ajustado por padding reducido */
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px; /* Reducido */
    border-radius: 5px; /* Reducido */
    transition: all 0.3s ease;
    z-index: 2;
    font-size: 0.9rem; /* Reducido */
}

.password-toggle:hover {
    color: var(--accent-primary);
    background: rgba(201, 169, 110, 0.1);
}

/* ============================================
   BOTÓN DE ENVÍO - COMPACTO
   ============================================ */
.submit-container {
    margin: 2rem 0; /* Reducido de 2.5rem */
}

#submitBtn {
    width: 100%;
    padding: 14px; /* Reducido de 16px */
    border-radius: 10px; /* Reducido */
    border: none;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #0a0a15;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem; /* Reducido de 1.2rem */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(201, 169, 110, 0.3), /* Reducido */
        0 0 0 1px rgba(201, 169, 110, 0.2);
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
}

#submitBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

/* ============================================
   ENLACES - COMPACTO
   ============================================ */
.links-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem; /* Reducido */
    margin: 1.2rem 0; /* Reducido */
}

.links-container a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Reducido */
    padding: 0.4rem 0.8rem; /* Reducido */
    border-radius: 6px; /* Reducido */
    position: relative;
    font-size: 0.9rem; /* Reducido */
}

.links-container a:hover {
    color: var(--accent-primary);
    background: rgba(201, 169, 110, 0.05);
}

.resend-link {
    display: inline-block;
    margin-top: 0.8rem; /* Reducido */
    color: var(--accent-primary) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem; /* Reducido */
}

/* ============================================
   ENLACE DE REGISTRO - COMPACTO
   ============================================ */
.register-link {
    margin-top: auto;
    margin-bottom: 1.5rem; /* Reducido de 2.5rem */
    text-align: center;
    padding-top: 1.2rem; /* Reducido */
    border-top: 1px solid var(--border-color);
}

.register-link p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem; /* Reducido */
    font-size: 1rem; /* Reducido de 1.1rem */
    letter-spacing: 0.5px;
}

.register-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem; /* Reducido */
    padding: 12px 24px; /* Reducido */
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.1) 0%, rgba(184, 154, 94, 0.1) 100%);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 10px; /* Reducido */
    font-weight: 700;
    font-size: 1rem; /* Reducido de 1.1rem */
    border: 1.5px solid var(--border-gold); /* Reducido de 2px */
    transition: all 0.3s ease;
    box-shadow: 
        0 3px 12px rgba(201, 169, 110, 0.1), /* Reducido */
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.register-link a:hover {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.2) 0%, rgba(184, 154, 94, 0.2) 100%);
    transform: translateY(-2px); /* Reducido de -3px */
    box-shadow: 
        0 6px 20px rgba(201, 169, 110, 0.2), /* Reducido */
        0 0 0 1px rgba(201, 169, 110, 0.3);
    border-color: var(--accent-primary);
}

/* ============================================
   FOOTER LEGAL - COMPACTO
   ============================================ */
.legal-footer {
    position: relative;
    margin-top: 1.5rem; /* Reducido de 2rem */
    padding: 1.2rem 1.5rem; /* Reducido */
    text-align: center;
    background: rgba(10, 10, 21, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    border-radius: 0 0 20px 20px;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 1rem; /* Reducido de 1.5rem */
    margin-bottom: 0.8rem; /* Reducido */
    flex-wrap: wrap;
}

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem; /* Reducido de 0.9rem */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Reducido */
    padding: 0.4rem; /* Reducido */
    border-radius: 5px; /* Reducido */
}

.legal-links a:hover {
    color: var(--accent-primary);
    background: rgba(201, 169, 110, 0.05);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem; /* Reducido de 0.85rem */
    opacity: 0.7;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN - DESKTOP PRIMERO
   ============================================ */

/* Desktop específico - pantallas grandes */
@media (min-width: 1200px) {
    .login-container {
        max-width: 1000px; /* Más compacto para pantallas grandes */
        min-height: 550px; /* Más bajo */
        max-height: 85vh; /* Más bajo */
    }
    
    .video-column {
        min-height: 550px; /* Igual que el contenedor */
    }
    
    .form-column {
        padding: 2rem 2.5rem 1.8rem; /* Más compacto */
    }
}

/* Desktop estándar */
@media (min-width: 1025px) and (max-width: 1199px) {
    .login-container {
        max-width: 95vw;
        min-height: 500px;
        max-height: 85vh;
    }
    
    .video-column {
        min-height: 500px;
    }
    
    .form-column {
        padding: 1.8rem 2rem 1.5rem;
    }
    
    .form-logo h1 {
        font-size: 2.2rem; /* Más pequeño */
    }
}

/* Tablet grande / laptop pequeña */
@media (max-width: 1024px) {
    body {
        overflow: auto; /* Permitir scroll en tablet/móvil */
        padding: 0.8rem;
    }
    
    .login-container {
        flex-direction: column;
        max-width: 600px;
        min-height: auto;
        max-height: none;
        margin: 0 auto;
    }
    
    .video-column {
        height: 280px;
        min-height: 280px;
    }
    
    .video-column video {
        object-fit: cover;
    }
    
    .form-column {
        padding: 2rem;
        justify-content: center;
        overflow-y: visible;
    }
    
    .form-logo h1 {
        font-size: 2.2rem;
    }
    
    .register-link {
        margin-top: 1.5rem;
        margin-bottom: 1.2rem;
    }
}

/* Tablet pequeña */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        justify-content: flex-start;
        background: #000;
    }
    
    .login-container {
        border-radius: 16px;
        min-height: auto;
        margin-bottom: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .video-column {
        height: 220px;
        min-height: 220px;
    }
    
    .form-column {
        padding: 1.5rem;
    }
    
    .form-logo h1 {
        font-size: 2rem;
    }
    
    .form-logo p {
        font-size: 0.95rem;
    }
    
    .links-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .legal-footer {
        position: relative;
        margin-top: 1.2rem;
        margin-bottom: 0;
        padding: 1rem;
        border-radius: 0 0 16px 16px;
    }
    
    .register-link {
        margin-top: 1.2rem;
        margin-bottom: 1rem;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .video-column {
        height: 180px;
        min-height: 180px;
    }
    
    .form-column {
        padding: 1.2rem;
    }
    
    .form-logo h1 {
        font-size: 1.8rem;
    }
    
    .form-group input {
        padding: 11px 14px;
        font-size: 0.95rem;
    }
    
    #submitBtn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .register-link a {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.6rem;
    }
}

/* Pantallas muy altas */
@media (min-height: 900px) and (min-width: 1025px) {
    .login-container {
        max-height: 80vh;
        min-height: 650px;
    }
    
    .video-column {
        min-height: 650px;
    }
}

/* Pantallas muy pequeñas en altura */
@media (max-height: 700px) and (min-width: 1025px) {
    .login-container {
        max-height: 95vh;
        min-height: 450px;
    }
    
    .video-column {
        min-height: 450px;
    }
    
    .form-column {
        padding: 1.5rem 2rem 1.2rem;
    }
    
    .form-logo {
        margin-bottom: 1.5rem;
    }
    
    .form-logo h1 {
        font-size: 2rem;
    }
    
    .submit-container {
        margin: 1.5rem 0;
    }
}

/* Prevenir zoom en iOS en campos de entrada */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Mejorar scroll en iOS */
@media screen and (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .form-column {
        -webkit-overflow-scrolling: touch;
    }
}

/* Asegurar que en desktop no haya scroll */
@media (min-width: 1025px) {
    html, body {
        overflow: hidden;
        height: 100%;
    }
}