/* ============================================
   VARIABLES COHERENTES CON PROFILE.PHP
   ============================================ */
:root {
    /* COLORES PRINCIPALES (igual que profile.php) */
    --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);
    position: relative;
    overflow-x: hidden;
}

/* Fondo con textura sutil */
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;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   HEADER ELEGANTE
   ============================================ */
header {
    margin-bottom: 3rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* LOGO CON ESTILO ELEGANTE */
.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo h1 {
    font-family: "Playfair Display", serif;
    font-size: 2.8rem;
    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;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-left: 2px solid var(--accent-primary);
}

/* USER INFO Y CONTROLES */
.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.user-greeting {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(201, 169, 110, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-gold);
}

/* ============================================
   BOTONES COHERENTES CON PROFILE.PHP
   ============================================ */
.modern-btn,
.modern-action-btn,
.modern-auth-btn,
.messages-btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(201, 169, 110, 0.15);
    color: var(--text-primary);
    border: 1.5px solid var(--border-gold);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.modern-btn::before,
.modern-action-btn::before,
.modern-auth-btn::before,
.messages-btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.modern-btn:hover::before,
.modern-action-btn:hover::before,
.modern-auth-btn:hover::before,
.messages-btn-modern:hover::before {
    left: 100%;
}

/* BOTÓN PRINCIPAL (REQUEST ACCESS) */
.modern-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: var(--bg-primary);
    font-weight: 700;
    padding: 16px 32px;
    width: 100%;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
}

/* BOTONES DE ACCIÓN */
.modern-action-btn {
    background: rgba(26, 26, 46, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.modern-action-btn:hover {
    background: rgba(201, 169, 110, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* BOTÓN DE ACCESO/EXIT */
.modern-auth-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: var(--bg-primary);
}

.modern-auth-btn.exit-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* BOTÓN DE MENSAJES */
.messages-btn-modern {
    background: rgba(26, 26, 46, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

/* ============================================
   BADGES COHERENTES
   ============================================ */
.message-badge-modern,
.notification-badge-modern {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 12px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
    border: 1px solid var(--border-gold);
}

/* ============================================
   VIDEO HERO
   ============================================ */
.video-hero {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.video-hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%, /* Más transparente */
        rgba(0, 0, 0, 0.2) 50%, /* Más transparente */
        rgba(0, 0, 0, 0.5) 100% /* Más transparente */
    );
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 1.2rem;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-gold);
}

/* ============================================
   LAYOUT PRINCIPAL - INVERTIDO
   ============================================ */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
    
    /* INVERTIR ORDEN: formulario a la izquierda, contenido público a la derecha */
    .main-content {
        grid-template-areas: "register public";
    }
    
    .public-content {
        grid-area: public;
    }
    
    .register-form,
    .user-section {
        grid-area: register;
    }
}

/* PANEL DERECHO (EXPERIENCE) - AHORA A LA DERECHA */
.public-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.video-in-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.video-in-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* LISTA DE ICONOS */
.icon-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.icon-list li {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.icon-list li:hover {
    background: rgba(201, 169, 110, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.icon-list li .text {
    font-weight: 600;
    color: var(--text-primary);
}

/* PANEL IZQUIERDO (FORMULARIO/USER SECTION) - AHORA A LA IZQUIERDA */
.register-form,
.user-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-light);
}

/* TÍTULOS */
.register-form h2,
.public-content h2,
.user-section h2 {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.register-form h2::after,
.public-content h2::after,
.user-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* FORMULARIOS */
.form-group {
    margin-bottom: 1.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    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;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

/* ACTION BUTTONS GRID */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* ============================================
   FOOTER ELEGANTE
   ============================================ */
.legal-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   SELECTOR DE IDIOMA - MEJORADO
   ============================================ */

/* Selector discreto para no logueados */
.language-switcher-mini {
    display: flex;
    gap: 5px;
    margin-right: 15px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.language-switcher-mini:hover {
    opacity: 1;
}

.lang-btn-mini {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.lang-btn-mini:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn-mini.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Selector completo para logueados */
.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.lang-btn {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s;
}

.lang-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.lang-btn.active {
    color: white;
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* MODAL DE IDIOMA */
.language-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.language-selector-box {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-large);
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.language-option {
    padding: 2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.language-option:hover,
.language-option.selected {
    background: rgba(201, 169, 110, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.language-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.language-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ============================================
   MENSAJES DE ESTADO
   ============================================ */
.error, .success, .warning {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.error {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
    color: #dc3545;
}

.success {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
    color: #28a745;
}

.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
    color: #ffc107;
}

/* ============================================
   NOTIFICACIONES MODERNAS
   ============================================ */
.modern-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 26px;
    border-radius: 18px;
    z-index: 10000;
    font-weight: 600;
    box-shadow: var(--shadow-large);
    transform: translateX(100%);
    transition: transform 0.4s ease;
    max-width: 350px;
    font-family: inherit;
    letter-spacing: 0.5px;
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.modern-notification.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.25) 100%);
    color: #ffffff;
}

.modern-notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.25) 100%);
    color: #ffffff;
}

.modern-notification.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.25) 100%);
    color: #ffffff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h2 {
        border-left: none;
        border-top: 2px solid var(--accent-primary);
        padding-top: 0.5rem;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .video-hero,
    .video-in-container {
        height: 300px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        grid-template-areas: none !important; /* Reset grid areas en móvil */
    }
    
    .public-content,
    .register-form,
    .user-section {
        order: 0; /* Reset order en móvil */
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .icon-list {
        grid-template-columns: 1fr;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo h2 {
        font-size: 0.9rem;
    }
    
    .modern-btn,
    .modern-action-btn,
    .modern-auth-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .register-form,
    .user-section,
    .public-content {
        padding: 1.5rem;
    }
    
    .register-form h2,
    .public-content h2,
    .user-section h2 {
        font-size: 1.5rem;
    }
}

/* UTILIDADES */
.no-wrap {
    white-space: nowrap;
}

.text-container-modern {
    background: rgba(10, 10, 21, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.register-form,
.public-content,
.user-section {
    animation: fadeIn 0.6s ease-out;
}

/* Efecto líquido sutil (opcional) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 169, 110, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 169, 110, 0.02) 0%, transparent 50%);
    animation: liquidMove 15s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes liquidMove {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.02) rotate(0.5deg); }
}

/* Tooltip */
.tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 5px;
    border: 1px solid var(--border-gold);
}

.icon-list li:hover .tooltip {
    display: block;
}

/* Mejorar visibilidad del video */
.video-hero video,
.video-in-container video {
    filter: brightness(1.05) contrast(1.05);
}