:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --background: #ffffff;
    --surface: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --code-bg: #1f2937;
    --success: #10b981;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Hero Section */
.hero {
    background: var(--surface);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 800px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat .value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Main Content */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* Endpoints */
.endpoint {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.endpoint h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.endpoint p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.endpoint-url {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.endpoint-url code {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: none;
    padding: 0;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.formats {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.formats a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.formats a:hover {
    text-decoration: underline;
}

/* Details/Summary */
details {
    margin-top: 1rem;
}

summary {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 0;
    user-select: none;
}

summary:hover {
    color: var(--primary-dark);
}

details pre {
    margin-top: 1rem;
    background: var(--code-bg);
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
}

.field-list {
    list-style: none;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
}

.field-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.field-list li:last-child {
    border-bottom: none;
}

.field-list strong {
    color: var(--primary-color);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

/* Usage Examples */
.example {
    margin-bottom: 2rem;
}

.example h3 {
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: 6px 6px 0 0;
    font-size: 1.1rem;
}

.example pre {
    background: var(--code-bg);
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 0 0 6px 6px;
    overflow-x: auto;
    margin-top: -1px;
}

.example code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* About Section */
.about-content {
    max-width: 800px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-content ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.about-content li {
    margin-bottom: 0.75rem;
}

.about-content strong {
    color: var(--text-primary);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.info-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.25rem 0;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--code-bg);
    color: #9ca3af;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .endpoint {
        padding: 1.5rem;
    }

    .endpoint-url {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-btn {
        width: 100%;
    }
}