/* Documentation Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.docs-sidebar {
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 1rem;
    font-weight: 600;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-section a:hover {
    background: white;
    color: #000;
}

.sidebar-section a.active {
    background: #000;
    color: white;
    font-weight: 500;
}

/* Main Content */
.docs-content {
    padding: 3rem;
    max-width: 900px;
}

.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.doc-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.doc-section h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.doc-section h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.doc-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--gray);
}

.doc-section ul, .doc-section ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--gray);
}

.doc-section li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Info & Warning Boxes */
.info-box, .warning-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #000;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
}

.code-block-header {
    background: #334155;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-block-header span {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.copy-btn {
    background: transparent;
    border: 1px solid #475569;
    color: #cbd5e0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #475569;
    color: white;
}

.code-block pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
}

/* Code Tabs */
.code-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: -1px;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #aaaaaa;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e2e8f0;
}

.tab-btn.active {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
}

.tab-content {
    margin-top: 0 !important;
}

/* Endpoint Cards */
.endpoint-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.http-method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.http-method.get {
    background: #dcfce7;
    color: #166534;
}

.http-method.post {
    background: #dbeafe;
    color: #1e40af;
}

.http-method.put {
    background: #fef3c7;
    color: #92400e;
}

.http-method.delete {
    background: #fee2e2;
    color: #991b1b;
}

.endpoint-header code {
    background: #000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    color: var(--dark);
}

/* Parameters Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.params-table th {
    background: #000;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

.params-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.params-table code {
    background: #000;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--primary);
}

/* SDK Grid */
.sdk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.sdk-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.sdk-card h3 {
    margin-bottom: 1rem;
}

.sdk-card pre {
    background: #000;
    padding: 0.75rem;
    border-radius: 4px;
    overflow-x: auto;
}

.sdk-card code {
    font-size: 0.875rem;
    color: var(--dark);
}

/* Responsive */
@media (max-width: 968px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .docs-content {
        padding: 2rem 1rem;
    }
}
