.docs-container {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 2rem;
    width: min(100%, 1440px);
    margin: 7rem auto 0;
    padding: 1.5rem 2rem 2rem;
    height: calc(100vh - 7rem);
    overflow: hidden;
    align-items: stretch;
}

.docs-sidebar {
    position: relative;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(9, 16, 30, 0.86));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 18px 38px rgba(2, 6, 23, 0.22);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 999px;
}

.docs-content {
    position: relative;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(9, 16, 30, 0.86));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 18px 42px rgba(2, 6, 23, 0.24);
}

.docs-header {
    margin-bottom: 2.2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.docs-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: var(--text-strong);
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin-bottom: 1rem;
}

.docs-header p {
    max-width: 48rem;
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.75;
}

.docs-section {
    margin-bottom: 3rem;
}

.docs-section h2 {
    font-size: 1.65rem;
    color: var(--text-strong);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.docs-section h3 {
    font-size: 1.22rem;
    color: var(--text-strong);
    margin: 1.5rem 0 1rem;
}

.docs-section p,
.docs-section li {
    color: var(--text-soft);
    line-height: 1.72;
}

.docs-section p {
    margin-bottom: 1rem;
}

.docs-section code {
    padding: 0.16rem 0.42rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.45rem;
    background: rgba(2, 6, 23, 0.46);
    color: #c5f4ff;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.9em;
}

.code-block {
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.code-block pre {
    color: #93eaff;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-width: max-content;
    margin: 0;
}

.feature-list,
.steps-list {
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list,
.feature-list-2 {
    list-style: none;
}

.feature-list li,
.feature-list-2 li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 1rem;
}

.feature-list li::before,
.feature-list-2 li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent-2);
}

.image-preview,
.video-container {
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.42);
}

.image-preview img {
    width: 100%;
    height: auto;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.info-box,
.warning-box {
    padding: 1.2rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 1rem;
    color: var(--text-soft);
}

.info-box {
    background: rgba(66, 215, 255, 0.08);
    border: 1px solid rgba(66, 215, 255, 0.16);
}

.warning-box {
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.16);
}

.steps-list {
    counter-reset: steps;
    list-style: none;
}

.steps-list li {
    counter-increment: steps;
    position: relative;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.95rem;
    background: rgba(15, 23, 42, 0.42);
}

.steps-list li::before {
    content: counter(steps);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: rgba(66, 215, 255, 0.16);
    border: 1px solid rgba(149, 240, 255, 0.18);
    color: var(--text-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    overflow: hidden;
}

th,
td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--text-soft);
}

th {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-strong);
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

@media (max-width: 1024px) {
    .docs-container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .docs-container {
        grid-template-columns: 1fr;
        margin-top: 5rem;
        height: auto;
        padding: 1rem;
        overflow: visible;
    }

    .docs-sidebar {
        position: fixed;
        inset: 0;
        height: 100vh;
        max-height: 100vh;
        width: 100%;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .docs-sidebar.show {
        transform: translateX(0);
    }

    .docs-content {
        height: auto;
        min-height: auto;
        overflow: visible;
        padding: 1.35rem;
        min-width: 0;
    }

    .docs-content > * {
        min-width: 0;
    }

    .code-block {
        max-width: 100%;
        overflow-x: auto;
    }

    .code-block pre {
        min-width: 0;
        white-space: pre;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .docs-header h1 {
        font-size: 2rem;
    }

    .docs-section h2 {
        font-size: 1.4rem;
    }

    .docs-section h3 {
        font-size: 1.12rem;
    }

    .mobile-nav-toggle {
        position: fixed;
        right: 1.5rem;
        bottom: 1.5rem;
        width: 3.2rem;
        height: 3.2rem;
        border: 0;
        border-radius: 50%;
        background: linear-gradient(135deg, #7dd3fc 0%, #5eead4 100%);
        color: #03111f;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 12px 28px rgba(66, 215, 255, 0.24);
        z-index: 101;
    }

    .mobile-nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: var(--text-strong);
        font-size: 1.5rem;
        padding: 0.5rem;
        z-index: 1001;
    }
}

@media (min-width: 769px) {
    .mobile-nav-toggle,
    .mobile-nav-close {
        display: none;
    }
}
