:root {
    color-scheme: dark;
    --bg: #070706;
    --card: rgba(18, 18, 16, 0.97);
    --card-soft: #151512;
    --line: rgba(255, 255, 255, 0.09);
    --gold: #f0b52b;
    --gold-strong: #ffd36d;
    --text: #f5f3eb;
    --muted: #99988f;
    --success: #46d487;
    --danger: #ff8585;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -10%, rgba(240, 181, 43, 0.16), transparent 31rem),
        linear-gradient(155deg, #0b0b09 0%, var(--bg) 60%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

button, input { font: inherit; }

.reset-shell {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100% - 28px));
    margin: 0 auto;
    padding: 32px 0 24px;
}

.brand {
    display: block;
    width: fit-content;
    margin: 0 auto 22px;
}

.brand img { display: block; width: 112px; height: auto; }

.reset-card {
    padding: clamp(24px, 6vw, 38px);
    border: 1px solid var(--line);
    border-radius: 23px;
    background: var(--card);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.reset-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border: 1px solid rgba(240, 181, 43, 0.24);
    border-radius: 14px;
    background: rgba(240, 181, 43, 0.08);
    color: var(--gold-strong);
    font-size: 29px;
    line-height: 1;
}

.eyebrow {
    margin: 0 0 9px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.17em;
}

h1 { margin: 0; font-size: clamp(27px, 7vw, 38px); line-height: 1.08; letter-spacing: -0.035em; }

.lead {
    margin: 14px 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.reset-warning {
    margin-bottom: 24px;
    padding: 14px 15px;
    border: 1px solid rgba(240, 181, 43, 0.14);
    border-radius: 12px;
    background: rgba(240, 181, 43, 0.045);
}

.reset-warning strong { color: var(--gold-strong); font-size: 12px; }
.reset-warning p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

form label {
    display: block;
    margin-bottom: 8px;
    color: #d5d2c8;
    font-size: 12px;
    font-weight: 750;
}

.token-field { position: relative; }

.token-field input {
    width: 100%;
    height: 55px;
    padding: 0 64px 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: #0c0c0a;
    color: var(--gold-strong);
    font-family: "Courier New", monospace;
    font-size: clamp(17px, 5vw, 21px);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.token-field input:focus { border-color: rgba(240, 181, 43, 0.62); box-shadow: 0 0 0 3px rgba(240, 181, 43, 0.1); }

#tokenCounter {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #696860;
    font-size: 10px;
    font-weight: 800;
}

.field-help { margin: 7px 1px 16px; color: #74736b; font-size: 11px; line-height: 1.45; }

#resetButton, .primary-link, .secondary-button {
    width: 100%;
    min-height: 50px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-weight: 850;
    text-decoration: none;
}

#resetButton {
    border: 0;
    background: linear-gradient(135deg, #d89815, #f5c451);
    color: #1a1205;
    cursor: pointer;
}

#resetButton:disabled { cursor: not-allowed; filter: saturate(0.25); opacity: 0.46; }

.form-message { min-height: 19px; margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-message.error { color: var(--danger); }

.success-card { text-align: center; }
.success-mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 19px; border: 1px solid rgba(70, 212, 135, 0.3); border-radius: 50%; background: rgba(70, 212, 135, 0.09); color: var(--success); font-size: 31px; font-weight: 900; }
.success-card .primary-link { background: linear-gradient(135deg, #d89815, #f5c451); color: #1a1205; }
.secondary-button { margin-top: 10px; border: 1px solid var(--line); background: var(--card-soft); color: var(--muted); cursor: pointer; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 5px 0; color: #66655e; font-size: 10px; }
footer a { color: #88867d; text-decoration: none; }
footer a:hover { color: var(--gold-strong); }

@media (max-width: 420px) {
    .reset-shell { padding-top: 20px; }
    .reset-card { padding: 25px 18px; border-radius: 18px; }
    footer { flex-direction: column; gap: 7px; }
}
