:root {
    --bg: #0b0f14;
    --sidebar: #0d1117;
    --panel: #161b22;
    --text: #e6edf3;
    --muted: #848d97;
    --brand: #7c5cff;
    --brand-light: #9d85ff;
    --border: #30363d;
    --active-bg: rgba(124, 92, 255, 0.1);
    --code-bg: #0d1117;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 10px;
}

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

* {
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}

/* --- Header --- */
.header {
    height: 60px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    background: var(--bg);
    z-index: 100;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    color: var(--text);
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--brand), #35d0ff);
    border-radius: 50%;
}

.nav-items {
    display: flex;
    gap: 24px;
}

.nav-items a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-items a:hover,
.nav-items a.active {
    color: var(--text);
}

/* --- Main Layout --- */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
    overflow-y: auto;
    padding: 24px 12px;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 12px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: block;
    padding: 8px 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.sidebar-nav li a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav li a.active {
    color: var(--brand-light);
    background: var(--active-bg);
    font-weight: 600;
}

/* --- Content Area --- */
.content-area {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 40px 60px;
    display: flex;
    justify-content: center;
}

.content-wrapper {
    max-width: 800px;
    width: 100%;
}

/* --- Right Sidebar (On this page) --- */
.right-sidebar {
    width: 240px;
    padding: 40px 24px;
    flex-shrink: 0;
    display: block;
}

@media (max-width: 1200px) {
    .right-sidebar {
        display: none;
    }
}

.otp-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.otp-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--border);
}

.otp-nav li a {
    display: block;
    padding: 4px 16px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.otp-nav li a:hover {
    color: var(--text);
}

.otp-nav li a.active {
    color: var(--brand-light);
    font-weight: 600;
    border-left: 2px solid var(--brand);
    margin-left: -1.5px;
    transition: all 0.2s;
}

/* --- Typography & Elements --- */
h1 {
    font-size: 32px;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    margin-top: 48px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 24px;
}

h3 {
    font-size: 18px;
    margin-top: 32px;
    margin-bottom: 16px;
}

p {
    color: var(--muted);
    margin-bottom: 20px;
}

b {
    color: var(--text);
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 24px 0;
    position: relative;
}

.code-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: var(--text);
    border-color: var(--muted);
}

pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

.callout {
    padding: 16px;
    background: rgba(124, 92, 255, 0.05);
    border: 1px solid rgba(124, 92, 255, 0.2);
    border-radius: var(--radius);
    margin: 24px 0;
}

.callout-title {
    font-weight: 600;
    color: var(--brand-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.tag {
    display: inline-block;
    padding: 2px 6px;
    background: var(--active-bg);
    color: var(--brand-light);
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
}

/* --- Footer --- */
.footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 60px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .content-area {
        padding: 24px;
    }

    h1 {
        font-size: 28px;
    }
}