/* Estilos principales - Tema Neon Blue & Purple */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Fondo oscuro profundo */
    --bg-primary: #050508; 
    --bg-secondary: #0a0b12;
    --bg-tertiary: #131520;
    
    /* Bordes sutiles */
    --border-color: rgba(67, 72, 99, 0.3);
    
    /* Textos */
    --text-primary: #ffffff;
    --text-secondary: #a0a6cc;
    --text-tertiary: #6b7299;
    
    /* Acentos Neon */
    --accent: #00f3ff; /* Cyan Neon */
    --accent-hover: #bc13fe; /* Purple Neon */
    --accent-glow: rgba(0, 243, 255, 0.4);
    --purple-glow: rgba(188, 19, 254, 0.4);
    
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(188, 19, 254, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.05) 0%, transparent 20%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar personalizado Moderno */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Header Neon */
.main-header {
    background: rgba(10, 11, 18, 0.85);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
}

/* Container principal */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar estilo Cyberpunk Clean */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 11, 18, 0.6);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav {
    padding: 0 1.5rem;
}

.sidebar-nav h2 {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding: 0 1rem;
    text-shadow: 0 0 8px var(--accent-glow);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav > ul > li {
    margin-bottom: 0.5rem;
}

.categoria-item {
    margin-bottom: 0.5rem;
}

.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.categoria-header:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.05);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.categoria-item.open > .categoria-header {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.05), transparent);
    border-left: 2px solid var(--accent);
    border-radius: 4px 8px 8px 4px;
}

.categoria-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.categoria-icon {
    font-size: 1.1rem;
    color: var(--text-tertiary);
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.categoria-header:hover .categoria-icon,
.categoria-item.open > .categoria-header .categoria-icon {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
    transform: scale(1.1);
}

.categoria-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.categoria-header .badge {
    background: var(--bg-primary);
    color: var(--text-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.categoria-item.open > .categoria-header .badge {
    background: var(--accent-glow);
    color: #fff;
    border-color: var(--accent);
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: var(--text-tertiary);
    margin-left: 0.5rem;
}

.categoria-item.open > .categoria-header .toggle-icon {
    color: var(--accent);
    transform: rotate(180deg);
}

.submenu {
    margin-top: 0.5rem;
    padding-left: 0;
    margin-left: 1rem;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.submenu::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 15px;
    width: 1px;
    background: linear-gradient(to bottom, var(--border-color), transparent);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.submenu li {
    margin-bottom: 0.25rem;
}

.submenu a {
    display: block;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    opacity: 0.8;
}

.submenu a::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.submenu a:hover,
.submenu a.active {
    color: var(--accent);
    background: rgba(0, 243, 255, 0.03);
    opacity: 1;
    text-shadow: 0 0 5px var(--accent-glow);
}

.submenu a:hover::before,
.submenu a.active::before {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* Contenido principal */
.content {
    flex: 1;
    padding: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Guía individual */
.guia-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.guia-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.guia-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    box-shadow: 0 0 10px var(--accent);
}

.categoria-badge {
    display: inline-block;
    background: rgba(188, 19, 254, 0.1);
    color: var(--accent-hover);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(188, 19, 254, 0.2);
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.1);
}

.guia-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 0.5rem 0;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.guia-title-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.guia-title-toggle:hover {
    text-shadow: 0 0 15px var(--accent-glow);
}

.guia-title-toggle .toggle-icon {
    font-size: 1.5rem;
    margin-left: 1rem;
    color: var(--text-tertiary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.guia-title-toggle:hover .toggle-icon {
    color: var(--accent);
    transform: scale(1.1);
}

.guia-descripcion {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-top: 1.5rem;
    line-height: 1.6;
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.02), transparent);
}

.guia-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-top: 3rem;
}

.guia-body p {
    margin-bottom: 1.5rem;
}

.guia-body h2 {
    font-size: 2rem;
    color: #fff;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    display: inline-block;
    width: 100%;
}

.guia-body h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 1px;
    background: var(--accent-hover);
    box-shadow: 0 0 10px var(--accent-hover);
}

.guia-body h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.guia-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    padding-bottom: 1px;
}

.guia-body a:hover {
    border-bottom-color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

.guia-body blockquote {
    background: rgba(19, 21, 32, 0.5);
    border-left: 4px solid var(--accent-hover);
    padding: 1.5rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.guia-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.guia-body table th {
    background: var(--bg-tertiary);
    color: var(--accent);
    font-weight: 700;
    padding: 1rem;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

.guia-body table td {
    background: rgba(19, 21, 32, 0.4);
    color: var(--text-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.guia-body table tr:last-child td {
    border-bottom: none;
}

.guia-body table tr:hover td {
    background: rgba(0, 243, 255, 0.05);
}

.guia-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
}

.guia-body code {
    background: rgba(188, 19, 254, 0.1);
    color: var(--accent-hover);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(188, 19, 254, 0.2);
}

.guia-body pre {
    background: #0f111a;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    position: relative;
}

.guia-body pre::before {
    content: 'CODE';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0 8px 0 8px;
}

.guia-body pre code {
    background: none;
    padding: 0;
    color: #e0e6ed;
    border: none;
}

/* Página de bienvenida */
.welcome-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 2rem;
}

.welcome-content h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.3));
    animation: glowText 3s infinite alternate;
}

@keyframes glowText {
    from { filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.1)); }
    to { filter: drop-shadow(0 0 25px rgba(0, 243, 255, 0.4)); }
}

.welcome-content > p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.categoria-card {
    background: rgba(19, 21, 32, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.categoria-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categoria-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 10px 40px -10px rgba(0, 243, 255, 0.2);
}

.categoria-card:hover::before {
    opacity: 1;
}

.categoria-card h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.categoria-card h3 i {
    color: var(--accent);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform 0.3s ease;
}

.categoria-card:hover h3 i {
    transform: scale(1.1) rotate(5deg);
    color: #fff;
}

.categoria-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
}

.categoria-count {
    font-weight: 600;
    color: var(--accent-hover);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(188, 19, 254, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(188, 19, 254, 0.2);
}

.categoria-guias {
    list-style: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.categoria-guias li {
    margin-bottom: 0.8rem;
}

.categoria-guias a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.categoria-guias a::before {
    content: '›';
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 0.8;
    transition: transform 0.2s ease;
}

.categoria-guias a:hover {
    color: #fff;
    transform: translateX(5px);
}

.categoria-guias a:hover::before {
    transform: translateX(2px);
    text-shadow: 0 0 5px var(--accent);
}

/* Footer */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    text-align: center;
    padding: 3rem 0;
    margin-top: 6rem;
    font-size: 0.9rem;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 15px var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .content {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-secondary);
    }
    
    .content {
        padding: 2rem 1.5rem;
    }
    
    .welcome-content h1 {
        font-size: 2.5rem;
    }
    
    .guia-content h1 {
        font-size: 2.2rem;
    }
    
    .categorias-grid {
        grid-template-columns: 1fr;
    }
}
