:root {
    --bg: #0f1115;
    --card: #181b21;
    --text: #e8e8e8;
    --muted: #9ca3af;
    --accent: #cc0000;
    --accent-hover: #990000;
    --border: #2d3139;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
}

h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--muted);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.login-card {
    text-align: center;
    max-width: 480px;
    margin: 3rem auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: #2d3139;
}

.btn-secondary:hover {
    background: #3d424d;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.metric {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.raw-data pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.85rem;
    max-height: 400px;
    overflow-y: auto;
}

footer {
    text-align: center;
    margin-top: 2rem;
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--text);
}

#toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: none;
    max-width: 320px;
}
