/* ========================================
   RESET
======================================== */

* {
    box-sizing: border-box;

    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;

    scroll-padding-top: 96px;
}


.dev-body {

    min-height: 100vh;

    background:
        radial-gradient(
            ellipse 70% 40% at 50% 0%,
            rgba(110, 70, 180, 0.10),
            transparent 70%
        ),
        #090909;

    color: #eeeeee;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}


button,
input,
select {
    font-family: inherit;
}


code,
pre {

    font-family:
        "JetBrains Mono",
        "Cascadia Code",
        Consolas,
        monospace;
}


a {
    color: rgba(190, 165, 255, 0.9);
}


[hidden] {
    display: none !important;
}


/* ========================================
   PAGE
======================================== */

.dev-page {

    width: 100%;

    max-width: 1120px;

    margin: 0 auto;

    padding:
        128px 32px 90px;
}


/* ========================================
   HERO
======================================== */

.dev-hero {

    max-width: 720px;

    margin-bottom: 64px;
}


.dev-eyebrow {

    margin-bottom: 14px;

    color: rgba(180, 150, 255, 0.75);

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.dev-hero h1 {

    color: #f1f1f1;

    font-size: 40px;

    font-weight: 500;

    letter-spacing: -1.2px;

    line-height: 1.1;
}


.dev-hero-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 28px;
}


.dev-base-url {

    display: inline-flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 28px;

    padding:
        8px 8px 8px 14px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 11px;

    background:
        rgba(255, 255, 255, 0.03);
}


.dev-base-url-label {

    color: #555;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


.dev-base-url code {

    color: #ddd;

    font-size: 13px;
}


/* ========================================
   BUTTONS
======================================== */

.dev-button {

    height: 40px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding:
        0 18px;

    border:
        1px solid rgba(255, 255, 255, 0.10);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.055);

    color: #bbb;

    font-size: 13px;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.dev-button:hover {

    background:
        rgba(255, 255, 255, 0.10);

    border-color:
        rgba(255, 255, 255, 0.17);

    color: #fff;

    transform:
        translateY(-1px);
}


.dev-button.primary {

    border-color:
        rgba(150, 110, 220, 0.35);

    background:
        rgba(110, 70, 180, 0.28);

    color: #f1ecff;
}


.dev-button.primary:hover {

    background:
        rgba(130, 90, 200, 0.38);

    border-color:
        rgba(170, 135, 240, 0.5);
}


.dev-button:disabled {

    opacity: 0.5;

    cursor: default;

    transform: none;
}


.dev-copy {

    height: 30px;

    padding:
        0 12px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.05);

    color: #999;

    font-size: 11px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.dev-copy:hover {

    background:
        rgba(255, 255, 255, 0.10);

    color: #eee;
}


.dev-copy.done {

    color: rgba(150, 220, 170, 0.9);
}


/* ========================================
   LAYOUT
======================================== */

.dev-layout {

    display: grid;

    grid-template-columns:
        180px minmax(0, 1fr);

    gap: 48px;

    align-items: start;
}


.dev-nav {

    position: sticky;

    top: 104px;

    display: flex;

    flex-direction: column;

    gap: 2px;
}


.dev-nav a {

    padding:
        8px 12px;

    border-left:
        1px solid rgba(255, 255, 255, 0.06);

    color: #666;

    font-size: 13px;

    text-decoration: none;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}


.dev-nav a:hover {
    color: #ccc;
}


.dev-nav a.active {

    border-left-color:
        rgba(180, 150, 255, 0.8);

    color: #eee;
}


.dev-content {
    min-width: 0;
}


/* ========================================
   SECTIONS
======================================== */

.dev-section {

    padding-bottom: 56px;

    margin-bottom: 56px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.05);
}


.dev-section:last-child {

    border-bottom: none;

    margin-bottom: 0;
}


.dev-section h2 {

    margin-bottom: 14px;

    color: #f1f1f1;

    font-size: 22px;

    font-weight: 500;

    letter-spacing: -0.5px;
}


.dev-section h3 {

    margin:
        32px 0 10px;

    color: #e6e6e6;

    font-size: 16px;

    font-weight: 500;
}


.dev-section p,
.dev-steps {

    margin-bottom: 16px;

    color: #a0a0a0;

    font-size: 14px;

    line-height: 1.65;
}


.dev-section p code,
.dev-steps code,
.dev-table code {

    padding:
        2px 6px;

    border-radius: 5px;

    background:
        rgba(255, 255, 255, 0.06);

    color: #ddd;

    font-size: 12px;
}


.dev-muted {

    color: #6a6a6a !important;

    font-size: 13px !important;
}


.dev-note {

    padding:
        14px 16px;

    border:
        1px solid rgba(150, 110, 220, 0.16);

    border-radius: 12px;

    background:
        rgba(110, 70, 180, 0.08);

    color: #a99fc2 !important;

    font-size: 13px !important;
}


.dev-steps {

    padding-left: 20px;
}


.dev-steps li {
    margin-bottom: 6px;
}


.dev-steps b {

    color: #ddd;

    font-weight: 500;
}


/* ========================================
   PANEL / KEYS
======================================== */

.dev-panel {

    padding: 22px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.035);

    backdrop-filter:
        blur(14px);

    -webkit-backdrop-filter:
        blur(14px);
}


.keys-state {

    padding:
        24px 0;

    color: #666;

    font-size: 13px;

    text-align: center;
}


.keys-guest {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;
}


.keys-guest-title {

    color: #ddd;

    font-size: 15px;
}


.keys-guest .dev-button {
    margin-top: 6px;
}


.key-form {

    display: flex;

    flex-wrap: wrap;

    align-items: flex-end;

    gap: 14px;
}


.key-form-field {

    display: flex;

    flex-direction: column;

    gap: 7px;
}


.key-form-field.grow {

    flex: 1 1 200px;
}


.key-form-field label,
.key-form-label {

    color: #666;

    font-size: 11px;
}


.key-form input[type=text],
.key-form select {

    height: 40px;

    width: 100%;

    padding:
        0 12px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 10px;

    outline: none;

    background:
        rgba(0, 0, 0, 0.28);

    color: #eee;

    font-size: 13px;

    transition:
        border-color 0.2s ease;
}


.key-form select {

    padding-right: 30px;

    cursor: pointer;
}


.key-form select option {

    background: #151515;
}


.key-form input[type=text]:focus,
.key-form select:focus {

    border-color:
        rgba(180, 150, 255, 0.45);
}


.segmented {

    height: 40px;

    display: inline-flex;

    padding: 3px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 10px;

    background:
        rgba(0, 0, 0, 0.28);
}


.segmented label {

    display: flex;

    cursor: pointer;
}


.segmented input {

    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.segmented span {

    display: flex;

    align-items: center;

    padding:
        0 12px;

    border-radius: 7px;

    color: #777;

    font-size: 12px;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.segmented input:checked + span {

    background:
        rgba(255, 255, 255, 0.09);

    color: #eee;
}


.segmented input:focus-visible + span {

    outline:
        1px solid rgba(180, 150, 255, 0.6);
}


.key-status {

    min-height: 18px;

    margin-top: 12px;

    color: #e58b8b;

    font-size: 12px;
}


.key-reveal {

    margin-top: 4px;

    margin-bottom: 18px;

    padding: 16px;

    border:
        1px solid rgba(120, 200, 150, 0.22);

    border-radius: 12px;

    background:
        rgba(70, 160, 110, 0.08);
}


.key-reveal-title {

    margin-bottom: 4px;

    color: #bfe8cc;

    font-size: 14px;
}


.key-reveal-row {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 12px;
}


.key-reveal-row code {

    flex: 1;

    min-width: 0;

    padding:
        9px 12px;

    border-radius: 8px;

    background:
        rgba(0, 0, 0, 0.35);

    color: #f1f1f1;

    font-size: 12px;

    overflow-x: auto;

    white-space: nowrap;
}


.keys-list {

    display: flex;

    flex-direction: column;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}


.keys-empty {

    padding:
        22px 0 4px;

    color: #5e5e5e;

    font-size: 13px;

    text-align: center;
}


.key-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    padding:
        16px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.05);
}


.key-row:last-child {

    border-bottom: none;

    padding-bottom: 0;
}


.key-row.expired .key-main {
    opacity: 0.5;
}


.key-main {
    min-width: 0;
}


.key-name {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    color: #e6e6e6;

    font-size: 14px;
}


.key-meta {

    display: flex;

    flex-wrap: wrap;

    gap: 6px 14px;

    margin-top: 6px;

    color: #5e5e5e;

    font-size: 12px;
}


.key-meta code {

    color: #8a8a8a;

    font-size: 11px;
}


.key-revoke {

    flex-shrink: 0;

    height: 32px;

    padding:
        0 12px;

    border:
        1px solid rgba(229, 139, 139, 0.18);

    border-radius: 8px;

    background: transparent;

    color: rgba(229, 139, 139, 0.8);

    font-size: 12px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.key-revoke:hover {

    background:
        rgba(229, 139, 139, 0.1);

    color: #f0a0a0;
}


.key-revoke.confirming {

    border-color:
        rgba(229, 139, 139, 0.5);

    background:
        rgba(200, 80, 80, 0.22);

    color: #ffd0d0;
}


.key-revoke:disabled {

    opacity: 0.6;

    cursor: default;
}


/* ========================================
   BADGES
======================================== */

.access-badge {

    display: inline-flex;

    align-items: center;

    padding:
        3px 7px;

    border-radius: 6px;

    font-family: inherit;

    font-size: 9px;

    font-weight: 600;

    letter-spacing: 1px;

    text-transform: uppercase;

    white-space: nowrap;
}


.access-badge.public {

    color: rgba(255, 255, 255, 0.42);

    background:
        rgba(255, 255, 255, 0.055);
}


.access-badge.read {

    color: rgba(140, 200, 230, 0.85);

    background:
        rgba(70, 140, 180, 0.13);
}


.access-badge.write {

    color: rgba(190, 165, 255, 0.9);

    background:
        rgba(110, 70, 180, 0.18);
}


.access-badge.expired {

    color: rgba(229, 139, 139, 0.85);

    background:
        rgba(229, 139, 139, 0.10);
}


/* ========================================
   CODE
======================================== */

.code-block {

    margin-bottom: 16px;

    padding:
        16px 18px;

    border:
        1px solid rgba(255, 255, 255, 0.06);

    border-radius: 12px;

    background:
        rgba(0, 0, 0, 0.38);

    color: #d6d6d6;

    font-size: 12.5px;

    line-height: 1.6;

    overflow-x: auto;

    white-space: pre;

    tab-size: 4;
}


.code-tabs {

    position: relative;
}


.code-tabs-bar {

    display: flex;

    gap: 4px;

    margin-bottom: 8px;
}


.code-tabs-bar button {

    height: 30px;

    padding:
        0 12px;

    border: 1px solid transparent;

    border-radius: 8px;

    background: transparent;

    color: #666;

    font-size: 12px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.code-tabs-bar button:hover {
    color: #bbb;
}


.code-tabs-bar button.active {

    border-color:
        rgba(255, 255, 255, 0.08);

    background:
        rgba(255, 255, 255, 0.06);

    color: #eee;
}


.code-copy {

    position: absolute;

    top: 46px;

    right: 10px;
}


/* ========================================
   TABLES & LIMITS
======================================== */

.dev-table-wrap {

    margin-bottom: 16px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 12px;

    overflow-x: auto;
}


.dev-table {

    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}


.dev-table th {

    padding:
        11px 16px;

    background:
        rgba(255, 255, 255, 0.03);

    color: #666;

    font-size: 11px;

    font-weight: 500;

    text-align: left;
}


.dev-table td {

    padding:
        12px 16px;

    border-top:
        1px solid rgba(255, 255, 255, 0.05);

    color: #a0a0a0;

    line-height: 1.5;

    vertical-align: top;
}


.dev-table td:first-child {

    width: 1%;

    color: #ddd;

    white-space: nowrap;
}


.limits-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 16px;
}


.limit-card {

    padding: 16px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.03);
}


.limit-value {

    color: #f1f1f1;

    font-size: 18px;

    font-weight: 500;

    letter-spacing: -0.4px;
}


.limit-label {

    margin-top: 4px;

    color: #666;

    font-size: 12px;
}


/* ========================================
   ENDPOINTS
======================================== */

.endpoint-group {
    margin-bottom: 28px;
}


.endpoint-group-title {

    margin-bottom: 10px;

    color: #555;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;
}


/* пояснение к группе эндпоинтов (например, «Слушать вместе») */
.endpoint-group-note {

    margin: -2px 0 12px;

    font-size: 13px;

    line-height: 1.55;
}


.endpoint {

    margin-bottom: 6px;

    border:
        1px solid rgba(255, 255, 255, 0.06);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.025);

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}


.endpoint:hover,
.endpoint[open] {

    border-color:
        rgba(255, 255, 255, 0.11);

    background:
        rgba(255, 255, 255, 0.04);
}


.endpoint summary {

    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        12px 14px;

    cursor: pointer;

    list-style: none;
}


.endpoint summary::-webkit-details-marker {
    display: none;
}


.endpoint summary .access-badge {
    margin-left: auto;
}


.method {

    flex-shrink: 0;

    width: 58px;

    padding:
        4px 0;

    border-radius: 6px;

    font-family:
        "JetBrains Mono",
        Consolas,
        monospace;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.5px;

    text-align: center;
}


.method.get {

    color: rgba(140, 200, 230, 0.95);

    background:
        rgba(70, 140, 180, 0.14);
}


.method.post {

    color: rgba(150, 220, 170, 0.95);

    background:
        rgba(70, 160, 110, 0.14);
}


.method.put,
.method.patch {

    color: rgba(235, 200, 130, 0.95);

    background:
        rgba(190, 140, 60, 0.14);
}


.method.delete {

    color: rgba(235, 140, 140, 0.95);

    background:
        rgba(200, 80, 80, 0.14);
}


.endpoint-path {

    min-width: 0;

    color: #ddd;

    font-size: 13px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.path-param {
    color: rgba(190, 165, 255, 0.9);
}


.endpoint-body {

    padding:
        2px 14px 4px;
}


.endpoint-body p {

    color: #9a9a9a;

    font-size: 13px;
}


.endpoint-example-label {

    margin-bottom: 6px;

    color: #555;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


.endpoint-body .code-block {
    font-size: 12px;
}


/* ========================================
   FOOTER (как на главной)
======================================== */

.archive-footer {

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    padding:
        70px 30px 45px;

    background:
        rgba(7, 7, 7, 0.82);

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}


.footer-content {

    width: 100%;

    max-width: 900px;

    display: flex;

    flex-direction: column;

    align-items: center;
}


.footer-brand {

    display: flex;

    align-items: center;

    gap: 14px;
}


.footer-logo {

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid rgba(255, 255, 255, 0.13);

    border-radius: 11px;

    background:
        rgba(255, 255, 255, 0.055);

    color: #eee;

    font-size: 16px;

    font-weight: 600;
}


.footer-title {

    color: #eee;

    font-size: 17px;

    font-weight: 500;
}


.footer-description {

    margin-top: 5px;

    color: #666;

    font-size: 11px;
}


.footer-divider {

    width: 100%;

    height: 1px;

    margin:
        38px 0 28px;

    background:
        rgba(255, 255, 255, 0.06);
}


.footer-social-title {

    margin-bottom: 16px;

    color: #555;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.footer-socials {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 9px;
}


.social-link {

    min-width: 90px;

    padding:
        10px 18px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.035);

    color: #888;

    font-size: 11px;

    text-align: center;

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


.social-link:hover {

    background:
        rgba(255, 255, 255, 0.08);

    border-color:
        rgba(255, 255, 255, 0.14);

    color: #eee;
}


.footer-bottom {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 55px;

    color: #444;

    font-size: 10px;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 900px) {

    .dev-layout {

        grid-template-columns: 1fr;

        gap: 0;
    }


    .dev-nav {

        position: static;

        flex-direction: row;

        flex-wrap: wrap;

        gap: 6px;

        margin-bottom: 40px;
    }


    .dev-nav a {

        padding:
            7px 12px;

        border: 1px solid rgba(255, 255, 255, 0.07);

        border-radius: 8px;
    }


    .dev-nav a.active {

        border-color:
            rgba(180, 150, 255, 0.4);
    }


    .limits-grid {

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


@media (max-width: 600px) {

    .archive-header {

        padding:
            0 16px;
    }


    .dev-page {

        padding:
            108px 16px 70px;
    }


    .dev-hero h1 {
        font-size: 30px;
    }


    .dev-panel {
        padding: 16px;
    }


    .key-form > .dev-button {
        width: 100%;
    }


    .segmented {
        width: 100%;
    }


    .segmented label {
        flex: 1;
    }


    .segmented span {

        width: 100%;

        justify-content: center;
    }


    .key-row {

        flex-direction: column;

        align-items: flex-start;
    }


    .endpoint summary {

        flex-wrap: wrap;

        gap: 8px 10px;
    }


    .endpoint-path {

        order: 3;

        flex-basis: 100%;

        white-space: normal;

        word-break: break-all;
    }


    .footer-bottom {

        flex-direction: column;

        gap: 8px;
    }
}
