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

:root {
    --primary: #334155;
    --primary-2: #0f172a;
    --text: #2c3e50;
    --muted: #666;
    --bg-soft: #f1f5f9;
    --border: #e6eaf2;
    --shadow: 0 10px 30px rgba(0,0,0,0.2);
    --shadow-soft: 0 8px 20px rgba(0,0,0,0.10);
}

body.doc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #111827;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    min-height: 100vh;
}

body.doc .container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

body.doc .nav-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

body.doc .nav-bar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0 1rem;
    flex-wrap: wrap;
}

body.doc .nav-bar a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-weight: 600;
}

body.doc .nav-bar a:hover {
    background-color: rgba(255,255,255,0.18);
}

body.doc .nav-bar .current {
    background-color: rgba(255,255,255,0.26);
}

body.doc p {
    color: var(--muted);
    margin-top: 10px;
}

body.doc a {
    color: var(--primary);
}

body.doc ul,
body.doc ol {
    margin-top: 10px;
    padding-left: 22px;
}

body.doc li {
    margin: 6px 0;
}

body.doc code {
    background-color: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

body.doc pre {
    background-color: #111827;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    box-shadow: var(--shadow-soft);
}

body.doc pre code {
    background: none;
    padding: 0;
    color: inherit;
}

body.doc .highlight,
body.doc .info,
body.doc .json-schema,
body.doc .troubleshooting {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--bg-soft);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

body.doc .highlight:empty,
body.doc .info:empty,
body.doc .json-schema:empty,
body.doc .troubleshooting:empty {
    display: none;
}

body.doc p:empty,
body.doc ul:empty,
body.doc ol:empty,
body.doc pre:empty {
    display: none;
}

body.doc h2 {
    color: var(--primary);
    margin-top: 0;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    scroll-margin-top: 100px;
}

body.doc h3 {
    color: var(--text);
    margin-top: 18px;
    margin-bottom: 10px;
}

body.doc .toc {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

body.doc .toc ul {
    list-style-type: none;
    padding-left: 0;
}

body.doc .toc li {
    margin: 6px 0;
}

body.doc .toc a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

body.doc .toc a:hover {
    text-decoration: underline;
}

body.doc section {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    background: white;
    margin-top: 18px;
}

body.doc section:first-of-type {
    margin-top: 0;
}

body.doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

body.doc th,
body.doc td {
    border: 1px solid var(--border);
    padding: 12px;
    text-align: left;
}

body.doc th {
    background-color: var(--bg-soft);
    font-weight: bold;
    color: var(--text);
}

body.doc tr:nth-child(even) td {
    background-color: #fbfcff;
}

body.doc tr:hover td {
    background-color: #f7f8fb;
}

body.doc footer {
    text-align: center;
    color: white;
    padding: 1rem 0;
    margin-top: 1rem;
    opacity: 0.85;
}

body.doc footer p {
    color: white;
}

body.doc footer a {
    color: white;
    font-weight: 600;
}

@media (max-width: 768px) {
    body.doc {
        padding: 14px;
    }

    body.doc .container {
        padding: 18px;
    }

    body.doc .nav-bar ul {
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    body.doc section {
        padding: 16px;
    }
}
