:root {
  color-scheme: dark;
  --bg: #060714;
  --panel: rgba(15, 18, 40, .82);
  --line: rgba(157, 112, 255, .3);
  --text: #f7f7ff;
  --muted: #aeb4d0;
  --purple: #7548ff;
  --pink: #e72b9d;
  --cyan: #62e7ff;
  --success: #37e2a0;
  --danger: #ff718b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(117, 72, 255, .28), transparent 31rem),
    radial-gradient(circle at 87% 86%, rgba(231, 43, 157, .18), transparent 30rem),
    linear-gradient(145deg, #050611 0%, #090b1d 50%, #070818 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .23;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.shell {
  width: min(92%, 680px);
  margin: 0 auto;
  padding: clamp(34px, 7vh, 78px) 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 23px;
  font: 900 38px/1 Georgia, serif;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 0 0 1px rgba(255,255,255,.22) inset, 0 18px 52px rgba(174,51,234,.38);
}

.hero-copy { min-width: 0; }

h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.intro {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.card {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0,0,0,.42), 0 1px 0 rgba(255,255,255,.06) inset;
  backdrop-filter: blur(18px);
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(157, 112, 255, .16);
}

.card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid rgba(119, 231, 255, .2);
  border-radius: 14px;
  background: rgba(91, 230, 255, .08);
  font-size: 20px;
}

.card-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

form { display: grid; gap: 11px; }

label {
  margin-top: 7px;
  color: #dfe1f3;
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  color: var(--text);
  font: inherit;
  border: 1px solid rgba(146, 161, 212, .25);
  border-radius: 16px;
  outline: 0;
  background: rgba(5, 9, 28, .8);
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
  border-color: #9a69ff;
  box-shadow: 0 0 0 4px rgba(127, 74, 255, .15);
}

button {
  border: 0;
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#check-button {
  position: relative;
  min-height: 58px;
  margin-top: 12px;
  border-radius: 16px;
  background: linear-gradient(105deg, var(--purple), var(--pink));
  box-shadow: 0 12px 36px rgba(208, 41, 167, .26);
}

#check-button:disabled { cursor: wait; opacity: .72; }

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid rgba(255,255,255,.32);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.loading .button-label { display: none; }
.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.status {
  margin-top: 18px;
  padding: 13px 15px;
  color: var(--danger);
  border: 1px solid rgba(255,113,139,.25);
  border-radius: 13px;
  background: rgba(255,113,139,.08);
  font-size: 14px;
  line-height: 1.45;
}

.status.waiting {
  color: #ffd76a;
  border-color: rgba(255,215,106,.28);
  background: rgba(255,215,106,.08);
}

.result {
  margin-top: 22px;
  padding: 22px;
  text-align: center;
  border: 1px solid rgba(91,230,255,.26);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(91,230,255,.08), rgba(116,72,255,.1));
}

.result-label, .copy-hint, .otp-age { margin: 0; color: var(--muted); font-size: 12px; }

.otp-code {
  display: block;
  width: 100%;
  margin: 10px 0 8px;
  padding: 3px;
  color: white;
  font-size: clamp(42px, 12vw, 66px);
  letter-spacing: .16em;
  background: transparent;
  text-shadow: 0 0 24px rgba(112, 227, 255, .36);
}

.otp-age { margin-bottom: 10px; color: var(--success); }

.copy-button {
  width: 100%;
  margin-top: 6px;
  padding: 13px 18px;
  border: 1px solid rgba(54, 240, 189, .3);
  border-radius: 14px;
  color: #071b18;
  background: linear-gradient(135deg, #28d7a8, #20b98f);
  box-shadow: 0 10px 24px rgba(32, 185, 143, .2);
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.copy-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.copy-button:active { transform: translateY(0); }
.copy-button.copied { color: #062019; background: linear-gradient(135deg, #56efc1, #31d59f); }

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 22px 2px 0;
  color: #949ab8;
  font-size: 12px;
  line-height: 1.55;
}
.security-note p { margin: 0; }

@media (max-width: 520px) {
  .shell { width: min(92%, 440px); padding-top: 28px; }
  .hero { grid-template-columns: 62px 1fr; gap: 14px; }
  .brand-mark { width: 62px; border-radius: 19px; font-size: 30px; }
  h1 { font-size: clamp(28px, 8.5vw, 38px); }
  .intro { font-size: 14px; }
  .card { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
