/* style.css (CORREGIDO Y COMPLETO) */

/* Variables para cambios globales rápidos */
:root {
    --accent-social: #38BDF8;
    --accent-game: #F97316;
    --accent-blue: #3B82F6;
    --text-color: #f8fafc;
    --bg-dark-hover: #1e293b;
}

html {
    scroll-behavior: smooth;
}

/* ---------------------------------------------------- */
/* CLASES DE UTILIDAD - MENÚ */
/* ---------------------------------------------------- */

/* Estilo Base para todos los ítems del menú (PÍLDORA) */
.menu-item-capsule {
    color: var(--text-color);
    padding: 6px 10px; /* Reducido para caber */
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 200ms ease-in-out;
    cursor: pointer;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    white-space: nowrap; 
    flex-shrink: 0; 
}

.menu-item-capsule:hover {
    background-color: var(--accent-blue) !important;
    color: white !important;
}

/* Estado ACTIVO */
.active-item {
    background-color: var(--accent-blue) !important;
    color: white !important;
    font-weight: bold;
}

/* Estilo Base para los links dentro del Dropdown */
.dropdown-link {
    display: block;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #e2e8f0;
    transition: all 200ms ease-in-out;
    white-space: nowrap;
}

.dropdown-link:hover {
    background-color: var(--accent-blue) !important;
    color: white !important;
}

/* ---------------------------------------------------- */
/* LÓGICA DE DROPDOWN Y ANIMACIÓN (SOLUCIÓN AL FALLO) */
/* ---------------------------------------------------- */

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0.95);
    transform-origin: top;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
    background-color: var(--bg-dark-hover);
    z-index: 50;
    position: absolute;
    border-radius: 0.5rem;
    min-width: 160px;
    
    /* CRÍTICO: Elimina la brecha. El valor puede necesitar ajuste fino (de -3px a -5px) */
    margin-top: -3px; 
}

.group:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
    pointer-events: auto;
}

/* ---------------------------------------------------- */
/* AJUSTES RESPONSIVOS (Mantengo por si los necesitas) */
/* ---------------------------------------------------- */

@media (max-width: 1024px) {
    .menu-item-capsule {
        font-size: 0.8125rem;
        padding: 5px 10px;
    }
}

@media (max-width: 768px) {
    .menu-item-capsule {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}