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

:root {
    --bg: #f5f3f0;
    --bg2: #ffffff;
    --bg3: #eceae6;
    --accent: #2d2a4a;
    --accent2: #5046e5;
    --mint: #10b981;
    --red: #ef4444;
    --border: #d8d4cc;
    --text: #2d2a4a;
    --text-dim: #8a8590;
}

body {
    font-family: 'Sora', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav-bar { background: var(--accent); color: white; }
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; color: white; }
.brand i { color: var(--accent2); }
.brand strong { color: var(--accent2); }
.nav-tag { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.5); }

/* Hero */
.hero-section { text-align: center; padding: 56px 0 40px; }
.hero-badge { display: inline-block; padding: 6px 16px; background: var(--accent); color: var(--accent2); font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; border-radius: 100px; margin-bottom: 20px; font-weight: 600; }
.hero-section h1 { font-size: 2.8rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.hl { color: var(--accent2); }
.hero-section p { max-width: 600px; margin: 0 auto; font-size: 1rem; color: var(--text-dim); line-height: 1.7; }

/* Cards */
.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.card-icon { width: 44px; height: 44px; background: rgba(80,70,229,0.08); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--accent2); margin-bottom: 14px; }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.card p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 14px; line-height: 1.5; }
.card-btn {
    width: 100%; padding: 10px; background: var(--accent); border: none; border-radius: 8px;
    color: white; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: background 0.2s; margin-bottom: 12px;
}
.card-btn:hover { background: var(--accent2); }
.card-input {
    width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem;
    color: var(--text); outline: none; margin-bottom: 10px;
}
.card-input:focus { border-color: var(--accent2); }
.output-box {
    background: var(--accent); color: #a5f3fc; font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem; padding: 12px; border-radius: 8px; overflow-x: auto;
    max-height: 150px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
    min-height: 30px;
}

/* Downloads */
.download-row { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 24px; }
.download-row h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.dl-btn {
    display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 16px 32px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color 0.2s;
}
.dl-btn:hover { border-color: var(--accent2); }
.dl-btn i { font-size: 1.5rem; color: var(--accent2); }
.dl-btn small { font-size: 0.7rem; color: var(--text-dim); }

/* API Ref */
.api-ref { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 24px; }
.api-ref h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.api-grid { display: flex; flex-direction: column; gap: 10px; }
.api-item { display: flex; align-items: center; gap: 16px; padding: 10px 14px; background: var(--bg); border-radius: 8px; }
.api-item code { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; color: var(--accent2); font-weight: 600; white-space: nowrap; }
.api-item span { font-size: 0.85rem; color: var(--text-dim); }
.api-item em { color: var(--accent2); font-style: normal; font-weight: 600; }

/* Flag */
.flag-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 40px; }
.flag-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--accent); }
.flag-box h3 i { color: var(--accent2); margin-right: 8px; }
.flag-form { display: flex; gap: 10px; }
.flag-form input {
    flex: 1; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 0.9rem;
    color: var(--text); outline: none;
}
.flag-form input:focus { border-color: var(--accent2); }
.flag-form button {
    padding: 12px 24px; background: var(--accent2); border: none; border-radius: 8px;
    color: white; font-family: 'Sora', sans-serif; font-weight: 600; cursor: pointer;
}
.ok { margin-top: 12px; padding: 12px; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); border-radius: 8px; color: var(--mint); font-weight: 600; }
.fail { margin-top: 12px; padding: 12px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; color: var(--red); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; }
.footer p { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.05em; }

@media (max-width: 768px) {
    .cards-row { grid-template-columns: 1fr; }
    .hero-section h1 { font-size: 2rem; }
    .flag-form { flex-direction: column; }
    .api-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}
