:root {
    --cm-sky: #55bbec;
    --cm-pink: #FF85CB;
    --cm-mint: #00C7B4;
    --cm-yellow: #ffd435;
    --cm-black: #000;
    --cm-white: #fff;
    --text-main: #050505;
    --text-soft: rgba(0, 0, 0, .62);
    --text-muted: rgba(0, 0, 0, .44);
    --line: rgba(0, 0, 0, .08);
    --line-strong: rgba(0, 0, 0, .12);
    --surface: rgba(255, 255, 255, .82);
    --surface-solid: #fff;
    --page: #f7fbfc;
    --code-bg: #050505;
    --shadow-sm: 0 10px 26px rgba(0, 0, 0, .06);
    --shadow-md: 0 22px 70px rgba(0, 0, 0, .10);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 13px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Manrope, Inter, Arial, sans-serif;
    color: var(--text-main);
    background: #f8fafc;
    min-height: 100vh;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        background-image: linear-gradient(rgba(0,0,0,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.035) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 75%);
    }

.api-docs {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 316px minmax(0, 1fr);
}

.api-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    color: var(--cm-white);
    overflow-y: auto;
    background: #000; /* koyu ama düz */
    border-right: 1px solid rgba(255,255,255,0.08);
}

    .api-sidebar::-webkit-scrollbar {
        width: 8px;
    }

    .api-sidebar::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.18);
        border-radius: 99px;
    }

.api-logo {
    width: 160px; /* istedigin genislik */
    height: auto; /* orani korur */
    display: block;
    object-fit: contain; /* tasma yapmaz */
    margin-bottom: 24px;
}

/* Sidebar içinde ortalamak istersen */
.api-sidebar .api-logo {
    margin-left: auto;
    margin-right: auto;
}

/* Retina / kaliteli görünüm için */
.api-logo {
    image-rendering: -webkit-optimize-contrast;
}   

.menu-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 26px 0 10px;
    padding: 0 12px;
    color: rgba(255,255,255,.48);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
}

    .menu-group-title::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--cm-yellow);
        box-shadow: 0 0 0 4px rgba(255,212,53,.12);
    }

.menu-item {
    position: relative;
    width: 100%;
    border: 1px solid transparent;
    text-align: left;
    cursor: pointer;
    color: rgba(255,255,255,.68);
    background: transparent;
    border-radius: 16px;
    padding: 13px 14px 13px 16px;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

    .menu-item:hover {
        transform: translateX(3px);
        color: var(--cm-white);
        background: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.10);
    }

    .menu-item.active {
        background: rgba(0, 199, 180, 0.12);
        color: #00C7B4;
        border-color: rgba(0,199,180,0.25);
        box-shadow: none;
    }

        .menu-item.active::before {
            content: "";
            position: absolute;
            left: 8px;
            top: 50%;
            width: 4px;
            height: 38%;
            transform: translateY(-50%);
            border-radius: 99px;
            background: #00C7B4;
        }

.api-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1220px;
    padding: 52px 56px 72px;
}
.doc-section {
    display: none;
}

    .doc-section.active {
        display: block;
        animation: sectionIn .22s ease both;
    }

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    margin: 0 0 14px;
    color: var(--cm-black);
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.1;
    letter-spacing: -.065em;
    font-weight: 950;
}

h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin: 26px 0 10px;
    color: var(--cm-black);
    line-height: 1.15;
    letter-spacing: -.035em;
    font-weight: 900;
}

    h2::before {
        content: "";
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: #00C7B4;
        box-shadow: none;
    }

p {
    line-height: 1.7;
    color: var(--text-soft);
}

.general-info-grid,
.endpoint-list {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.doc-article,
.info-card,
.endpoint-card,
.state-box {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.doc-article {
    max-width: 980px;
    margin-bottom: 28px;
    padding: 34px;
    position: relative;
    overflow: hidden;
}



    .doc-article h1 {
        font-size: clamp(24px, 2.5vw, 32px);
        margin-bottom: 18px;
    }

    .doc-article h2 {
        font-size: 18px;
        margin-top: 32px;
    }

.doc-text {
    color: var(--text-soft);
    line-height: 1.78;
    font-size: 16px;
}

.endpoint-doc {
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: var(--shadow-md);
}

    .endpoint-doc > h1::after,
    #intro > h1::after {
        content: "";
        display: block;
        width: 250px;
        height: 3px;
        margin-top: 14px;
        border-radius: 999px;
        background: #00C7B4;
    }

.info-card,
.endpoint-card,
.state-box {
    padding: 24px;
}

.flex-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: flex-start;
}

.info-left {
    font-weight: 900;
    color: var(--cm-black);
}

.info-right {
    color: var(--text-soft);
    line-height: 1.72;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}

.refresh-btn {
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: var(--cm-black);
    color: var(--cm-white);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(0,0,0,.16);
}

.method {
    display: inline-flex;
    min-width: 70px;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    background: #e5e7eb;
    color: #111827;
}

    .method.get {
        background: #10b981;
        color: #fff;
    }

    .method.post {
        background: #3b82f6;
        color: #fff;
    }

    .method.put {
        background: #f59e0b;
        color: #fff;
    }

    .method.delete {
        background: #ef4444;
        color: #fff;
    }

pre {
    position: relative;
    margin: 14px 0 0;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    border: 1px solid #1e293b;
    box-shadow: none;
    padding: 22px;
    overflow: auto;
    line-height: 1.58;
    
}

    

    pre code {
        color: inherit !important;
        font-size: 13.5px;
    }

.state-box {
    color: var(--text-soft);
    margin-bottom: 16px;
}

    .state-box.error,
    .mini-error {
        color: #8a003f;
        background: rgba(255, 133, 203, .18);
        border-color: rgba(255, 133, 203, .38);
        border-radius: 18px;
        padding: 14px;
    }

.code-tabs {
    margin-top: 24px;
}

.code-tab-buttons {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 7px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(0,0,0,.035);
}

.code-tab-btn {
    border: 0;
    cursor: pointer;
    background: transparent;
    color: rgba(0,0,0,.55);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 950;
    border-radius: 999px;
    transition: .18s ease;
}

    .code-tab-btn:hover {
        color: var(--cm-black);
        background: rgba(255,255,255,.62);
    }

    .code-tab-btn.active {
        background: #00C7B4;
        color: #fff;
        box-shadow: none;
    }

.code-tab-panel {
    display: none;
}

    .code-tab-panel.active {
        display: block;
        animation: sectionIn .18s ease both;
    }

    .code-tab-panel pre {
        margin-top: 0;
    }

.api-search input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: var(--cm-white);
    border-radius: 16px;
    padding: 13px 14px;
    outline: none;
    margin-bottom: 16px;
}

    .api-search input::placeholder {
        color: rgba(255,255,255,.50);
    }

::selection {
    background: var(--cm-yellow);
    color: var(--cm-black);
}

@media (max-width: 980px) {
    .api-docs {
        grid-template-columns: 1fr;
    }

    .api-sidebar {
        position: relative;
        height: auto;
        border-right: 0;
    }

    .api-content {
        padding: 30px 18px 54px;
    }

    .doc-article {
        padding: 24px;
        border-radius: 24px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .flex-card {
        grid-template-columns: 1fr;
    }

    .code-tab-buttons {
        border-radius: 22px;
    }
}


/* ===============================
   MOBILE OFF-CANVAS MENU
   =============================== */
.mobile-menu-toggle { display: none; }
.mobile-menu-backdrop { display: none; }

@media (max-width: 980px) {
    body { overflow-x: hidden; }
    body.menu-open { overflow: hidden; }

    .api-docs {
        display: block;
        min-height: 100vh;
    }

    .mobile-menu-toggle {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1002;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 14px;
        background: #000;
        box-shadow: 0 12px 28px rgba(0,0,0,.22);
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 19px;
        height: 2px;
        margin: 0 auto;
        border-radius: 99px;
        background: #fff;
        transition: transform .22s ease, opacity .22s ease;
    }

    body.menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    body.menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(0,0,0,.46);
        backdrop-filter: blur(3px);
        transition: opacity .22s ease, visibility .22s ease;
    }

    body.menu-open .mobile-menu-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .api-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1001;
        width: min(86vw, 330px);
        height: 100dvh;
        padding: 72px 14px 22px;
        overflow-y: auto;
        border-right: 1px solid rgba(255,255,255,.10);
        transform: translateX(-105%);
        transition: transform .25s ease;
    }

    body.menu-open .api-sidebar { transform: translateX(0); }

    .api-sidebar .api-logo {
        width: 138px;
        margin-bottom: 20px;
    }

    .menu-group-title {
        margin: 22px 0 9px;
        font-size: 10px;
    }

    .menu-item {
        padding: 12px 13px 12px 15px;
        font-size: 13px;
        border-radius: 14px;
    }

    .api-content {
        width: 100%;
        max-width: none;
        padding: 78px 12px 44px;
    }

    h1 {
        font-size: 24px;
        letter-spacing: -.045em;
    }

    .endpoint-doc > h1::after,
    #intro > h1::after {
        width: 96px;
        margin-top: 12px;
    }

    .general-info-grid,
    .endpoint-list {
        gap: 14px;
        margin-top: 20px;
    }

    .doc-article,
    .info-card,
    .endpoint-card,
    .state-box { border-radius: 18px; }

    .doc-article,
    .info-card,
    .endpoint-card { padding: 18px 16px; }

    .flex-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-right,
    .doc-text,
    p {
        font-size: 14px;
        line-height: 1.65;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .refresh-btn { width: 100%; }

    .code-tab-buttons {
        display: flex;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        border-radius: 16px;
    }

    .code-tab-btn { white-space: nowrap; }

    pre {
        max-width: 100%;
        padding: 16px;
        font-size: 12px;
        border-radius: 12px;
    }

    pre code { font-size: 12px; }
}

@media (max-width: 480px) {
    .api-content {
        padding-left: 8px;
        padding-right: 8px;
    }
    h1 { font-size: 22px; }
    h2 { font-size: 17px; }
    .doc-article,
    .info-card,
    .endpoint-card { padding: 16px 14px; }
}
