:root {
  --line: #d9d9d9;
  --ink: #111;
  --muted: #666;
  --bg: #fff;
  --link: #0645ad;
  --ok: #0c6e3b;
  --warn: #9b5c00;
  --bad: #a30000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.45;
}

.entry-portal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 15%, rgba(0, 255, 200, 0.16), transparent 38%),
    radial-gradient(circle at 80% 70%, rgba(0, 140, 255, 0.16), transparent 40%),
    linear-gradient(180deg, #07131a 0%, #050b10 100%);
}

.entry-portal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 213, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 213, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

.entry-portal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 2px,
    transparent 4px
  );
}

.entry-matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
}

.entry-portal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.entry-card {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid rgba(0, 255, 213, 0.35);
  background: linear-gradient(180deg, rgba(11, 20, 28, 0.94), rgba(8, 15, 22, 0.96));
  color: #d6f6f1;
  padding: 18px;
  box-shadow:
    0 0 0 1px rgba(0, 255, 213, 0.12) inset,
    0 20px 42px rgba(0, 0, 0, 0.45),
    0 0 26px rgba(0, 255, 213, 0.15);
}

.entry-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0, 255, 213, 0.12);
  pointer-events: none;
}

.entry-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  color: #74cfd4;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.entry-card h2 {
  color: #ebfffc;
  text-shadow: 0 0 12px rgba(0, 255, 213, 0.24);
}

.entry-card .small {
  color: #89b7bc;
}

.entry-terminal {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(0, 255, 213, 0.22);
  background: rgba(2, 10, 12, 0.75);
  color: #78f5dd;
  font-size: 12px;
  min-height: 72px;
}

.entry-terminal > div {
  opacity: 0.76;
  animation: terminal-flicker 1.8s steps(2, end) infinite;
}

.entry-terminal > div:nth-child(2) {
  animation-delay: 0.28s;
}

.entry-terminal > div:nth-child(3) {
  animation-delay: 0.56s;
}

.entry-progress {
  margin: 8px 0 10px;
  height: 6px;
  background: rgba(0, 255, 213, 0.12);
  border: 1px solid rgba(0, 255, 213, 0.2);
}

.entry-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0eb8a6, #6cf5de);
  box-shadow: 0 0 12px rgba(0, 255, 213, 0.55);
  transition: width 180ms linear;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
  line-height: 1.3;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 16px;
}

.kicker {
  margin: 0 0 6px;
  color: var(--muted);
}

.subtitle {
  margin: 0 0 8px;
  color: var(--muted);
}

.links {
  margin: 0 0 10px;
}

a {
  color: var(--link);
}

.block {
  border: 1px solid var(--line);
  padding: 12px;
  margin-bottom: 12px;
}

.small {
  color: var(--muted);
}

.list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.meter {
  height: 12px;
  border: 1px solid var(--line);
  background: #f5f5f5;
}

#meterFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b04025 0%, #d99d20 52%, #178650 100%);
  transition: width 350ms ease;
}

.challenge-form {
  display: grid;
  gap: 8px;
  max-width: 620px;
}

label {
  display: block;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  padding: 6px 8px;
  margin-top: 4px;
  font: inherit;
}

fieldset {
  border: 1px solid var(--line);
  margin: 0;
  padding: 8px;
}

fieldset label {
  margin-bottom: 4px;
}

button {
  width: fit-content;
  border: 1px solid #222;
  background: #111;
  color: #fff;
  padding: 7px 11px;
  font: inherit;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  color: #111;
}

.actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.captcha-gate {
  width: 320px;
  margin-top: 8px;
  border: 1px solid rgba(0, 255, 213, 0.45);
  background: linear-gradient(180deg, rgba(13, 28, 34, 0.98), rgba(9, 18, 24, 0.98));
  color: #e8fffc;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  box-shadow: 0 0 16px rgba(0, 255, 213, 0.16);
}

.captcha-gate:disabled {
  cursor: default;
  opacity: 0.6;
}

.captcha-box {
  width: 24px;
  height: 24px;
  border: 2px solid #63d4d3;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.captcha-tick {
  display: none;
  width: 13px;
  height: 7px;
  border-left: 3px solid #37e0d6;
  border-bottom: 3px solid #37e0d6;
  transform: rotate(-45deg);
  margin-top: -2px;
}

.captcha-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(160, 229, 221, 0.25);
  border-top-color: #2ce8dc;
  animation: gate-spin 1s linear infinite;
  flex: 0 0 auto;
}

.captcha-label {
  flex: 1;
  text-align: left;
}

.captcha-brand {
  font-size: 11px;
  color: #6bd6d0;
  text-transform: lowercase;
}

.captcha-gate.loading .captcha-box {
  display: none;
}

.captcha-gate.loading .captcha-spinner {
  display: inline-block;
}

.captcha-gate.done .captcha-spinner {
  display: none;
}

.captcha-gate.done .captcha-tick {
  display: inline-block;
}

@keyframes gate-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes terminal-flicker {
  0% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: left;
  font-size: 13px;
}

.json-output {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 8px;
  max-height: 260px;
  overflow: auto;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hidden {
  display: none;
}

#verdictLabel.human {
  color: var(--ok);
}

#verdictLabel.suspicious {
  color: var(--warn);
}

#verdictLabel.bot {
  color: var(--bad);
}

@media (max-width: 860px) {
  .columns {
    grid-template-columns: 1fr;
  }
}

.fraud-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 800px at 10% 10%, #0d121a 0%, #0b0f14 60%), #0b0f14;
}

.fraud-overlay.hidden {
  display: none;
}

.fraud-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}

.fraud-card {
  position: relative;
  z-index: 2;
  width: min(620px, 94vw);
  background: linear-gradient(180deg, rgba(15, 21, 32, 0.9), rgba(7, 12, 16, 0.92));
  border: 1px solid rgba(57, 255, 20, 0.06);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.7), 0 0 80px rgba(57, 255, 20, 0.02);
  overflow: hidden;
  color: #9ef7b6;
}

.fraud-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(57, 255, 20, 0.01) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.fraud-card h1 {
  margin: 0 0 0.5rem;
  font-size: 24px;
  letter-spacing: 0.12em;
  color: #39ff14;
}

.fraud-card .muted {
  color: #9ef7b6;
  font-size: 0.95rem;
  opacity: 0.7;
}

.fraud-card .glitch {
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
  animation: glitch 2s infinite linear;
}

.fraud-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 1px solid rgba(57, 255, 20, 0.3);
  background: rgba(0, 0, 0, 0.2);
  color: #9ef7b6;
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 26px;
}

.fraud-circle {
  position: relative;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  margin: 26px auto 12px;
  transform: rotate(-90deg);
  background: conic-gradient(#39ff14 0deg, #0a140a 0deg);
  transition: background 0.3s linear;
  box-shadow: 0 0 60px rgba(57, 255, 20, 0.12), inset 0 0 30px rgba(57, 255, 20, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fraud-inner {
  transform: rotate(90deg);
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(10, 14, 12, 0.95), rgba(8, 10, 9, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.fraud-num {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 0 20px currentColor;
}

.fraud-pct {
  color: #9ef7b6;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 6px;
}

.fraud-ip {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-top: 6px;
}

.fraud-meta {
  font-size: 0.9rem;
  opacity: 0.85;
}

.fraud-meta b.pass {
  color: #39ff14;
}

.fraud-meta b.challenge {
  color: #ffb014;
}

.fraud-meta b.block {
  color: #ff1414;
}

.flicker {
  animation: flicker 3s infinite;
}

@keyframes glitch {
  0%, 50%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2px, -1px); }
  20% { transform: translate(2px, 1px); }
  30% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.94; }
}
