* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #FBF9F6;
    --surface: #FFFFFF;
    --text: #321F1B;
    --text-secondary: #5A575B;
    --brand: #A26841;
    --brand-dark: #684736;
    --brand-hover: #8A5536;
    --border: #DEDBD8;
    --muted: #A3A0A0;
    --code-bg: #F5F3F0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Navigation */
.docs-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(222, 219, 216, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: clamp(16px, 3vw, 20px);
}

.nav-logo img {
    width: clamp(28px, 5vw, 32px);
    height: clamp(28px, 5vw, 32px);
    max-width: 100%;
    height: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 24px);
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: clamp(13px, 2vw, 15px);
    transition: all 0.2s;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link-btn {
    background: var(--text);
    color: white;
    padding: 8px clamp(12px, 3vw, 20px);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(13px, 2vw, 15px);
    transition: all 0.2s;
    margin-left: clamp(4px, 2vw, 16px);
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-link-btn:hover {
    background: var(--brand);
    transform: translateY(-1px);
}

/* Docs Container */
.docs-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 48px;
    padding: 32px 24px;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: rgba(245, 243, 240, 0.6);
    color: var(--brand);
}

.sidebar-link-sub {
    padding-left: 24px;
    font-size: 13px;
}

/* Content */
.docs-content {
    max-width: 800px;
}

.docs-section {
    margin-bottom: 64px;
}

h1 {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
}

h2 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 48px;
    color: var(--text);
}

h3 {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 32px;
    color: var(--text);
}

h4 {
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 24px;
    color: var(--text);
}

p {
    margin-bottom: 16px;
    font-size: clamp(14px, 2vw, 16px);
}

.lead {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Code */
code {
    font-family: 'Fira Code', 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}

.inline-code {
    background: rgba(245, 243, 240, 0.8);
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--brand-dark);
    font-weight: 500;
}

pre {
    background: rgba(245, 243, 240, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(222, 219, 216, 0.3);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
    max-width: 100%;
}

pre code {
    background: none;
    padding: 0;
    color: var(--text);
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Info Boxes */
.info-box {
    background: rgba(162, 104, 65, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(162, 104, 65, 0.2);
    border-left: 4px solid var(--brand);
    border-radius: 12px;
    padding: 16px;
    margin: 24px 0;
}

.warning-box {
    background: rgba(254, 243, 199, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 211, 141, 0.4);
    border-left: 4px solid #F59E0B;
    border-radius: 12px;
    padding: 16px;
    margin: 24px 0;
    color: #92400E;
}

/* Lists */
ol, ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

li {
    margin-bottom: 8px;
}

/* Tables */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(222, 219, 216, 0.3);
    border-radius: 12px;
    overflow: hidden;
    display: block;
    overflow-x: auto;
}

.params-table thead {
    background: var(--code-bg);
}

.params-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: clamp(12px, 2vw, 14px);
    color: var(--text);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.params-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: clamp(12px, 2vw, 14px);
}

.params-table tbody tr:last-child td {
    border-bottom: none;
}

.params-table code {
    background: rgba(162, 104, 65, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--brand-dark);
    font-size: clamp(11px, 1.8vw, 13px);
    word-break: break-word;
}

/* Endpoint Badge */
.endpoint-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(245, 243, 240, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(222, 219, 216, 0.3);
    border-radius: 12px;
}

.method {
    background: var(--brand);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.endpoint-badge code {
    background: none;
    color: var(--text);
    font-weight: 500;
}

/* Sections */
.endpoint-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.example-section {
    margin-top: 32px;
}

/* Footer */
.docs-footer {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(222, 219, 216, 0.3);
    padding: 32px 24px;
    margin-top: 64px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--brand);
}

/* Responsive */
@media (max-width: 968px) {
    .docs-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 16px;
    }
    
    .docs-sidebar {
        position: static;
        border-bottom: 1px solid var(--border);
        padding-bottom: 24px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .nav-container {
        padding: 12px 16px;
    }
    
    .nav-links {
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .nav-links {
        gap: 8px;
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .nav-link-btn {
        font-size: 12px;
        padding: 6px 12px;
        margin-left: 0;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .docs-content {
        padding: 0 8px;
    }
    
    .params-table {
        font-size: 12px;
    }
    
    .params-table th,
    .params-table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .docs-container {
        padding: 16px 12px;
    }
    
    .nav-container {
        gap: 12px;
    }
    
    .nav-logo span {
        display: none;
    }
}
