:root {
  color-scheme: dark;
  --background: #090d16;
  --surface: #111827;
  --surface-soft: #1f2937;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f9fafb;
  --muted: #9ca3af;
  --red: #dc2626;
  --red-dark: #991b1b;
  --green: #10b981;
  --amber: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #241015, var(--background) 38%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(9, 13, 22, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-container, .container {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
}

.nav-container {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: .75rem; color: var(--text); text-decoration: none; }
.brand-logo { border-radius: 12px; }
.brand-title { font-size: 1.25rem; font-weight: 800; }
.brand-title strong { color: #f87171; }

.status-pill {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .82rem;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.status-pill.active { color: #6ee7b7; border-color: rgba(16, 185, 129, .4); }
.status-pill.active .status-dot { background: var(--green); }

.container { padding: 2rem 0 4rem; }
.hero { margin-bottom: 2rem; }
.hero h1 { margin: .25rem 0 .75rem; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.08; }
.hero p { color: var(--muted); max-width: 64ch; }
.eyebrow { color: #fca5a5 !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }

.card, .info-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1.4rem;
  background: rgba(17, 24, 39, .88);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
}

.info-card { display: block; background: rgba(31, 41, 55, .55); }
.info-card li { margin: .45rem 0; color: var(--muted); }
.step-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--red); font-weight: 800; }
.step-content h2, .info-card h2 { margin: 0 0 .35rem; font-size: 1.2rem; }
.step-content > p { margin: 0 0 1rem; color: var(--muted); }

label { display: block; margin-bottom: .45rem; font-weight: 700; }
.code-input {
  width: 100%;
  margin-bottom: .75rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #070b12;
  color: var(--text);
  font: 700 1.3rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-align: center;
}
.code-input:focus { outline: 3px solid rgba(220, 38, 38, .3); border-color: #f87171; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: .75rem 1rem;
  border: 0;
  border-radius: 12px;
  color: white;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { background: linear-gradient(135deg, #ef4444, var(--red-dark)); }
.button-secondary { margin-top: .65rem; background: var(--surface-soft); }
.button-danger { background: transparent; color: #fca5a5; border: 1px solid rgba(248, 113, 113, .45); }
.button-small { width: auto; min-height: 38px; padding: .45rem .7rem; font-size: .82rem; }

.hint, .result { color: var(--muted); font-size: .86rem; }
.result { min-height: 1.4em; margin-bottom: 0; }
.result.success { color: #6ee7b7; }
.result.error { color: #fca5a5; }
.empty-state { color: var(--muted); margin: 0; }

.links-list { display: grid; gap: .65rem; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; background: rgba(0,0,0,.18); border-radius: 12px; }
.link-row strong, .link-row span { display: block; }
.link-row span { color: var(--muted); font-size: .8rem; }

.alert-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, .86); }
.alert-modal { width: min(460px, 100%); padding: 2rem; border: 2px solid #ef4444; border-radius: 22px; background: #160b0d; text-align: center; }
.alert-modal h2 { font-size: 1.8rem; }
.siren { font-size: 4rem; animation: pulse .8s infinite alternate; }
.hidden { display: none !important; }

footer { padding: 2rem 1rem; color: var(--muted); text-align: center; font-size: .82rem; }
@keyframes pulse { to { transform: scale(1.12); } }

@media (max-width: 560px) {
  .status-pill { max-width: 150px; }
  .card { grid-template-columns: 1fr; }
  .link-row { align-items: stretch; flex-direction: column; }
  .button-small { width: 100%; }
}
