@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}
:root {
    --background-color: #0a192f; /* Azul marino muy oscuro */
    --text-color: #ccd6f6; /* Texto claro, azulado */
    --primary-color: #6a11cb; /* Morado vibrante */
    --secondary-color: #2575fc; /* Azul vibrante */
    --card-background: #112240; /* Azul marino ligeramente más claro */
    --card-border-radius: 16px;
    --section-padding: 4rem 0;
    --container-width: 1400px;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

/* --- panel interactivo --- */

#xd{
    background-color: #ebf2fb;
    margin-bottom: 6px;
    margin-top: 6px;
    border-radius: 12px;
}

.nav-button {
            transition: all 0.3s ease;
            border-bottom: 4px solid transparent;
        }
        .nav-button.active {
            border-bottom-color: #4f46e5;
            color: #4f46e5;
            font-weight: 600;
        }
        .card {
            background-color: white;
            border-radius: 0.75rem;
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
        }
        .tool-card.active {
            box-shadow: 0 0 0 3px #4f46e5;
            transform: translateY(-2px);
        }
        .chart-container {
            position: relative;
            width: 100%;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            height: 300px;
            max-height: 400px;
        }
        @media (min-width: 768px) {
            .chart-container {
                height: 350px;
            }
        }
        .content-section {
            display: none;
        }
        .content-section.active {
            display: block;
        }
        .filter-btn.active {
            background-color: #4f46e5;
           color: white;
        }


 /*--- fin panel interactivo --- */

.page-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header y Navegación --- */
header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #1d2d50;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.5);
}
.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* --- Estilos del Buscador --- */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 0;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background-color: transparent;
    outline: none;
    transition: width 0.4s ease-in-out;
    font-size: 1rem;
    margin-left: 0.5rem;
    color: var(--text-color);
}

.search-container.active .search-input {
    width: 200px;
    padding-left: 0.5rem;
}
.nav-icon {
    color: var(--text-color);
    font-size: 1.2rem;
    text-decoration: none;
}

.profile-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* --- Secciones Generales --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Contenedores de Secciones --- */
.latest-articles-section {
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #1d2d50;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background-color: #0a192f;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: rgba(106, 17, 203, 0.2);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- Cuadrículas de Contenido --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    max-height: 800px;
    overflow-y: auto;
    padding: 1rem;
}

#articles-grid-static {
    grid-template-columns: repeat(3, 1fr);
    max-height: none;
    overflow-y: visible;
    padding: 0;
}

/* Estilo de la Barra de Scroll para cuadrículas dinámicas */
.articles-grid::-webkit-scrollbar {
    width: 8px;
}
.articles-grid::-webkit-scrollbar-track {
    background: #0a192f;
    border-radius: 10px;
}
.articles-grid::-webkit-scrollbar-thumb {
    background: #1d2d50;
    border-radius: 10px;
}
.articles-grid::-webkit-scrollbar-thumb:hover {
    background: #2c3e50;
}

/* --- Tarjetas de Artículo (Estáticas en index.html) --- */
.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    background-color: var(--card-background);
    border-radius: var(--card-border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid #1d2d50;
}

.article-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

#articles-grid-static .article-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-image-container {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
}

.card-content {
    padding: 1.5rem;
    border-top: 1px solid #1d2d50;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.card-content p {
    font-size: 0.9rem;
    color: #8892b0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #8892b0;
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-info img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #8892b0;
    padding-top: 1rem;
    border-top: 1px solid #1d2d50;
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.card-actions {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}

/* --- Tarjetas de Contenido (Dinámicas en games.html) --- */
.articles-grid .article-card {
    background-color: #1c2e4a;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 380px; /* Altura fija */
    transition: transform 0.2s ease;
    border: 1px solid #2c3e50;
}

.articles-grid .article-card:hover {
    transform: translateY(-5px);
}

.articles-grid .article-card .card-image-container {
    height: 180px;
}

.articles-grid .article-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 1.5rem 0.5rem 1.5rem;
    color: var(--text-color);
    height: 48px;
    overflow: hidden;
}

.articles-grid .article-card p {
    font-size: 0.9rem;
    color: #8892b0;
    margin: 0 1.5rem 1rem 1.5rem;
    flex-grow: 1;
    overflow: hidden;
}

.articles-grid .article-card .download-link {
    display: block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s ease;
}

.articles-grid .article-card .download-link:hover {
    background-color: var(--secondary-color);
}


/* --- Responsive --- */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    #articles-grid-static {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .articles-grid, #articles-grid-static {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 0 1rem;
    }
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .articles-grid, #articles-grid-static {
        grid-template-columns: 1fr;
    }
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* --- Pie de Página --- */
.site-footer {
    background: linear-gradient(45deg, #0f1f3a, #112240);
    color: #ecf0f1;
    padding: 4rem 0 0;
    margin-top: 4rem;
    border-top: 1px solid #1d2d50;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-column p {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.8;
    margin: 0;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul a {
    text-decoration: none;
    color: #bdc3c7;
    transition: color 0.2s ease;
}

.footer-column ul a:hover {
    color: #fff;
}

.subscribe-form {
    display: flex;
    margin-top: 1rem;
}

.subscribe-form input {
    flex-grow: 1;
    border: 1px solid #2c3e50;
    background-color: #0a192f;
    color: #fff;
    padding: 0.8rem;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.subscribe-form input::placeholder {
    color: #95a5a6;
}

.subscribe-form button {
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.subscribe-form button:hover {
    background-color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid #1d2d50;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: #95a5a6;
}

.footer-bottom ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.footer-bottom a {
    text-decoration: none;
    color: #95a5a6;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #fff;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .subscribe-form {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
/* --- Estilos para Funcionalidad (Login y Tarjetas) --- */

/* Botón de Iniciar Sesión */
.login-button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.login-button:hover {
    background-color: var(--secondary-color);
}

/* Icono de perfil del usuario */
.nav-actions .profile-icon img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

/* --- Estilos para Tarjetas de Herramientas --- */
.tool-card {
    background-color: #1c2e4a;
    border: 1px solid #2c3e50;
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.tool-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.tool-card p {
    font-size: 0.9rem;
    color: #8892b0;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.tool-link {
    display: inline-block;
    align-self: flex-start;
    text-decoration: none;
    color: #fff;
    background-color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.tool-link:hover {
    background-color: var(--secondary-color);
}

/* --- Estilos para la Tabla de Herramientas --- */
.table-container {
    overflow-x: auto; /* Para asegurar que la tabla sea responsive en pantallas pequeñas */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    font-size: 0.9rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #1d2d50;
}

thead {
    background-color: #1c2e4a;
}

th {
    font-weight: 600;
    color: #fff;
}

tbody tr:hover {
    background-color: #1c2e4a;
}
