:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --warning: #d97706;
    --radius: 8px;
}

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

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo span { color: var(--text-light); font-weight: 400; font-size: 14px; margin-left: 8px; }

.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--text-light); font-size: 15px; }
.nav a:hover { color: var(--primary); text-decoration: none; }

/* Hero */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
}

.hero h1 { font-size: 40px; margin-bottom: 16px; font-weight: 800; }
.hero p { font-size: 20px; opacity: 0.9; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f0f0f0; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }

/* Sections */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section h2 { font-size: 28px; margin-bottom: 32px; text-align: center; }
.section-alt { background: var(--bg-alt); }

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card h3 { font-size: 16px; margin-bottom: 8px; color: var(--primary); }
.card p { font-size: 14px; color: var(--text-light); }

/* Category */
.category-title {
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.category-title:first-child { margin-top: 0; }

/* FAQ */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-q {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.faq-q::after { content: "+"; font-size: 20px; color: var(--text-light); }
.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: var(--text-light);
    font-size: 15px;
}

.faq-item.open .faq-a { max-height: 200px; padding: 0 20px 16px; }

/* Docs */
.docs-section { max-width: 900px; margin: 0 auto; }

.docs-section h1 { font-size: 32px; margin-bottom: 8px; }
.docs-section h2 { font-size: 22px; margin: 32px 0 16px; text-align: left; }

.endpoint-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
    font-family: monospace;
    font-size: 14px;
    word-break: break-all;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

th { background: var(--bg-alt); font-weight: 600; }

code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0;
}

.deprecated { color: var(--warning); font-size: 13px; }

/* Legal pages */
.legal { max-width: 800px; margin: 0 auto; }
.legal h1 { font-size: 28px; margin-bottom: 24px; }
.legal h2 { font-size: 20px; margin: 28px 0 12px; }
.legal p, .legal li { font-size: 15px; color: var(--text-light); margin-bottom: 12px; }
.legal ul { padding-left: 24px; }

.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 15px;
}

.warning-box strong { color: #92400e; }

/* Footer */
.footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 24px;
    font-size: 14px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer a { color: #cbd5e1; }
.footer a:hover { color: #fff; }
.footer h4 { color: #fff; margin-bottom: 12px; }
.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; }
    .nav { gap: 12px; }
    .nav a { font-size: 13px; }
    .grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
}
