:root {
    color-scheme: dark;
    --bg: #0e1014;
    --panel: #1a1d23;
    --fg: #e6e7ea;
    --muted: #8b909a;
    --accent: #ff3b3b;
    --accent-hover: #ff5c5c;
    --border: #2a2e36;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

main {
    width: 100%;
    max-width: 720px;
}

h1 {
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0 0 1.25rem;
    text-align: center;
    letter-spacing: 0.02em;
}

form {
    display: flex;
    gap: 0.5rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    flex-wrap: wrap;
}

input[type="url"] {
    flex: 1 1 260px;
    min-width: 200px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
}

input[type="url"]::placeholder { color: var(--muted); }

select {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.6rem;
    font-size: 0.95rem;
    cursor: pointer;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease;
}

button:hover:not([disabled]) { background: var(--accent-hover); }
button[disabled] { opacity: 0.55; cursor: not-allowed; }

.hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0.75rem 0.25rem 0;
    text-align: center;
}

.hint code {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.ask {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.ask-text {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.ask-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg);
    font-weight: 500;
}

.btn-secondary:hover:not([disabled]) { background: var(--border); }

.progress {
    margin: 1rem 0.25rem 0;
}

.progress-track {
    height: 8px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.25s linear;
}

.progress-text {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.error {
    background: rgba(255, 59, 59, 0.12);
    color: #ffb3b3;
    border: 1px solid rgba(255, 59, 59, 0.35);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}
