:root {
    --bg-main: #050505;
    --bg-sidebar: rgba(10, 10, 15, 0.9);
    --bg-header: rgba(5, 5, 5, 0.8);
    --bg-card: rgba(20, 20, 25, 0.7);
    --bg-code: #0f111a;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-primary: #a855f7;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --sidebar-width: 300px;
    --header-height: 70px;
    --font-sans: 'Nunito', system-ui, -apple-system, sans-serif;
    --font-serif: 'Nunito', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-serif);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.8;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* UI Elements use Sans */
aside, header, .nav-group-title, nav a, .copy-btn, .info-box strong, .tip-box strong, th {
    font-family: var(--font-sans);
}

/* Background Glowing Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    animation: pulse 15s infinite alternate;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent-primary); top: -100px; left: -100px; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-secondary); bottom: -100px; right: -50px; animation-delay: -5s; }

@keyframes pulse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 30px) scale(1.1); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* Sidebar */
aside {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
    z-index: 101;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding: 0 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
}

.nav-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
}

.nav-group { margin-bottom: 20px; }
.nav-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-left: 10px;
}

nav ul { list-style: none; }
nav a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    border: 1px solid transparent;
    cursor: pointer;
}

nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

nav a.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
    border-color: transparent;
}

nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
nav a.active svg { opacity: 1; color: var(--accent-secondary); }

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Header */
header {
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    flex-shrink: 0;
}

.header-search { width: 350px; }
.header-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 8px 16px;
    color: #fff;
    outline: none;
    transition: 0.2s;
    font-size: 0.9rem;
}
.header-search input:focus {
    border-color: rgba(255,255,255,0.3);
    background: rgba(0, 0, 0, 0.4);
}

.social-nav { display: flex; gap: 10px; }
.social-link {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none;
}
.social-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.social-link svg { width: 20px; height: 20px; fill: currentColor; }

/* Content Area */
main {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    scroll-behavior: smooth;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}
.content-section.active { display: block; }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 30px; letter-spacing: -0.5px; color: #fff; }
h2 { font-size: 1.8rem; margin: 50px 0 25px; color: #fff; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; font-weight: 600; }
h3 { font-size: 1.35rem; margin: 35px 0 20px; color: #e2e8f0; font-weight: 600; }

p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.05rem; line-height: 1.8; }
ul, ol { margin-left: 25px; margin-bottom: 25px; color: var(--text-muted); font-size: 1.05rem; line-height: 1.8; }
li { margin-bottom: 10px; }

hr { border: 0; border-top: 1px solid var(--border-light); margin: 40px 0; }

/* Admonitions (MkDocs Material Style) */
.info-box, .tip-box {
    margin: 2em 0;
    padding: 0 1rem;
    border-radius: 0.4rem;
    box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.15);
    background-color: var(--bg-card);
    border-left: 0.3rem solid;
    font-size: 0.95rem;
    overflow: hidden;
}

.info-box strong, .tip-box strong {
    display: block;
    margin: 0 -1rem;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-weight: 700;
    background-color: rgba(255,255,255,0.03);
    position: relative;
    font-family: var(--font-sans);
}

.info-box strong::before, .tip-box strong::before {
    content: "";
    position: absolute;
    left: 0.8rem;
    top: 0.7rem;
    width: 1.2rem;
    height: 1.2rem;
    background-color: currentColor;
    mask-size: cover;
    -webkit-mask-size: cover;
}

.info-box { border-left-color: #3b82f6; }
.info-box strong {
    color: #3b82f6;
}
.info-box strong::before {
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2Z'/%3E%3C/svg%3E");
}

.tip-box { border-left-color: #10b981; }
.tip-box strong {
    color: #10b981;
}
.tip-box strong::before {
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18a8 8 0 0 1-8-8 8 8 0 0 1 8-8 8 8 0 0 1 8 8 8 8 0 0 1-8 8m-1-13h2v6h-2V7m0 8h2v2h-2v-2Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18a8 8 0 0 1-8-8 8 8 0 0 1 8-8 8 8 0 0 1 8 8 8 8 0 0 1-8 8m-1-13h2v6h-2V7m0 8h2v2h-2v-2Z'/%3E%3C/svg%3E");
}

/* Code and Tables */
.code-wrapper {
    background: var(--bg-code);
    border-radius: 8px;
    margin: 2em 0;
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    border: 1px solid var(--border-light);
}
pre { overflow-x: auto; padding: 1.25em; margin: 0; }
pre code { font-family: var(--font-mono); font-size: 0.9rem; color: #e2e8f0; background: transparent; padding: 0; border-radius: 0; }

.copy-btn {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    z-index: 5;
    padding: 6px 12px;
    font-size: 0.8rem;
}
.copy-btn:hover { color: #fff; background: rgba(255,255,255,0.1); border-color: var(--border-hover); }

table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.95rem; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
th { color: var(--text-main); font-weight: 700; border-bottom: 2px solid var(--border-light); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; }
td { color: var(--text-muted); }
tr:hover td { color: #fff; background: rgba(255,255,255,0.02); }

/* Inline Code */
code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 0.2em;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.85em;
    word-break: break-word;
}

/* Responsive */
@media (max-width: 1024px) {
    aside { width: 80px; padding: 20px 10px; }
    .logo, .nav-group-title, .nav-text { display: none; }
    nav a { justify-content: center; padding: 15px; }
}
