/* Layout principal del index */
.main-layout {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
}

.main-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

.main-center {
    flex: 0 0 400px;
    display: flex;
    align-items: center;
}

.logo-card {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.logo-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.logo-central {
    max-width: 180px;
    filter: drop-shadow(0 0 10px cyan) drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.logo-central:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px cyan) drop-shadow(0 0 40px rgba(0, 255, 255, 0.8));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.logo-central {
    max-width: 180px;
    filter: drop-shadow(0 0 10px cyan);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0e17 0%, #1a0b2e 25%, #16213e 50%, #0f3460 75%, #0a0e17 100%);
    background-size: 400% 400%;
    animation: cyberpunkGradient 15s ease infinite;
    position: relative;
    color: cyan;
    display: flex;
    min-height: 100vh;
    flex-wrap: wrap;
    padding-bottom: 80px;
    overflow-x: hidden; /* Solo ocultar scroll horizontal */
    overflow-y: auto; /* Permitir scroll vertical */
}

/* Bloquear scroll solo cuando el menú móvil está abierto */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 2px,
            rgba(0, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 255, 0.03) 2px,
            rgba(255, 0, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes cyberpunkGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, rgba(10, 14, 23, 0.95) 0%, rgba(26, 11, 46, 0.95) 25%, rgba(15, 52, 96, 0.9) 50%, rgba(26, 11, 46, 0.95) 75%, rgba(10, 14, 23, 0.95) 100%);
    padding: 20px;
    box-shadow: 
        2px 0 30px rgba(0, 255, 255, 0.3),
        inset -1px 0 0 rgba(0, 255, 255, 0.2),
        inset 0 0 50px rgba(255, 0, 255, 0.05);
    border-right: 2px solid rgba(0, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    z-index: 10;
    position: relative;
}

/* En desktop, el sidebar es visible */
@media (min-width: 769px) {
    .sidebar {
        position: relative;
    }
}

/* En móvil, el sidebar está OCULTO por defecto */
@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 250px;
        z-index: 999;
        /* Permitir scroll vertical en el menú */
        overflow-y: auto;
        overflow-x: hidden;
        /* Scroll suave */
        scroll-behavior: smooth;
        /* Mejoras de rendimiento para el scroll en iOS */
        -webkit-overflow-scrolling: touch;
        /* Estilos del scrollbar */
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 255, 255, 0.5) rgba(0, 0, 0, 0.3);
    }
    
    /* Scrollbar personalizado */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .sidebar::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 10px;
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 255, 255, 0.5);
        border-radius: 10px;
    }
    
    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 255, 255, 0.7);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}


.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: -2px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%,
        cyan 20%,
        magenta 50%,
        cyan 80%,
        transparent 100%
    );
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; box-shadow: 0 0 20px cyan; }
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 40px;
    padding: 15px;
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.sidebar .logo img {
    width: 100%;
    filter: drop-shadow(0 0 10px cyan) drop-shadow(0 0 20px rgba(0, 212, 170, 0.5));
    transition: all 0.3s ease;
}

.sidebar .logo:hover img {
    filter: drop-shadow(0 0 15px cyan) drop-shadow(0 0 30px rgba(0, 212, 170, 0.8));
    transform: scale(1.05);
}

.menu {
    list-style: none;
}

.menu li {
    padding: 15px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: cyan;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
    position: relative;
}

.menu li:hover {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.1), rgba(0, 212, 170, 0.05));
    border-left: 3px solid #00d4aa;
    padding-left: 15px;
    text-shadow: 0 0 8px cyan;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.1);
}

.menu li.active {
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.2), rgba(0, 255, 255, 0.1));
    border-left: 3px solid cyan;
    padding-left: 15px;
    text-shadow: 0 0 10px cyan;
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.2);
    color: #00ff88;
}

.menu li i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.menu li:hover i,
.menu li.active i {
    color: #00d4aa;
    text-shadow: 0 0 10px #00d4aa;
    transform: scale(1.1);
}

.menu li a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding-right: 28px; /* espacio para el puntito */
}

/* Efectos especiales para iconos del menú */
.menu li:nth-child(1):hover i { color: #ff6b6b; text-shadow: 0 0 10px #ff6b6b; }
.menu li:nth-child(2):hover i { color: #4ecdc4; text-shadow: 0 0 10px #4ecdc4; }
.menu li:nth-child(3):hover i { color: #45b7d1; text-shadow: 0 0 10px #45b7d1; }
.menu li:nth-child(4):hover i { color: #f9ca24; text-shadow: 0 0 10px #f9ca24; }
.menu li:nth-child(5):hover i { color: #6c5ce7; text-shadow: 0 0 10px #6c5ce7; }
.menu li:nth-child(6):hover i { color: #a29bfe; text-shadow: 0 0 10px #a29bfe; }
.menu li:nth-child(7):hover i { color: #fd79a8; text-shadow: 0 0 10px #fd79a8; }

/* Efectos adicionales para interactividad del menú */
.menu li.hover {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.05), rgba(0, 212, 170, 0.02));
    border-left: 2px solid #00d4aa;
}

.menu li.clicked {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), rgba(0, 212, 170, 0.1));
    border-left: 4px solid cyan;
    transform: translateX(3px);
}

/* Efecto de pulso para el elemento activo */
.menu li.active::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: cyan;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* Mostrar el puntito también al pasar el ratón o cuando se usa la clase .hover */
.menu li:hover::after,
.menu li.hover::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: cyan;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

/* Efecto de pulso para el elemento activo - barra vertical a la izquierda */
.menu li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, transparent, cyan, transparent);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translateY(-50%) scaleY(0.8); }
    50% { opacity: 1; transform: translateY(-50%) scaleY(1.2); }
}

.main-content {
    flex: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 80vh;
    padding: 30px 20px;
    position: relative; /* para que los elementos absolute dentro (el botón) se posicionen respecto a este contenedor */
}

.card {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    border-top: 1px solid cyan;
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.1);
    color: cyan;
    font-size: 0.95rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
    border-top: 2px solid cyan;
}

/* Mejorar details/summary */
details {
    width: 100%;
}

details summary {
    cursor: pointer;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    font-weight: 600;
    color: cyan;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(-180deg);
}

details summary:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

details summary:active {
    transform: scale(0.98);
}

details p {
    padding: 15px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.arrow {
    position: absolute;
    right: 20px;
    color: cyan;
}
/*
.logo-display {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}
*/
.logo-display img {
    width: 250px;
    /* Filtro eliminado para mostrar el logo original */
}

.info-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #0f151d 0%, #1a2332 50%, #0f151d 100%);
    border-top: 2px solid cyan;
    color: cyan;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 999999;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 255, 0.1);
    font-family: 'Segoe UI', sans-serif;
    visibility: visible;
    opacity: 1;
    backdrop-filter: blur(15px);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, cyan, transparent);
    animation: footerGlow 3s ease-in-out infinite alternate;
}

@keyframes footerGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.social-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icons i {
    margin: 0;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 12px;
    border-radius: 8px;
    font-size: 1.3rem;
    border: 1px solid transparent;
    background: rgba(0, 255, 255, 0.05);
}

.social-icons i:hover {
    color: #00d4aa;
    text-shadow: 0 0 15px #00d4aa;
    background: rgba(0, 212, 170, 0.15);
    border-color: #00d4aa;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.3);
}

footer span {
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

a {
    color: cyan;
    text-decoration: none;
}

/* Botón de login en la esquina superior derecha */
.top-right{
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10000;
}

.btn-login-top{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 12px;
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.2), rgba(0, 255, 255, 0.1));
    border-left: 3px solid cyan;
    padding-left: 15px;
    text-shadow: 0 0 10px cyan;
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.2);
    color: #00ff88;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login-top::after{
    /* keep neon halo but subtle for menu-like appearance */
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    top: -6px;
    bottom: -6px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255,0,170,0.12), rgba(255,120,200,0.04));
    filter: blur(8px);
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
    z-index: -1;
}

.btn-login-top:hover{
    background: linear-gradient(90deg, rgba(255,0,170,0.06), rgba(255,120,200,0.03));
    border-left: 3px solid rgba(255,0,170,0.9);
    padding-left: 15px;
    text-shadow: 0 0 10px rgba(255,0,170,0.6);
    box-shadow: 0 8px 24px rgba(255,0,170,0.12);
    color: #fff;
}

.btn-login-top:hover::after{ opacity: 1; }

.btn-login-top:focus{
    outline: none;
    box-shadow: 0 0 0 6px rgba(0,212,170,0.06), 0 12px 36px rgba(0,212,170,0.12);
}

.btn-login-top:active{
    transform: translateY(-1px) scale(0.995);
    box-shadow: 0 8px 22px rgba(0,212,170,0.12);
}

@keyframes neonPulse{
    0% { opacity: 0.28; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.03); }
    100% { opacity: 0.28; transform: scale(1); }
}

@keyframes gradientShift{
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-login-top span{ display:inline-block; }
.btn-login-top i{ margin-left:8px; display:inline-block; font-size:16px; width:18px; text-align:center; vertical-align:middle; }

@media (max-width:720px){
    .top-right{
        right: 15px;
        top: 15px;
        z-index: 1001;
    }
    .btn-login-top{
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
        gap: 8px;
        min-width: 120px;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
        /* Prevenir superposición con hamburguesa */
        margin-left: auto;
    }
    
    .btn-login-top span {
        font-size: 0.85rem;
    }
    
    .btn-login-top i {
        font-size: 1rem;
    }
    
    body {
        padding-bottom: 100px;
    }

    .sidebar {
        width: 250px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 80px 15px 20px 15px;
        width: 100%;
        min-height: auto; /* Permite que el contenido fluya naturalmente */
    }
    
    .main-layout {
        flex-direction: column;
        padding: 0;
        gap: 20px;
        min-height: 100%; /* Asegura que el contenido se muestre completo */
    }

    .main-col {
        width: 100%;
        order: 2;
    }

    .main-center {
        flex: 0 0 auto;
        order: 1;
        width: 100%;
    }

    .logo-card {
        min-height: 250px;
        padding: 20px;
    }

    .logo-central {
        max-width: 140px;
    }

    .card {
        padding: 15px;
        font-size: 0.9rem;
    }

    details summary {
        font-size: 0.95rem;
        padding: 12px 15px;
    }

    .info-cards {
        gap: 15px;
    }
}

@media (max-width:480px){
    body {
        padding-bottom: 120px;
    }

    .top-right {
        right: 60px; /* Espacio para el botón hamburguesa */
        top: 12px;
    }

    .btn-login-top {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
        min-width: auto;
        gap: 6px;
        /* Efecto más brillante en móviles */
        box-shadow: 0 4px 16px rgba(0, 255, 255, 0.4),
                    0 0 20px rgba(0, 255, 255, 0.2);
        background: linear-gradient(135deg, rgba(0, 212, 170, 0.3), rgba(0, 255, 255, 0.2));
        border: 1px solid rgba(0, 255, 255, 0.5);
        border-left: 3px solid cyan;
        /* Asegurar área táctil mínima de 44x44px */
        min-height: 44px;
    }

    .btn-login-top span {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .btn-login-top i {
        margin-left: 0;
        font-size: 1.1rem;
    }
    
    /* Mejorar el efecto hover/active en móviles */
    .btn-login-top:active {
        transform: scale(0.96);
        box-shadow: 0 2px 8px rgba(0, 255, 255, 0.5),
                    0 0 15px rgba(0, 255, 255, 0.3);
    }

    .main-content {
        padding: 70px 10px 15px 10px;
        min-height: auto; /* Contenido fluye naturalmente */
    }

    .main-layout {
        gap: 15px;
        min-height: 100%; /* Muestra todo el contenido */
    }

    .logo-card {
        min-height: 200px;
        padding: 15px;
    }

    .logo-central {
        max-width: 100px;
    }

    .card {
        padding: 12px;
        font-size: 0.85rem;
    }

    details summary {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    details p {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    .info-cards {
        gap: 12px;
    }

    /* Ajustar sidebar en móviles muy pequeños */
    .sidebar {
        width: 220px;
        /* Asegurar scroll en pantallas pequeñas */
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Scrollbar más delgado en móviles pequeños */
    .sidebar::-webkit-scrollbar {
        width: 4px;
    }
}

/* ========================================
   MÓVILES MUY PEQUEÑOS (< 360px)
   ======================================== */
@media (max-width: 360px) {
    .top-right {
        right: 55px;
        top: 10px;
    }

    .btn-login-top {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-height: 40px;
        gap: 4px;
    }

    .btn-login-top span {
        font-size: 0.75rem;
    }

    .btn-login-top i {
        font-size: 1rem;
    }
}

/* ========================================
   MEJORAS TÁCTILES PARA MÓVILES
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos táctiles */
    .btn-login-top {
        /* Área táctil más grande */
        padding: 12px 16px;
        min-height: 48px;
        /* Feedback visual inmediato */
        transition: transform 0.1s ease, box-shadow 0.1s ease;
        /* Prevenir selección de texto accidental */
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: rgba(0, 255, 255, 0.2);
    }

    .btn-login-top:active {
        transform: scale(0.94);
        box-shadow: 0 2px 10px rgba(0, 255, 255, 0.6),
                    0 0 20px rgba(0, 255, 255, 0.4);
    }
}
