/* Variables CSS */
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: #F28A2C;
    --secondary-color: #E5E5E5;
    --tertiary-color: #1D3E72;
    --danger-color: #cf6679;
    --surface-color: #1e1e1e;
    --surface-color-light: #2c2c2c;
}

/* Reset y Estilos Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Contenedor Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header y Hero */
header {
    background: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero {
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    background: linear-gradient(to right, #ffffff, var(--text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

/* Navegación */
nav {
    background-color: var(--surface-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Contenido Principal */
main {
    padding: 2rem 0;
    margin-bottom: 0;
}

/* Búsqueda */
.search-container {
    max-width: 800px;
    margin: 0 auto 4rem;
    position: relative;
}

#research-input {
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    background-color: var(--surface-color-light);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#research-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-color);
}

#submit-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Resultados */
.result-container {
    max-width: 800px;
    margin: 4rem auto;
    background-color: var(--surface-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.loading:after {
    content: '.';
    animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: var(--text-color);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 var(--text-color),
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 var(--text-color),
            .5em 0 0 var(--text-color);
    }
}

/* Secciones */
.section {
    margin-bottom: 6rem;
    background-color: var(--surface-color);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Grid de Características */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--surface-color-light);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.feature-description {
    font-size: 1rem;
    opacity: 0.8;
}

/* Cómo Usar */
.how-to-use ol {
    padding-left: 1.5rem;
    counter-reset: item;
    list-style-type: none;
}

.how-to-use li {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.how-to-use li:before {
    content: counter(item);
    counter-increment: item;
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    background: var(--surface-color-light);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

/* Acerca de */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.about-text {
    flex: 2;
}

/* Divider */
.divider {
    height: 4px;
    background: linear-gradient(to right, var(--accent-color), var(--tertiary-color));
    margin: 6rem 0;
    border-radius: 2px;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    text-align: center;
    margin-top: 5px;
    padding: 10px 0;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

footer p {
    color: var(--text-color);
    margin-top: 1rem;
}

.credits {
    color: var(--accent-color);
    text-align: center;
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .search-container {
        padding: 0 1rem;
    }

    #research-input {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }

    #submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 2rem;
    }

    .about-content {
        flex-direction: column;
    }
}
/* ============================================ */
/* CORRECCIÓN ESPECÍFICA PARA EL CANVAS DE RED */
/* ============================================ */

#network-animation {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    z-index: 0 !important;
}

/* Reset de dimensiones fijas que puedan estar en el HTML */
#network-animation[width],
#network-animation[height] {
    width: 100% !important;
    height: 100% !important;
}

/* Asegurar que el header tenga posición relativa */
header {
    position: relative !important;
    overflow: hidden !important;
}

/* Para debugging - puedes remover esto después */
.debug-canvas {
    border: 1px solid red;
}