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

:root {
    --bg: #0a0a0a;
    --surface: #111111;
    --border: #222222;
    --accent: #e8ff47;
    --accent-dim: rgba(232, 255, 71, 0.08);
    --text: #f0f0f0;
    --text-muted: #666666;
    --mono: 'Space Mono', monospace;
    --sans: 'DM Sans', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* Grid background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(232, 255, 71, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 255, 71, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 80px 2rem 120px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    margin-bottom: 80px;
    animation: fadeUp 0.6s ease both;
}

.tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 10px;
    margin-bottom: 24px;
}

h1 {
    font-family: var(--mono);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

h1 span {
    color: var(--accent);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
    max-width: 520px;
}

/* Stack badges */
.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 4px 10px;
    letter-spacing: 0.05em;
}

/* Section */
.section-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Endpoints */
.endpoints {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 80px;
    animation: fadeUp 0.6s 0.15s ease both;
}

.endpoint {
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.2s;
}

.endpoint:hover {
    border-color: var(--accent);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
}

.method {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 3px 8px;
    flex-shrink: 0;
}

.path {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text);
    flex: 1;
    word-break: break-all;
}

.endpoint-body {
    border-top: 1px solid var(--border);
    padding: 20px;
    display: none;
}

.endpoint.open .endpoint-body {
    display: block;
}

.endpoint-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.param-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.param {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.param-name {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
}

.param-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.example-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 16px 0 8px;
}

.example-url {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 14px;
    display: block;
    word-break: break-all;
    line-height: 1.6;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.example-url:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Try it */
.try-section {
    margin-bottom: 80px;
    animation: fadeUp 0.6s 0.3s ease both;
}

.search-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.search-row:focus-within {
    border-color: var(--accent);
}

.search-input {
    flex: 1;
    background: var(--surface);
    border: none;
    padding: 14px 16px;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 14px 20px;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.search-btn:hover {
    opacity: 0.85;
}

.result-box {
    margin-top: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    white-space: pre-wrap;
    word-break: break-all;
}

.result-box.visible {
    display: block;
}

/* Footer links */
.links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeUp 0.6s 0.45s ease both;
}

.link {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    letter-spacing: 0.05em;
    transition: color 0.2s, border-color 0.2s;
}

.link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 60px 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 48px 1.25rem 80px;
    }

    .path {
        font-size: 0.75rem;
    }
}
