/* ============================================================
   Muyuan behavior captcha - api documentation styles
   ============================================================ */

:root {
    --brand: #ff6b35;
    --brand-hover: #e85a24;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --bg: #f7f8fa;
    --card: #ffffff;
    --code-bg: #0f172a;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--bg);
}

.docs-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.docs-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}

.docs-brand img {
    height: 26px;
    width: auto;
    max-width: 120px;
}

.docs-brand span {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.docs-header-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-left: 18px;
}

.docs-header-links a:hover { color: var(--brand); }

.docs-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 20px 60px;
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 40px;
}

.docs-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 8px;
}

.docs-sidebar a {
    display: block;
    padding: 7px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    border-left: 2px solid transparent;
}

.docs-sidebar a:hover { color: var(--brand); background: #fff; }

.docs-sidebar a.active {
    color: var(--brand);
    font-weight: 600;
    border-left-color: var(--brand);
    background: #fff;
}

.docs-content {
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 48px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.docs-content h2 {
    font-size: 22px;
    margin: 44px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.docs-content h2:first-child { margin-top: 0; }

.docs-content h3 {
    font-size: 16px;
    margin: 26px 0 10px;
}

.docs-content p { margin: 10px 0; color: #374151; }

.docs-content ul, .docs-content ol {
    margin: 10px 0 10px 22px;
    color: #374151;
}

.docs-content li { margin: 6px 0; }

.docs-content a { color: var(--brand); text-decoration: none; }
.docs-content a:hover { text-decoration: underline; }

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 18px;
    font-size: 13.5px;
}

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

.doc-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.doc-table code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

pre.code-block {
    background: var(--code-bg);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.65;
    margin: 12px 0 18px;
}

pre.code-block code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }

.tip-box {
    border-left: 4px solid var(--brand);
    background: #fff7f2;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    font-size: 13.5px;
    color: #374151;
}

.warn-box {
    border-left: 4px solid #d97706;
    background: #fffbeb;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    font-size: 13.5px;
    color: #374151;
}

.endpoint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.endpoint .method {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #059669;
}

.endpoint .path {
    font-family: Consolas, monospace;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.method-post { background: #2563eb !important; }
.method-get { background: #059669 !important; }

.docs-footer {
    border-top: 1px solid var(--border);
    background: #fff;
}

.docs-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.docs-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.docs-footer a:hover { color: var(--brand); }

@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
        padding: 16px 14px 40px;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 0;
    }

    .docs-sidebar a {
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 4px 12px;
        font-size: 12.5px;
    }

    .docs-sidebar a.active {
        border-left-color: var(--border);
    }

    .docs-content {
        padding: 24px 18px;
    }
}
