* {
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;
}

body {
    background-color: #0a0c0e;
    color: #f1f5f9;
}

header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    top: 0;
    padding: 40px;
}

.logo {
    color: white;
    display: flex;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: #00ff66;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 16px;
}

.nav-links a {
    text-decoration: none;
    transition: 0.3s;
    color: #94a3b8;
}

.nav-links a:hover {
    color: #00ff66;
}

.search-bar {
    background: #121619;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #1e293b;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    margin-left: 0.5rem;
}

.btn-login {
    background: transparent;
    border: 1px solid #00ff66;
    color: #00ff66;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    gap: 0.4rem;
    transition: 0.3s;
}

.btn-login:hover {
    background: #00ff66;
    color: black;
}


/* Menú de Usuario */
.user-profile-menu {
    position: relative;
    display: inline-block;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #161b22;
    border: 1px solid #30363d;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-badge:hover {
    border-color: #00ff66;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: #00ff66;
    color: #000;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* Oculto por defecto */

.user-dropdown-content {
    display: none !important;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: #161b22;
    border: 1px solid #30363d;
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    padding: 12px;
    z-index: 999;
}

/* Se muestra solo al hacer clic */


.user-dropdown-content.show {
    display: block !important;
}

.dropdown-header small {
    display: block;
    color: #8b949e;
    font-size: 11px;
}

.dropdown-header strong {
    color: #00ff66;
    font-size: 13px;
}

.dropdown-divider {
    border: 0;
    height: 1px;
    background: #30363d;
    margin: 10px 0;
}

.btn-logout {
    width: 100%;
    background: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s ease;
}

.btn-logout:hover {
    background: #ff4d4d;
    color: #fff;
}


/* Generos de mangas */

.category-grid {
    display: grid;
    /* Ajustado a 140px para que entren exactamente 5 o 6 botones por fila sin desbordarse */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.category-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap; /* Evita que el texto se rompa en dos líneas */
}

.category-card:hover {
    transform: translateY(-2px);
    background: rgba(0, 230, 118, 0.12);
    border-color: #00e676;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 230, 118, 0.2);
}

.category-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
    padding-left: 10px;
    border-left: 4px solid #00ff66; /* Línea acento verde neko */
}

.category-section-title i,
.category-section-title svg {
    color: #00ff66 !important;
    stroke: #00ff66 !important;
}

.container {
    padding-top: 20px;
    background-color: #0d1117;
    border: 1px solid #21262d;
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    max-width: 1200px;
    margin-top: 45px;
}

h4 {
    border-left: 4px solid #00ff66;
    padding-left: 1rem;
    margin-left: 4.6rem; /* este margin left es para la pc */
    margin-top: 1rem;
    font-size: 2.2rem;
}

/* --- FOOTER STYLES --- */

.site-footer {
    border-top: 1px solid #21262d;
    color: #8b949e;
    padding: 50px 20px 20px 20px;
    margin-top: 60px;
    font-family: sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-logo span {
    color: #00ff66;
}

.footer-tagline {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Tarjeta especial de Discord */

.discord-card {
    background: linear-gradient(135deg, #161b22 0%, #1f2633 100%);
    border: 1px solid rgba(0, 255, 102, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.discord-title {
    color: #00ff66;
    font-weight: bold;
    font-size: 15px;
    display: block;
    margin-bottom: 5px;
}

.discord-info p {
    font-size: 13px;
    color: #c9d1d9;
    margin: 0;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #5865F2; /* Color oficial de Discord */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-discord:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

/* Enlaces del Footer */
.footer-links h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
    border-left: 3px solid #00ff66;
    padding-left: 8px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #8b949e;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #00ff66;
}

/* Derechos de autor */

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid #21262d;
    text-align: center;
    font-size: 13px;
}

/* Login */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #121619;
    padding: 2rem;
    border-radius: 12px;
    width: 350px;
    border: 1px solid #00ff66;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.input-group {
    margin: 1rem 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.6rem;
    background: #0a0c0e;
    border: 1px solid #1e293b;
    color: white;
    border-radius: 6px;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    background: #00ff66;
    height: 50px;
    border-radius: 10px;
    color: black;
    font-weight: 700;
}

.color-verde {
    color: #00ff66;
}

.register {
    color: white;
    transition: 0.3s;
    text-decoration: none;
}

.register:hover {
    text-decoration: underline;
}

/* Ventana Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #121214;
    border: 1px solid #00ff66;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.2);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
}

.close-btn:hover {
    color: #00ff66;
}

/* Pestañas */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    color: #888;
    font-weight: bold;
    cursor: pointer;
}

.tab-btn.active {
    color: #00ff66;
    border-bottom: 2px solid #00ff66;
}

/* Formularios */

.auth-form {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.auth-form.active {
    display: flex;
}

.input-group {
    display: flex;
    align-items: center;
    background: #1a1a1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    gap: 10px;
}

.input-group i {
    color: #00ff66;
}

.input-group input {
    background: none;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
}

.btn-submit {
    background: #00ff66;
    color: #000;
    font-weight: bold;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover {
    background: #00cc52;
}

/* Responsive para pantallas pequeñas */

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Corrección del título h4 en celulares: se quita el gran espacio izquierdo y se reduce el tamaño */
    h4 {
        margin-left: 0.8rem;
        font-size: 1.6rem;
        padding-left: 0.8rem;
    }
}

/* Estilo del botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.menu-toggle:hover {
    color: #00ff66;
    transform: scale(1.05);
}

/* Agrupador de navegación y búsqueda en escritorio */
.nav-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
    justify-content: space-around;
}

/* Reglas Responsive (Tablets y Celulares <= 1024px) */
@media (max-width: 1024px) {
    header {
        position: relative;
        justify-content: space-between;
        display: flex;
        align-items: center;
        padding: 15px;
    }

    /* Ocultar nombre y flecha en la tarjeta de usuario */
    .user-badge .user-name,
    .user-badge .dropdown-icon {
        display: none !important;
    }

    .user-badge {
        padding: 4px !important;
        gap: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    /* REORDENAMIENTO: Perfil al medio/izquierda y Menú Hamburguesa a la derecha */
    #user-nav {
        order: 1;
        margin-left: auto; /* Empuja el perfil hacia la derecha, dejando la hamburguesa al final */
        margin-right: 12px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2; /* Asegura que la hamburguesa sea el último elemento */
    }

    /* Contenedor colapsable animado */
    .nav-content {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #0d1117;
        flex-direction: column;
        align-items: stretch;
        padding: 0 20px;
        gap: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        z-index: 999;

        /* Efectos de transición suave */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease,
            transform 0.3s ease,
            padding 0.3s ease;
    }

    /* Estado desplegado */
    .nav-content.show {
        max-height: 400px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        padding: 20px;
    }

    .nav-links {
        flex-direction: column;
        gap: 12px;
    }

    .nav-links a {
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .nav-links a:hover {
        transform: translateX(5px);
    }

    .search-bar {
        width: 100%;
        max-width: 100%;
    }
}