:root {
  color-scheme: dark;
  --bg: #0a0a0f;
  --surface: #151520;
  --surface-2: #1a1a2e;
  --line: rgba(201, 170, 255, 0.16);
  --text: #f4eeff;
  --muted: #b7a9cb;
  --accent: #00e5cc;
  --accent-2: #7c5cff;
  --danger: #ff6b7a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(70% 45% at 50% -5%, rgba(124, 92, 255, 0.22), transparent 72%),
    var(--bg);
  color: var(--text);
}

button, summary { font: inherit; }

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.card {
  width: min(100%, 430px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(26, 26, 46, 0.96), rgba(16, 16, 25, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #54f1e1);
  box-shadow: 0 0 30px rgba(0, 229, 204, 0.2);
}

.brand-mark svg { width: 25px; fill: #071513; }

.signal {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 25px 0 13px;
}

.signal span {
  display: block;
  width: 7px;
  height: 30px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(0, 229, 204, 0.38);
  animation: pulse 1.05s ease-in-out infinite;
}

.signal span:nth-child(2) { height: 54px; animation-delay: 0.12s; background: linear-gradient(var(--accent), var(--accent-2)); }
.signal span:nth-child(3) { animation-delay: 0.24s; background: var(--accent-2); box-shadow: 0 0 18px rgba(124, 92, 255, 0.38); }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-align: center;
}

.lead {
  margin: 15px auto 22px;
  max-width: 35ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.primary {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  color: #061714;
  background: linear-gradient(100deg, var(--accent), #20d8c8);
  box-shadow: 0 12px 28px rgba(0, 229, 204, 0.18);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:focus-visible, summary:focus-visible { outline: 3px solid rgba(124, 92, 255, 0.65); outline-offset: 3px; }
.primary:disabled { cursor: not-allowed; filter: grayscale(0.7); opacity: 0.48; box-shadow: none; }

.status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.status.error { color: var(--danger); }

.help {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.help summary { color: var(--text); cursor: pointer; text-align: center; }
.help p { margin: 12px 0 0; line-height: 1.5; }

@keyframes pulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 360px) {
  .card { padding: 20px; border-radius: 24px; }
  .signal { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --bg: #f5f2fb; --surface: #ffffff; --surface-2: #ffffff; --line: rgba(77, 51, 125, 0.14); --text: #1d1728; --muted: #695e78; }
  body { background: radial-gradient(70% 45% at 50% -5%, rgba(124, 92, 255, 0.15), transparent 72%), var(--bg); }
  .card { background: rgba(255, 255, 255, 0.94); box-shadow: 0 28px 70px rgba(48, 34, 76, 0.14); }
}
