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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f6f3;
    --bg-tertiary: #f1f0ed;
    --text-primary: #37352f;
    --text-secondary: #787774;
    --border-color: #e9e9e7;
    --accent-blue: #2383e2;
    --accent-green: #0f7b6c;
    --accent-red: #eb5757;
    --accent-yellow: #ffa344;
    --sidebar-width: 280px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 0;
}

.logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.logo h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu {
    padding: 0 12px;
}

.nav-section {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 16px 12px 8px;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--bg-tertiary);
}

.nav-item.active {
    background: var(--bg-tertiary);
    font-weight: 500;
}

.nav-item .icon {
    margin-right: 10px;
    font-size: 16px;
}

.nav-item.sub-item {
    padding-left: 36px;
    font-size: 13px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 48px 96px;
    max-width: 1200px;
}

.section {
    margin-bottom: 80px;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

p {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 16px;
}

code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent-red);
}

/* Callouts */
.callout {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
    border-left: 3px solid;
}

.callout.info {
    background: #e8f4fd;
    border-color: var(--accent-blue);
}

.callout.warning {
    background: #fff4e6;
    border-color: var(--accent-yellow);
}

.callout.success {
    background: #e6f7f5;
    border-color: var(--accent-green);
}

.callout-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.callout-content strong {
    display: block;
    margin-bottom: 4px;
}

.callout-content p {
    margin: 0;
    font-size: 14px;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Platform List */
.platform-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.platform-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.platform-name {
    font-weight: 500;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge.success {
    background: #d1f4e0;
    color: var(--accent-green);
}

.badge.coming {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge.error {
    background: #ffe0e0;
    color: var(--accent-red);
}

.badge.warning {
    background: #fff4e6;
    color: var(--accent-yellow);
}

.badge.required {
    background: #ffe0e0;
    color: var(--accent-red);
}

.badge.optional {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Steps */
.step {
    display: flex;
    gap: 16px;
    margin: 24px 0;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

/* Code Blocks */
.code-block {
    background: #2d2d2d;
    border-radius: 8px;
    margin: 16px 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1e1e1e;
    border-bottom: 1px solid #3d3d3d;
}

.code-header span {
    color: #a0a0a0;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.copy-btn {
    background: #3d3d3d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #4d4d4d;
}

.code-block pre {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    background: transparent;
    color: #e8e8e8;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Endpoint Box */
.endpoint-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin: 16px 0;
    font-family: 'Monaco', 'Courier New', monospace;
}

.method {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.method.post {
    background: #0f7b6c;
}

.method.get {
    background: #2383e2;
}

.path {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Tables */
.params-table,
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
}

.params-table th,
.info-table th {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
}

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

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

/* Currency Grid */
.currency-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.currency-badge {
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* URL Box */
.url-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 16px 0;
}

.url {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent-blue);
}

.docs-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

/* Support */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.support-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
}

.support-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.support-card h3 {
    margin: 0 0 8px 0;
}

.support-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #1b6ec2;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e0dfd9;
}

/* FAQ */
.faq {
    margin: 24px 0;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 16px;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
    list-style: none;
}

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

.faq-item summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item p {
    padding: 0 16px 16px 36px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        padding: 32px 48px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .main-content {
        margin-left: 0;
        padding: 24px;
    }

    .feature-grid,
    .support-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 32px;
    }

    h1 {
        font-size: 28px;
    }
}
