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

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #262626;
    --text: #e5e5e5;
    --text-dim: #737373;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --radius: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* --- Layout --- */
.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* --- Nav --- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}
.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 14px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 80px 0 64px;
}
.hero h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 36px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-dim); }

.btn-danger { background: var(--danger); color: #fff; font-size: 13px; padding: 8px 16px; }

.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Features --- */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 48px 0 80px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-dim); }

/* --- Card / Auth Forms --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    max-width: 420px;
    margin: 0 auto;
}
.card h2 { font-size: 22px; font-weight: 700; margin-bottom: 24px; text-align: center; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--accent); }

.form-submit { width: 100%; margin-top: 8px; }

.form-footer { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-dim); }

/* --- Alert --- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-error { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-success { background: rgba(34, 197, 94, 0.12); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.2); }

/* --- Dashboard --- */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}
.dash-header h1 { font-size: 28px; font-weight: 700; }

.api-key-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
}
.api-key-box h3 { font-size: 14px; color: var(--text-dim); margin-bottom: 12px; font-weight: 500; }

.api-key-value {
    display: flex;
    align-items: center;
    gap: 12px;
}
.api-key-value code {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    color: var(--accent);
    word-break: break-all;
}

.usage-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.usage-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.usage-section pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
}
.usage-section code { color: var(--text); }

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 48px 0 32px;
    color: var(--text-dim);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 64px;
}

/* --- How it works --- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 0 64px;
    text-align: center;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}
.steps h3 { font-size: 15px; margin-bottom: 6px; }
.steps p { font-size: 13px; color: var(--text-dim); }

.section-title {
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 32px; }
    .features, .steps { grid-template-columns: 1fr; }
    .nav { flex-direction: column; gap: 12px; }
    .dash-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .api-key-value { flex-direction: column; }
}
