:root {
  --ink: #151b2e;
  --muted: #6f7890;
  --line: #dce1eb;
  --paper: #ffffff;
  --canvas: #f7f8fb;
  --blue: #4059e8;
  --blue-dark: #253cb9;
  --aqua: #21cdbd;
  --error: #c43d4b;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; display: flex; flex-direction: column; margin: 0; color: var(--ink); background: radial-gradient(circle at 50% -20%, rgba(64,89,232,.09), transparent 32rem), var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100% - 40px, 560px); flex: 1; margin: 0 auto; }
.site-header { display: flex; justify-content: center; padding: 43px 0 34px; }
.brand { color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -.8px; text-decoration: none; }

.generator-card { padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 18px 50px rgba(27, 41, 70, .08); }
label { display: block; margin-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 750; }
.secret-field { position: relative; }
input { width: 100%; height: 56px; padding: 0 70px 0 16px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: #fcfcfe; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; transition: border-color .18s, box-shadow .18s; }
input::placeholder { color: #9ba4b7; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(64,89,232,.12); }
.clear-button { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); border: 0; padding: 6px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.clear-button:hover { color: var(--blue); }
.error-message { margin: 9px 0 0; color: var(--error); font-size: 12px; line-height: 1.45; }
.generate-button { width: 100%; height: 53px; margin-top: 18px; border: 0; border-radius: 9px; color: white; background: var(--blue); font-size: 13px; font-weight: 800; transition: background .18s, transform .18s; }
.generate-button:hover { background: var(--blue-dark); transform: translateY(-1px); }

.code-area { margin-top: 29px; padding: 20px; border: 1px solid #cbd3f4; border-radius: 12px; background: #f7f8ff; transition: border-color .2s; }
.code-area.is-empty { border-color: var(--line); background: #fcfcfe; }
.code-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.status { color: #8a93a5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: 0; text-transform: none; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 0; }
.code { color: var(--blue-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(30px, 7vw, 45px); font-weight: 750; letter-spacing: .075em; white-space: nowrap; }
.is-empty .code { color: #a9b1c2; font-size: clamp(25px, 6vw, 30px); }
.copy-button { min-width: 69px; padding: 9px 11px; border: 1px solid #cad2e4; border-radius: 7px; color: var(--ink); background: white; font-size: 11px; font-weight: 800; transition: color .18s, border-color .18s; }
.copy-button:not(:disabled):hover { border-color: var(--blue); color: var(--blue); }
.copy-button:disabled { cursor: default; opacity: .45; }
.timer-row { display: flex; align-items: center; gap: 10px; }
.timer-track { overflow: hidden; flex: 1; height: 4px; border-radius: 99px; background: #dce1ea; }
.timer-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--aqua)); transition: width .4s linear; }
.timer-row > span { min-width: 24px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-align: right; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
footer { padding: 34px 20px 40px; color: #8891a4; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-align: center; text-transform: uppercase; }

@media (max-width: 520px) {
  .page-shell { width: min(100% - 28px, 610px); }
  .site-header { padding: 36px 0 28px; }
  .generator-card { padding: 23px 18px; border-radius: 13px; }
  .code-area { padding: 18px 15px; }
  .code { font-size: 27px; }
  .copy-button { min-width: 61px; padding: 8px; }
}
