/* ─── Raider: Dark theme, mobile-first ─────────────────────────────────── */

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

/* Design tokens */
:root {
    --bg: #0f172a;
    --card: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #22c55e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --warning: #f59e0b;
    --radius: 8px;
    --max-width: 480px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ─── App container ────────────────────────────────────────────────────── */

#app {
    width: 100%;
    max-width: var(--max-width);
}

/* ─── States ───────────────────────────────────────────────────────────── */

.state {
    text-align: center;
    padding: 24px 16px;
}

.state h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.state p {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.state label {
    display: block;
    text-align: left;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.state input[type="text"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    color: var(--text);
    background: var(--card);
    border: 1px solid #334155;
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 20px;
}

.state input[type="text"]:focus {
    border-color: var(--accent);
}

.state input[type="text"]::placeholder {
    color: #64748b;
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */

button {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    padding: 12px 24px;
    min-height: 44px;
    transition: background 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    transform: scale(0.98);
}

button.primary {
    width: 100%;
    background: var(--accent);
    color: #fff;
}

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

button.danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

button.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Actions row */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.actions button {
    width: 100%;
}

/* ─── Messages ─────────────────────────────────────────────────────────── */

.hidden {
    display: none !important;
}

.warning {
    color: var(--warning);
    font-size: 0.875rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
}

.error {
    color: var(--danger);
    font-size: 0.9375rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
}

.hint {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 16px;
}

/* ─── Responsive ───────────────────────────────────────────────────────── */

@media (min-width: 768px) {
    .actions {
        flex-direction: row;
    }

    .actions button {
        flex: 1;
    }

    button.primary {
        width: auto;
        min-width: 200px;
    }
}
