:root {
  color-scheme: dark;
  --bg: #0b0812;
  --card: rgba(24, 18, 36, 0.88);
  --surface: #171222;
  --surface-2: #21182f;
  --text: #f7f3ff;
  --muted: #a99dbb;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #9b6cff;
  --accent-2: #d672ff;
  --success: #58dfaa;
  --danger: #ff7189;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(144, 82, 255, 0.25), transparent 35rem),
    radial-gradient(circle at 85% 75%, rgba(213, 84, 255, 0.14), transparent 32rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button, textarea { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  position: relative;
  width: min(100% - 32px, 520px);
  margin: 0 auto;
  padding: 54px 0 28px;
}

.card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(20px);
}

.brand-row { display: flex; align-items: center; gap: 16px; }

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 34px rgba(156, 95, 255, .32);
}

.brand-mark svg { width: 31px; fill: white; }
.brand-mark .mark-cut { fill: #a86eff; }

.eyebrow {
  margin: 0 0 4px;
  color: #c8b4ec;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 { margin: 0; font-size: clamp(27px, 7vw, 34px); letter-spacing: -.04em; }

.intro { margin: 25px 0 28px; color: var(--muted); line-height: 1.65; }

label { display: inline-block; margin-bottom: 10px; font-size: 14px; font-weight: 750; }

.input-wrap { position: relative; }

textarea {
  width: 100%;
  min-height: 138px;
  padding: 16px 17px;
  resize: vertical;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 15px;
  color: var(--text);
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

textarea:focus { border-color: var(--accent); background: #1b1428; box-shadow: 0 0 0 4px rgba(155,108,255,.13); }
textarea[aria-invalid="true"] { border-color: var(--danger); }

.field-meta { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 12px; }
.error { min-height: 19px; margin: 7px 0 4px; color: var(--danger); font-size: 13px; }

.primary-button {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: linear-gradient(110deg, #865bfa, #bd63ff);
  box-shadow: 0 15px 32px rgba(145, 87, 244, .24);
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s, filter .18s;
}

.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:active { transform: translateY(1px); }

.result {
  margin-top: 25px;
  padding: 22px;
  border: 1px solid rgba(155, 108, 255, .22);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(155,108,255,.1), rgba(255,255,255,.02));
}

.result-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.status { color: var(--success); }
.status i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }

.code-list { display: grid; gap: 10px; margin: 17px 0 12px; }

.code-item {
  display: flex;
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(10, 7, 15, .34);
}

.account-info { min-width: 0; }
.account-label { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.otp-value { margin-top: 3px; font-size: clamp(25px, 8vw, 34px); font-weight: 850; letter-spacing: .07em; font-variant-numeric: tabular-nums; }

.copy-code {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}

.copy-code:hover { color: white; }
.copy-code svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.copy-code.copied { color: var(--success); }

.copy-all {
  width: 100%;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #d5c4f4;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.copy-all:hover { color: white; background: rgba(255,255,255,.03); }

.timer-row { display: flex; align-items: center; gap: 13px; padding-top: 18px; border-top: 1px solid var(--line); }
.timer-row strong { display: block; font-size: 13px; }
.timer-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.timer-ring {
  --progress: 100%;
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--progress), var(--surface-2) 0);
}

.timer-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #171121; }
.timer-ring span { position: relative; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }

.text-button { display: block; margin: 19px auto 0; border: 0; color: #cdb7fa; background: transparent; font-size: 13px; cursor: pointer; }
.text-button:hover { color: white; }

.privacy-note {
  display: flex;
  gap: 12px;
  margin-top: 27px;
  padding: 15px;
  border: 1px solid rgba(88,223,170,.14);
  border-radius: 15px;
  color: #b8afc6;
  background: rgba(88,223,170,.05);
}

.privacy-note svg { width: 22px; flex: 0 0 auto; fill: none; stroke: var(--success); stroke-width: 1.8; }
.privacy-note p { margin: 0; font-size: 12px; line-height: 1.55; }
.privacy-note strong { color: #defbec; }

footer { padding: 20px 0 0; color: #6f647c; text-align: center; font-size: 11px; }

@media (max-width: 540px) {
  .page-shell { width: min(100% - 20px, 520px); padding-top: 22px; }
  .card { padding: 25px 20px; border-radius: 23px; }
  .brand-mark { width: 49px; height: 49px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
