/* ========================================
   JAVASCRIPT 101 - Estilos CSS
   Modo Oscuro, Elegante y Minimalista
   ======================================== */

:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252d3d;
    --text-primary: #e0e6ed;
    --text-secondary: #a0aac0;
    --accent: #00d4ff;
    --accent-hover: #00b8d4;
    --success: #00d96f;
    --warning: #ffa500;
    --error: #ff4444;
    --border: #2d3544;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Estilos Globales
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ========================================
   Header
   ======================================== */

.header {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 100, 150, 0.05) 100%);
    border-bottom: 1px solid var(--border);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300d4ff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.logo {
    font-size: 3.5em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #00b8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.3em;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(26, 31, 46, 0.95);
}

.navbar .container {
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    padding: 15px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========================================
   Container
   ======================================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Main
   ======================================== */

main {
    padding: 40px 20px;
}

/* ========================================
   Secciones
   ======================================== */

.section {
    margin-bottom: 60px;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    font-size: 2.5em;
    margin-bottom: 25px;
    color: var(--accent);
    position: relative;
    padding-bottom: 15px;
    letter-spacing: 1px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
}

.section h3 {
    font-size: 1.8em;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.section p {
    font-size: 1.05em;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.section h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* ========================================
   Listas
   ======================================== */

.list {
    margin-left: 20px;
    margin-bottom: 20px;
}

.list li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    list-style: none;
    position: relative;
    padding-left: 25px;
}

.list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.3em;
}

ol.list {
    counter-reset: li-counter;
    margin-left: 0;
}

ol.list li {
    counter-increment: li-counter;
    padding-left: 35px;
}

ol.list li::before {
    content: counter(li-counter);
    position: absolute;
    left: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1em;
    font-weight: 700;
}

/* ========================================
   Cajas de Información
   ======================================== */

.info-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 100, 150, 0.04) 100%);
    border-left: 4px solid var(--accent);
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.info-box h4 {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 1.1em;
    position: relative;
    z-index: 1;
}

.info-box p {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ========================================
   Ejemplos de Código
   ======================================== */

.code-example {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.code-example::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.code-example h4 {
    color: var(--accent);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.code-example pre {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95em;
    color: var(--accent);
    line-height: 1.5;
}

.code-example pre::-webkit-scrollbar {
    height: 6px;
}

.code-example pre::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.code-example pre::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.code-example pre::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.code-desc {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin-top: 10px;
    font-style: italic;
}

.code-result {
    background-color: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--success);
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 4px;
    color: var(--success);
    font-size: 0.95em;
}

/* ========================================
   Inline Code
   ======================================== */

code {
    background-color: var(--bg-tertiary);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
}

/* ========================================
   Cajas de Consejos
   ======================================== */

.advice-box {
    background: linear-gradient(135deg, rgba(0, 217, 111, 0.08) 0%, rgba(0, 150, 80, 0.04) 100%);
    border-left: 4px solid var(--success);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advice-box:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.advice-box h3 {
    color: var(--success);
    margin-top: 0;
    margin-bottom: 10px;
}

.advice-box p {
    color: var(--text-secondary);
}

/* ========================================
   Sección de Roadmap
   ======================================== */

.roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.roadmap-item {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 100, 150, 0.02) 100%);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.roadmap-item::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    transition: top 0.3s ease;
}

.roadmap-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.roadmap-item:hover::before {
    top: 0;
}

.roadmap-item h4 {
    color: var(--accent);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.roadmap-item p {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ========================================
   Sección de Resumen y Final
   ======================================== */

.final-section {
    margin-bottom: 80px;
}

.summary {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 100, 150, 0.05) 100%);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.summary h2 {
    margin-bottom: 20px;
}

.summary p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 60px;
}

.footer p {
    margin: 0;
    font-size: 0.95em;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .logo {
        font-size: 2.5em;
    }

    .tagline {
        font-size: 1.1em;
    }

    .nav-links {
        gap: 20px;
        font-size: 0.9em;
    }

    .section h2 {
        font-size: 2em;
    }

    .section h3 {
        font-size: 1.5em;
    }

    .header {
        padding: 40px 20px;
    }

    main {
        padding: 20px 10px;
    }

    .code-example pre {
        font-size: 0.85em;
    }

    .roadmap {
        grid-template-columns: 1fr;
    }

    .summary {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2em;
    }

    .tagline {
        font-size: 1em;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.85em;
        flex-wrap: wrap;
    }

    .section h2 {
        font-size: 1.6em;
    }

    .section h3 {
        font-size: 1.2em;
    }

    .section h2::after {
        width: 40px;
    }

    .code-example {
        padding: 15px;
    }

    .advice-box {
        padding: 15px;
    }

    main {
        padding: 15px 10px;
    }

    .container {
        padding: 0 15px;
    }
}

/* ========================================
   Scrollbar Personalizado
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ========================================
   Selección de Texto
   ======================================== */

::selection {
    background-color: var(--accent);
    color: var(--bg-primary);
}

::-moz-selection {
    background-color: var(--accent);
    color: var(--bg-primary);
}