:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --ink: #0f172a;
    --muted: #64748b;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --sidebar-width: 320px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(
            circle at top left,
            rgba(102, 126, 234, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at top right,
            rgba(118, 75, 162, 0.12),
            transparent 28%
        ),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.topbar-inner {
    min-height: 72px;
}

.brand {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand i {
    -webkit-text-fill-color: var(--primary);
    color: var(--primary);
}

.shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - 72px);
}

.sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.04);
}

.sidebar-head {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.sidebar-head h4 {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.searchbox {
    position: relative;
}

.searchbox i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.searchbox input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.8rem 0.9rem 0.8rem 2.5rem;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.searchbox input:focus {
    border-color: rgba(102, 126, 234, 0.45);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
}

.nav-group {
    padding: 0.75rem 0;
}

.nav-group-title {
    padding: 0.8rem 1.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.platform-link,
.endpoint-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.platform-link {
    margin: 0 1rem 0.4rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.platform-link:hover,
.platform-link.active {
    border-color: rgba(102, 126, 234, 0.35);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

.platform-link.active {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.08),
        rgba(118, 75, 162, 0.08)
    );
}

.platform-name {
    font-weight: 700;
    line-height: 1.2;
}

.platform-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.badge-get {
    background: #dbeafe;
    color: #1d4ed8;
}
.badge-post {
    background: #dcfce7;
    color: #15803d;
}
.badge-put {
    background: #fef3c7;
    color: #b45309;
}
.badge-delete {
    background: #fee2e2;
    color: #b91c1c;
}

.content {
    padding: 2rem;
}

.hero-card,
.section-card,
.endpoint-card,
.metric-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -10% -60% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(102, 126, 234, 0.18),
        transparent 65%
    );
    pointer-events: none;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.04em;
}

.hero-copy {
    max-width: 72ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 1rem 0 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-pill {
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    font-weight: 700;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.24);
}

.btn-primary-gradient:hover {
    color: white;
    transform: translateY(-1px);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    padding: 1.2rem;
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}

.metric-label {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.section-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-subtitle {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.endpoint-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.endpoint-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.endpoint-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.endpoint-url {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    overflow-x: auto;
    white-space: nowrap;
}

.endpoint-description {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.request-panel {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.request-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.request-extras {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.request-group {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
    padding: 1rem;
}

.request-group-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.request-rows {
    display: grid;
    gap: 0.6rem;
}

.request-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.6rem;
    align-items: center;
}

.request-row input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    background: white;
    font-size: 0.9rem;
    outline: none;
}

.request-row button {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    color: var(--muted);
}

.request-row button:hover {
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.35);
}

.request-group-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.request-mini-btn {
    border: 1px solid var(--border);
    background: white;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}

.request-mini-btn:hover {
    color: var(--primary);
    border-color: rgba(102, 126, 234, 0.35);
}

.request-method {
    min-width: 5.5rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--ink);
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    cursor: default;
}

.request-url {
    flex: 1 1 420px;
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 0.9rem;
    outline: none;
}

.request-url:focus {
    border-color: rgba(102, 126, 234, 0.45);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
}

.request-send {
    min-width: 9rem;
}

.request-copy {
    min-width: 8rem;
}

.request-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Parameter Documentation Styles */
.params-documentation {
    margin-bottom: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.04), rgba(118, 75, 162, 0.04));
    border: 1px solid rgba(102, 126, 234, 0.15);
    padding: 1.2rem;
}

.param-category {
    margin-bottom: 1rem;
}

.param-category:last-child {
    margin-bottom: 0;
}

.param-category-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.param-item {
    padding: 0.9rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.param-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
}

.param-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.param-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ink);
    padding: 0.2rem 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
}

.param-type {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.param-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.param-required {
    background: #fee2e2;
    color: #b91c1c;
}

.param-optional {
    background: #e0e7ff;
    color: #4c1d95;
}

.param-info {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin: 0.4rem 0;
}

.param-example {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
}

.param-example strong {
    color: var(--muted);
}

.param-example code {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    background: #f1f5f9;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: #1e293b;
    overflow-x: auto;
    white-space: nowrap;
}

.copy-example-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-example-btn:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.request-result {
    display: none;
    margin-top: 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #0f172a;
    color: #e2e8f0;
    overflow: hidden;
}

.request-result-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.request-result-meta {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.request-result-body {
    padding: 1rem;
    max-height: 360px;
    overflow: auto;
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.request-result.ok .request-result-head {
    border-bottom-color: rgba(74, 222, 128, 0.2);
}

.request-result.error .request-result-head {
    border-bottom-color: rgba(248, 113, 113, 0.2);
}

.request-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.response-copy-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.response-copy-bar .copy-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.response-copy-bar .copy-actions button {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.response-copy-bar .copy-actions button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.detail-box {
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    padding: 1rem;
}

.detail-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.detail-value {
    font-weight: 700;
    color: var(--ink);
    word-break: break-word;
}

.placeholder-state {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--muted);
}

.placeholder-state i {
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.nav-separator {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 1rem;
}

.search-empty {
    display: none;
    padding: 0 1.5rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .shell {
        grid-template-columns: 290px minmax(0, 1fr);
    }

    .metrics,
    .details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .content {
        padding-top: 1.25rem;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }

    .hero-card,
    .section-card,
    .endpoint-card,
    .metric-card {
        border-radius: 18px;
    }

    .metrics,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
    }

    .request-extras,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .platform-link {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }
}
