:root {
    --bg-main: #050505;
    --bg-card: #0e0e0e;
    --bg-elevated: #161616;
    --bg-hover: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-bg: rgba(99, 102, 241, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --sidebar-width: 280px;
    --transition: 0.2s ease-in-out;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}
::selection {
    background: var(--accent);
    color: white;
}
.top-glow {
    position: fixed;
    top: -150px;
    left: 0;
    right: 0;
    height: 350px;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.3), transparent 50%), radial-gradient(circle at 80% 50%, rgba(34, 211, 238, 0.2), transparent 50%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
}
.nav-container {
    width: 100%;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
}
.logo-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}
.search-container {
    position: relative;
    flex: 0 1 400px;
}
.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 2.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all var(--transition);
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px var(--accent-bg);
}
.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    color: var(--text-muted);
}
.search-kbd {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}
.search-kbd kbd {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.layout-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 64px;
}
.guides-layout {
    display: flex;
    width: 100%;
}
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 2rem;
    border-right: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.3);
    z-index: 10;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-header { margin-bottom: 1.5rem; }
.sidebar-header h3 { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.nav-section { margin-bottom: 1.5rem; }
.nav-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all var(--transition);
}
.sidebar-nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.sidebar-nav a.active {
    color: var(--accent-light);
    background: var(--accent-bg);
    font-weight: 500;
}
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 3rem 4rem 6rem 4rem;
    background: transparent;
    border: none;
}
#content h1 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
#content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
#content p, #content ul, #content ol {
    max-width: 1000px; 
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.75;
    font-size: 1rem;
}
#content li {
    margin-bottom: 0.5rem;
}
#content a {
    color: var(--accent-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
#content a:hover {
    border-bottom-color: var(--accent-light);
}
#content code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent-light);
    border: 1px solid rgba(255,255,255,0.05);
}
#content pre {
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 2rem;
    width: 100%; 
}
#content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #e4e4e7;
}
.callout, #content blockquote {
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent);
    max-width: 1000px;
}
#content blockquote p {
    margin: 0;
    color: var(--text-primary);
}
#content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.875rem;
}
#content th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
}
#content td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 1rem;
    color: var(--text-muted);
}
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-main);
    margin-top: auto; 
    width: 100%;
}
.footer-content {
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer p { color: var(--text-muted); font-size: 0.875rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--text-primary); }
@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.5rem 2rem;
    }
    .content {
        width: 100%;
        margin-left: 0;
        padding: 2rem;
    }
    .guides-layout {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .search-container { display: none; }
    .nav-container { padding: 0 1.5rem; }
    .content { padding: 2rem 1.5rem; }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}
