/* ===== Api getdl — Neobrutalism theme ===== */

:root {
    --ink: #111111;
    --bg: #f4f1e9;
    --yellow: #ffde59;
    --green: #7ce884;
    --pink: #ff6fae;
    --blue: #6fc4ff;
    --red: #ff5c5c;
    --purple: #b98dff;
    --white: #ffffff;
    --border: 3px solid var(--ink);
    --shadow-off: 6px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    background-image:
        radial-gradient(var(--ink) 1px, transparent 1px);
    background-size: 22px 22px;
    background-position: -10px -10px;
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.55;
}

code, .mono { font-family: 'JetBrains Mono', monospace; }

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}

/* ---- Header ---- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow-off) var(--shadow-off) 0 var(--ink);
    border-radius: 18px;
    padding: 18px 24px;
    margin-bottom: 28px;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-mark {
    width: 52px;
    height: 52px;
    background: var(--yellow);
    border: var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 3px 3px 0 var(--ink);
    flex-shrink: 0;
}

.brand-text h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.brand-text p { margin: 2px 0 0; font-size: 13px; color: #444; }

.header-tags { display: flex; gap: 10px; flex-wrap: wrap; }

.tag {
    border: var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 3px 3px 0 var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-yellow { background: var(--yellow); }
.tag-green { background: var(--green); }

/* ---- Hero ---- */
.hero {
    background: var(--purple);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-off) var(--shadow-off) 0 var(--ink);
    padding: 30px 26px;
    margin-bottom: 30px;
}

.hero h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p { margin: 0; font-size: 15px; max-width: 640px; }
.hero p strong { background: var(--white); padding: 0 4px; border-radius: 4px; border: 2px solid var(--ink); }

/* ---- Section titles ---- */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 36px 0 16px;
}

.section-title i {
    width: 38px;
    height: 38px;
    background: var(--ink);
    color: var(--yellow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title h3 { margin: 0; font-size: 20px; font-weight: 700; }

.empty-box {
    background: var(--white);
    border: var(--border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow-off) var(--shadow-off) 0 var(--ink);
}

/* ---- Endpoint card ---- */
.endpoint-card {
    background: var(--white);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-off) var(--shadow-off) 0 var(--ink);
    padding: 22px;
    margin-bottom: 26px;
    transition: transform .12s ease;
}

.endpoint-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.endpoint-head-left { display: flex; gap: 14px; align-items: flex-start; }

.idx {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    background: var(--blue);
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 4px 8px;
    height: fit-content;
}

.endpoint-head-left h4 { margin: 0; font-size: 19px; font-weight: 700; }
.platform { margin: 2px 0 0; font-size: 12px; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }

.endpoint-head-right { display: flex; align-items: center; gap: 8px; }

.method-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border: 2px solid var(--ink);
    border-radius: 6px;
}

.method-get { background: var(--blue); }
.method-post { background: var(--green); }

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--ink);
}

.endpoint-desc { font-size: 14px; margin: 14px 0; color: #333; }

.endpoint-route {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 2px dashed var(--ink);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.route-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--ink);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 5px;
}

.endpoint-route code { font-size: 13px; flex: 1; word-break: break-all; }

.copy-btn, .copy-result-btn {
    border: 2px solid var(--ink);
    background: var(--white);
    border-radius: 8px;
    padding: 5px 9px;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 2px 2px 0 var(--ink);
    transition: transform .1s ease;
}

.copy-btn:active, .copy-result-btn:active, .execute-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 var(--ink);
}

/* ---- Form ---- */
.endpoint-form { display: flex; flex-direction: column; gap: 14px; }

.form-row { display: flex; flex-direction: column; gap: 6px; }

.form-row label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-row label .req { color: var(--red); margin-left: 3px; }

.method-select, .param-input {
    border: var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--white);
    box-shadow: 3px 3px 0 var(--ink);
}

.method-select { max-width: 160px; font-weight: 700; cursor: pointer; }

.param-input:focus, .method-select:focus {
    outline: none;
    box-shadow: 4px 4px 0 var(--ink);
    transform: translate(-1px, -1px);
}

.help-text { font-size: 11px; color: #666; }

.execute-btn {
    align-self: flex-start;
    margin-top: 4px;
    background: var(--yellow);
    border: var(--border);
    border-radius: 10px;
    padding: 12px 26px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .1s ease;
}

.execute-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.execute-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- Result ---- */
.endpoint-result {
    margin-top: 20px;
    border-top: 3px dashed var(--ink);
    padding-top: 16px;
}

.result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.result-status {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border: 2px solid var(--ink);
    border-radius: 6px;
}

.result-status.ok { background: var(--green); }
.result-status.fail { background: var(--red); color: var(--white); }
.result-status.pending { background: var(--yellow); }

.result-body {
    background: var(--ink);
    color: #d9ffb0;
    border-radius: 12px;
    padding: 16px;
    font-size: 12.5px;
    max-height: 340px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.result-media { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

.dl-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 2px solid var(--ink);
    border-radius: 10px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.dl-item .dl-info { font-size: 13px; font-weight: 600; }
.dl-item .dl-sub { font-size: 11px; color: #555; font-weight: 400; }

.dl-item a.dl-btn {
    background: var(--pink);
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
}

/* ---- Integration snippets ---- */
.integration-block {
    margin-top: 20px;
    border-top: 3px dashed var(--ink);
    padding-top: 16px;
}

.integration-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.integration-head i {
    width: 26px;
    height: 26px;
    background: var(--ink);
    color: var(--white);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.lang-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.lang-tab-btn {
    border: 2px solid var(--ink);
    background: var(--white);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--ink);
    font-family: 'JetBrains Mono', monospace;
}

.lang-tab-btn.active {
    background: var(--yellow);
    box-shadow: 3px 3px 0 var(--ink);
    transform: translate(-1px, -1px);
}

.lang-panel { display: none; }
.lang-panel.active { display: block; }

.lang-panel-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.snippet-body {
    background: var(--ink);
    color: #b9e6ff;
    border-radius: 12px;
    padding: 16px;
    font-size: 12.5px;
    max-height: 320px;
    overflow: auto;
    margin: 0;
}

.snippet-body code { white-space: pre; }

/* ---- Docs ---- */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.docs-card {
    background: var(--white);
    border: var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 4px 4px 0 var(--ink);
    font-size: 13.5px;
}

.docs-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--blue);
    border: 2px solid var(--ink);
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 10px;
}

.docs-card code {
    background: var(--bg);
    border: 1px solid var(--ink);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: var(--white);
    border: var(--border);
    border-radius: 12px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    max-width: 320px;
}

.toast.error { background: var(--red); color: var(--white); }
.toast.success { background: var(--green); }
.toast.info { background: var(--blue); }

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 12.5px;
    color: #555;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .site-header { flex-direction: column; align-items: flex-start; }
    .endpoint-head { flex-direction: column; }
    .method-select { max-width: 100%; }
}
