/* =========================================
   WEBENGINE CMS - HEXTECH EVOLVED (VIBRANT EDITION)
   Style: Dark / Neon / Rounded / Glassmorphism
   File: main_hextech.css (FINAL PRODUCTION)
   ========================================= */

/* --- VARIABLES DE COLOR (MEJORADAS) --- */
:root {
    /* Paleta de colores más viva */
    --theme-main: #a3e635;        /* Verde Lima Eléctrico */
    --theme-bright: #bef264;      /* Verde Brillante (Hover) */
    --theme-dark: #365314;        /* Verde Bosque Profundo */
    --theme-glow: rgba(163, 230, 53, 0.6); /* Resplandor intenso */
    
    /* Fondos con profundidad */
    --bg-deep: #020402;           /* Fondo base */
    --bg-panel: linear-gradient(145deg, rgba(10, 20, 10, 0.9), rgba(5, 10, 5, 0.95));
    --border-color: rgba(163, 230, 53, 0.2);
    
    /* Texto */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
}

/* --- ESTILOS GENERALES --- */
body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    margin: 0; padding: 0;
}

a { color: var(--theme-main); text-decoration: none; transition: 0.3s; }
a:hover { color: #fff; text-shadow: 0 0 15px var(--theme-main); text-decoration: none; }

/* --- BACKGROUND --- */
.main-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: 
        radial-gradient(circle at center, rgba(63, 98, 18, 0.15), rgba(0,0,0,0.8)),
        url('../img/imperiamucms_bg.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
}

/* --- NAVBAR MEJORADO (EFECTO CRISTAL) --- */
.hybrid-navbar {
    background: rgba(5, 10, 5, 0.85);
    border-bottom: 1px solid rgba(163, 230, 53, 0.3);
    height: 80px;
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(15px); /* Desenfoque fuerte */
    -webkit-backdrop-filter: blur(15px);
}

.container-nav {
    max-width: 1600px; margin: 0 auto; padding: 0 30px;
    height: 100%;
    display: flex; justify-content: space-between; align-items: center;
}

/* Logo Pequeño con brillo */
.nav-logo-corner img {
    max-height: 50px;
    filter: drop-shadow(0 0 5px rgba(163, 230, 53, 0.3));
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-logo-corner img:hover { filter: drop-shadow(0 0 15px var(--theme-main)); transform: scale(1.1); }

/* Enlaces del Menú (Modernizados) */
.nav-links li a {
    font-family: 'Oswald', sans-serif; font-size: 15px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
    position: relative; padding: 10px 0; transition: 0.3s;
}
.nav-links li a:hover { 
    color: var(--theme-main); 
    text-shadow: 0 0 10px var(--theme-main);
    transform: translateY(-2px);
}
/* Línea animada inferior */
.nav-links li a::after {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 0%; height: 3px;
    background: linear-gradient(90deg, var(--theme-main), var(--theme-bright));
    transition: 0.3s ease; transform: translateX(-50%); border-radius: 2px;
    box-shadow: 0 0 10px var(--theme-main);
}
.nav-links li a:hover::after { width: 100%; }

/* Acciones Derecha */
.nav-actions { display: flex; align-items: center; gap: 20px; }
.flags-container { display: flex; gap: 10px; border-right: 1px solid rgba(255,255,255,0.1); padding-right: 15px; }
.flags-container img { width: 22px; opacity: 0.8; transition: 0.3s; cursor: pointer; border-radius: 2px; }
.flags-container img:hover { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* Botones Nav (Redondeados) */
.btn-nav {
    font-family: 'Oswald', sans-serif; font-size: 13px; font-weight: 700;
    padding: 8px 20px; border-radius: 30px; /* Redondo */
    display: flex; gap: 8px; align-items: center; transition: 0.3s;
}
.btn-outline { 
    border: 1px solid var(--theme-main); color: var(--theme-main); background: transparent; 
}
.btn-outline:hover { 
    background: var(--theme-main); color: #000; box-shadow: 0 0 20px var(--theme-glow); 
}
.btn-fill { 
    background: linear-gradient(135deg, var(--theme-main), #4d7c0f); 
    color: #000; border: none; 
}
.btn-fill:hover { 
    background: #fff; box-shadow: 0 0 25px var(--theme-main); transform: translateY(-2px); 
}

/* --- HERO SECTION --- */
.hero-section, .hero-section-integrated {
    margin-top: 80px;
    padding: 120px 0 40px 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-logo-container { position: relative; display: inline-block; }

.big-hero-logo {
    max-height: 250px; width: auto; position: relative; z-index: 2;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
    animation: floatingLogo 3s ease-in-out infinite;
}

.hero-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--theme-glow) 0%, transparent 70%);
    z-index: 1; opacity: 0.6; animation: pulseGlow 3s infinite;
}

@keyframes floatingLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseGlow { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; } }


/* --- CONTENEDORES GLOBALES (Bordes Suaves) --- */
.module-container {
    background: linear-gradient(160deg, rgba(15, 25, 15, 0.9), rgba(5, 10, 5, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border-radius: 16px; /* Bordes suaves */
    margin-bottom: 50px;
    min-height: 400px;
    position: relative;
}
/* Línea superior brillante */
.module-container::before {
    content: ''; position: absolute; top: 0; left: 20%; width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--theme-main), transparent);
    box-shadow: 0 0 15px var(--theme-main);
}

/* Títulos de Páginas (Degradado) */
.page-title {
    background: linear-gradient(90deg, rgba(163, 230, 53, 0.15), transparent) !important;
    border-left: 4px solid var(--theme-main) !important;
    color: #fff !important;
    font-family: 'Oswald', sans-serif;
    font-size: 28px !important;
    padding: 15px 25px !important;
    margin-bottom: 30px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0 12px 12px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* =========================================
   FORMS & INPUTS (MODERNOS)
   ========================================= */
.form-group-toxic { margin-bottom: 25px; }
.form-group-toxic label {
    display: block; font-family: 'Oswald', sans-serif; color: var(--theme-main);
    text-transform: uppercase; font-size: 13px; letter-spacing: 1px; margin-bottom: 8px;
}
.form-control, input[type="text"], input[type="password"], input[type="email"], select, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important; 
    border-radius: 12px !important; /* Input redondo */
    padding: 12px 20px !important;
    transition: 0.3s ease;
    font-family: 'Roboto', sans-serif;
}
.form-control:focus, input:focus {
    background: rgba(0, 0, 0, 0.6) !important;
    border-color: var(--theme-main) !important; 
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.2) !important; 
    outline: none !important;
}

/* BOTONES GLOBALES (Píldora) */
.btn, .btn-primary, .btn-success, .btn-info, button[type="submit"] {
    background: linear-gradient(135deg, #3f6212 0%, #1a2e05 100%) !important;
    border: 1px solid #65a30d !important;
    color: #fff !important; font-family: 'Oswald', sans-serif !important; 
    text-transform: uppercase; font-weight: bold; 
    border-radius: 30px !important; /* Botón Píldora */
    padding: 10px 30px; transition: 0.4s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}
.btn:hover, button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--theme-main) 0%, #4d7c0f 100%) !important;
    border-color: #bef264 !important;
    color: #000 !important; 
    box-shadow: 0 0 25px var(--theme-glow) !important;
    transform: translateY(-3px);
}
.btn-danger { 
    background: linear-gradient(135deg, #991b1b, #450a0a) !important; 
    border-color: #ef4444 !important; 
}
.btn-danger:hover { background: #ef4444 !important; box-shadow: 0 0 20px rgba(239, 68, 68, 0.5) !important; }

/* Login Box */
.login-module-wrapper { display: flex; justify-content: center; padding: 40px 0; }
.login-box-container {
    width: 100%; max-width: 450px; background: rgba(10, 15, 10, 0.8);
    border: 1px solid rgba(255,255,255,0.1); padding: 40px; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6); position: relative; backdrop-filter: blur(10px);
}
/* Botón Login Grande */
.btn-toxic-submit {
    width: 100%; padding: 15px; font-size: 16px; letter-spacing: 2px;
}

/* --- TABLAS MODERNAS --- */
.table { background-color: transparent !important; color: var(--text-main); margin-top: 20px; }
.table thead tr th {
    background-color: rgba(163, 230, 53, 0.05); 
    border-bottom: 2px solid var(--theme-main) !important;
    color: var(--theme-main); font-family: 'Oswald', sans-serif; 
    font-size: 15px; text-transform: uppercase; border-top: none !important;
    padding: 15px;
}
.table tbody tr td { border-top: 1px solid rgba(255,255,255,0.05) !important; padding: 15px; vertical-align: middle; }
.table-hover > tbody > tr:hover { 
    background-color: rgba(163, 230, 53, 0.1) !important; 
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

/* --- FOOTER --- */
.hybrid-footer {
    background: radial-gradient(circle at center top, #0f1c0f, #020502);
    border-top: 1px solid rgba(163, 230, 53, 0.2);
    padding: 40px 0; margin-top: auto; text-align: center; position: relative;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
}

.footer-logo img { max-height: 60px; margin-bottom: 25px; filter: grayscale(100%) opacity(0.6); transition: 0.4s; }
.footer-logo img:hover { filter: grayscale(0%) opacity(1) drop-shadow(0 0 15px var(--theme-main)); transform: scale(1.1); }

.footer-links li a { color: var(--text-muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.footer-links li a:hover { color: #fff; text-shadow: 0 0 10px var(--theme-main); }

.footer-lang {
    display: inline-flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.05);
    padding: 10px 25px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1);
}

/* RELOJ FOOTER */
.footer-server-time {
    display: flex; justify-content: center; align-items: center; gap: 15px;
    margin-bottom: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05);
    font-family: 'Oswald', sans-serif; font-size: 13px; color: #888; letter-spacing: 1px;
}
.footer-server-time i { color: var(--theme-main); }
.footer-server-time span { color: #fff; font-weight: bold; }


/* =========================================================
   RESPONSIVE MOBILE MENU FIX (INTEGRADO)
   ========================================================= */
@media (max-width: 992px) {

    .container-nav {
        display: flex !important; justify-content: space-between !important;
        align-items: center !important; width: 100% !important; padding: 0 20px !important;
    }

    /* Logo Izquierda */
    .nav-logo-corner {
        display: block !important; order: 1; margin-right: auto !important; margin-left: 0 !important;
    }
    .nav-logo-corner img { max-height: 40px; }

    /* Botón Hamburguesa Derecha */
    .mobile-toggle {
        display: block !important; width: 45px; height: 45px;
        background: url('../img/hamburger.svg') no-repeat center center; background-size: contain;
        cursor: pointer; order: 3; z-index: 1100;
        border: 2px solid var(--theme-main); border-radius: 8px; /* Bordes suaves */
        position: relative; box-shadow: 0 0 10px var(--theme-glow);
    }
    .mobile-toggle::after {
        content: '\f0c9'; font-family: 'Font Awesome 5 Free', 'FontAwesome'; font-weight: 900;
        color: var(--theme-main); font-size: 24px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    }

    /* Ocultar elementos extra */
    .nav-actions { order: 2; margin-right: 15px; display: flex; gap: 10px; }
    .flags-container { display: none !important; }
    .dropdown-user, .btn-nav { font-size: 0; }
    .btn-nav i { font-size: 20px !important; }

    /* Menú Desplegable */
    .nav-links {
        display: none; position: absolute; top: 80px; left: 0; width: 100%;
        background: rgba(5, 10, 5, 0.98);
        border-bottom: 2px solid var(--theme-main);
        flex-direction: column; padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.9);
        backdrop-filter: blur(15px);
    }
    .hybrid-navbar.mobile-active .nav-links { display: flex; animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
    .nav-links li { text-align: center; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-links li a { display: block; padding: 20px; font-size: 18px; }
    
    @keyframes slideDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
    
    /* General Mobile */
    .hero-section-integrated { padding-top: 100px; }
    .big-hero-logo { max-height: 180px; }
    .home-panel-wrapper { padding: 20px; border-radius: 10px; }
}
/* =========================================================
   URGENT FIXES: ALIGNMENT, SIZING & CONTAINERS 
   ========================================================= */

/* 1. FIX MENÚ SUPERIOR (Alineación horizontal) */
.nav-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 25px !important;
}

/* 2. FIX ENLACES DEL FOOTER (Quitar puntos y hacer horizontal) */
.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto 25px auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}
.footer-links li {
    list-style-type: none !important;
}
.footer-links li::before, .nav-links li::before {
    content: none !important; /* Elimina cualquier punto rebelde */
}

/* 3. FIX BANDERAS GIGANTES DEL FOOTER */
.footer-lang a img {
    width: 24px !important;
    height: auto !important;
    max-width: 24px !important;
    display: inline-block !important;
    box-shadow: none !important;
}

/* 4. FIX ANCHO DE PANTALLA (Para que no choque con los bordes) */
.content-wrapper, .home-panel-wrapper, .hero-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Asegurar que el Navbar interno no se desborde */
.container-nav {
    max-width: 1200px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

/* Reducir el gap de los stats del hero si la pantalla es mediana para que entre todo */
@media (max-width: 1200px) and (min-width: 993px) {
    .hero-stats-group { gap: 15px !important; }
    .nav-links { gap: 15px !important; }
}
/* =========================================================
   FIX: LOGIN MODAL & USER DROPDOWN (VIBRANT EDITION)
   ========================================================= */

/* --- MENÚ DESPLEGABLE DE USUARIO (ADMIN/PERFIL/SALIR) --- */
.dropdown-content {
    display: none; 
    position: absolute; 
    right: 0;
    background: linear-gradient(145deg, rgba(15, 25, 15, 0.95), rgba(5, 10, 5, 0.98));
    min-width: 240px;
    box-shadow: 0px 15px 40px rgba(0,0,0,0.8), 0 0 15px rgba(163, 230, 53, 0.1); 
    z-index: 9999;
    border: 1px solid rgba(163, 230, 53, 0.3); 
    border-radius: 12px; 
    padding: 10px 0; 
    top: 100%; 
    margin-top: 15px;
    backdrop-filter: blur(10px);
}

.dropdown-content.is-active { 
    display: block !important; 
    animation: fadeInMenu 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

@keyframes fadeInMenu { 
    from { opacity: 0; transform: translateY(-15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.dropdown-item-custom {
    padding: 12px 20px; 
    text-decoration: none !important; 
    display: flex; 
    align-items: center;
    color: #e2e8f0 !important; 
    transition: 0.3s; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item-custom:last-child { 
    border-bottom: none; 
}

.dropdown-item-custom:hover { 
    background: rgba(163, 230, 53, 0.15); 
    color: var(--theme-main) !important; 
    padding-left: 25px; /* Efecto sutil de desplazamiento al pasar el mouse */
}

.dropdown-item-custom i { 
    margin-right: 15px; 
    font-size: 18px; 
    color: var(--theme-main); 
    width: 25px; 
    text-align: center; 
}

.dropdown-item-custom div { display: flex; flex-direction: column; }
.dropdown-item-custom .title { font-family: 'Oswald', sans-serif; font-weight: bold; font-size: 14px; text-transform: uppercase; }
.dropdown-item-custom .text { font-size: 11px; color: #94a3b8; }
.dropdown-item-custom span { font-family: 'Oswald', sans-serif; font-weight: bold; font-size: 14px; text-transform: uppercase; }


/* --- MODAL DE LOGIN (BOOTSTRAP OVERRIDE) --- */
.modal-toxic-login { 
    background: linear-gradient(160deg, rgba(15, 25, 15, 0.95), rgba(5, 10, 5, 0.98)) !important; 
    border: 1px solid rgba(163, 230, 53, 0.4) !important; 
    color: #fff !important; 
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(163, 230, 53, 0.2) !important;
    backdrop-filter: blur(10px);
}

.modal-toxic-login .modal-header { 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; 
}

.modal-toxic-login .modal-title { 
    color: var(--theme-main); 
    font-family: 'Oswald', sans-serif; 
    text-transform: uppercase; 
    font-weight: bold;
    letter-spacing: 1px;
}

.modal-toxic-login .close { 
    color: #fff; 
    text-shadow: none; 
    opacity: 0.6; 
    transition: 0.3s;
}

.modal-toxic-login .close:hover { 
    color: var(--theme-main); 
    opacity: 1; 
}

/* Forzar que los inputs dentro del modal sean oscuros */
.modal-toxic-login .form-group-toxic input {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.modal-toxic-login .form-group-toxic input:focus {
    border-color: var(--theme-main) !important;
    box-shadow: 0 0 15px rgba(163, 230, 53, 0.3) !important;
}
/* =========================================================
   FIX DEFINITIVO: SEPARACIÓN DE MENÚ ESCRITORIO / MÓVIL
   ========================================================= */

/* 1. COMPORTAMIENTO SOLO PARA ESCRITORIO (PC) */
@media (min-width: 993px) {
    .nav-links {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 25px !important;
    }
}

/* 2. COMPORTAMIENTO SOLO PARA MÓVILES (Desplegable) */
@media (max-width: 992px) {
    .nav-links {
        display: none !important; /* Oculto por defecto */
        flex-direction: column !important; /* Apilado hacia abajo */
        position: absolute !important;
        top: 80px !important; /* Justo debajo del navbar */
        left: 0 !important;
        width: 100% !important;
        background: rgba(10, 15, 10, 0.98) !important;
        padding: 10px 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.9) !important;
        border-bottom: 2px solid var(--theme-main) !important;
        z-index: 999;
    }
    
    /* Clase que se activa al presionar el botón Hamburguesa */
    .hybrid-navbar.mobile-active .nav-links {
        display: flex !important; 
    }
    
    .nav-links li {
        width: 100% !important;
        text-align: center !important;
    }

    .nav-links li a {
        display: block !important;
        padding: 15px !important;
        font-size: 16px !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }
}
/* =========================================================
   FIX DEFINITIVO: ALINEACIÓN CAPTCHA Y TÉRMINOS (REGISTRO)
   ========================================================= */

/* 1. Destruir la etiqueta <center> que envuelve el captcha y los términos */
.register-box-container center,
form[action*="register"] center {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important; /* Empuja el contenido a la izquierda */
    text-align: left !important;
    width: 100% !important;
    font-family: 'Roboto', sans-serif !important; /* Letra suave para los términos */
    color: #cfd8dc !important;
    font-size: 14px !important;
    text-transform: none !important;
}

/* 2. Pegar el reCAPTCHA a la izquierda */
.g-recaptcha, #g-recaptcha {
    margin-left: 0 !important;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
}

/* 3. Ajuste fino del cuadrito del Checkbox */
.register-box-container input[type="checkbox"],
input[name="webengineRegistration_terms"] {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 10px 0 0 !important; /* 10px de espacio entre el cuadro y el texto */
    cursor: pointer;
    vertical-align: middle !important;
    position: static !important;
}

/* 4. Forzar que el botón REGISTRAR siga siendo 100% ancho y centrado */
.register-box-container center button[type="submit"],
form[action*="register"] center button[type="submit"] {
    width: 100% !important;
    margin-top: 10px !important;
    align-self: center !important;
}