:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(13, 18, 32, 0.82);
  --panel-2: rgba(17, 24, 42, 0.92);
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef4ff;
  --muted: #8f9bb2;
  --green: #48f29b;
  --yellow: #f8d66d;
  --orange: #ff9a4a;
  --red: #ff4d6d;
  --blue: #6ea8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(49, 85, 255, 0.22), transparent 36%),
              radial-gradient(circle at 72% 18%, rgba(255, 77, 109, 0.15), transparent 28%),
              var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 78%);
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.015), rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
  opacity: 0.35;
  pointer-events: none;
}

.site-header, main, .site-footer { position: relative; z-index: 1; }
.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(72,242,155,0.18), rgba(110,168,255,0.25));
  border: 1px solid var(--line);
  font-size: 12px;
}
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--text); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 46px 0 70px;
}
.eyebrow {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}
h1 {
  margin: 12px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.075em;
}
.lead {
  color: #b8c3d8;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  max-width: 720px;
}
.scan-form {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  padding: 8px;
  max-width: 720px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.scan-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 16px 16px;
  font-size: 16px;
}
.scan-form button {
  border: 0;
  cursor: pointer;
  border-radius: 15px;
  padding: 0 22px;
  color: #06120c;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), #afffd2);
  box-shadow: 0 12px 30px rgba(72,242,155,0.18);
}
.scan-form button:disabled { opacity: 0.65; cursor: wait; }
.form-hint { color: var(--muted); font-size: 13px; }

.hero-visual {
  position: relative;
  min-height: 500px;
  border-radius: 36px;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}
#scannerCanvas { width: 100%; height: 100%; display: block; min-height: 500px; }
.orb { position: absolute; border-radius: 50%; filter: blur(18px); opacity: 0.58; }
.orb-one { width: 190px; height: 190px; background: rgba(72,242,155,0.34); left: 12%; top: 12%; }
.orb-two { width: 230px; height: 230px; background: rgba(110,168,255,0.28); right: -8%; bottom: 8%; }
.scanner-card {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: calc(100% - 48px);
  padding: 18px;
  border-radius: 20px;
  background: rgba(5,8,15,0.78);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  display: grid;
  gap: 5px;
}
.scanner-card small { color: var(--muted); }
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(72,242,155,0.45);
  animation: pulse 1.6s infinite;
}
.floating { animation: float 5s ease-in-out infinite; }

.result-shell { margin: 0 0 70px; }
.empty-state, .loading-state, .error-state, .result-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.empty-state p, .loading-state p, .error-state p { color: var(--muted); }
.hidden { display: none !important; }
.loader {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}
.error-state { border-color: rgba(255,77,109,0.34); }

.result-panel { display: grid; gap: 18px; }
.verdict-card {
  border-radius: 22px;
  padding: 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
}
.verdict-card.danger { border-color: rgba(255,77,109,0.45); box-shadow: inset 0 0 80px rgba(255,77,109,0.08); }
.verdict-card.warning { border-color: rgba(248,214,109,0.45); box-shadow: inset 0 0 80px rgba(248,214,109,0.06); }
.verdict-card.ok { border-color: rgba(72,242,155,0.42); box-shadow: inset 0 0 80px rgba(72,242,155,0.06); }
.verdict-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.08);
}
.status-pill.danger { color: #ffd8de; background: rgba(255,77,109,0.18); }
.status-pill.warning { color: #fff0bb; background: rgba(248,214,109,0.16); }
.status-pill.ok { color: #caffdf; background: rgba(72,242,155,0.15); }
.verdict-card h2 { margin: 18px 0 10px; font-size: clamp(30px, 5vw, 50px); letter-spacing: -0.05em; }
.verdict-card p { margin: 0; color: #c5cee0; font-size: 17px; line-height: 1.55; }
.verdict-meta {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.verdict-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
}
.verdict-meta span, .check-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.verdict-meta strong { font-size: 15px; }
.muted { color: var(--muted); }

.checks-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.check-card {
  min-height: 132px;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.check-card strong { display: block; margin-bottom: 8px; font-size: 17px; }
.check-card small { color: var(--muted); line-height: 1.45; }
.check-card.danger { border-color: rgba(255,77,109,0.36); }
.check-card.warning { border-color: rgba(248,214,109,0.36); }
.check-card.ok { border-color: rgba(72,242,155,0.34); }

.why-card, .advanced-card {
  border-radius: 20px;
  padding: 22px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.why-card h3 { margin-top: 0; }
.why-card li { margin: 10px 0; color: #cbd5e8; }
.advanced-card summary { cursor: pointer; font-weight: 800; }
.advanced-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.advanced-grid > div { padding: 16px; border-radius: 16px; background: rgba(0,0,0,0.22); }
.advanced-grid h4 { margin: 0 0 8px; }
.advanced-grid p { margin: 0; color: var(--muted); }
pre {
  margin-top: 18px;
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: #05070d;
  color: #cbd5e8;
  border: 1px solid var(--line);
}

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 70px; }
.feature-card, .how {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.045);
  border-radius: 22px;
  padding: 22px;
}
.feature-card p, .how p { color: var(--muted); line-height: 1.55; }
.how { margin-bottom: 70px; text-align: center; }
.how h2 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -0.05em; }
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(72,242,155,0); } 100% { box-shadow: 0 0 0 0 rgba(72,242,155,0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 380px; }
  #scannerCanvas { min-height: 380px; }
  .checks-grid, .features { grid-template-columns: repeat(2, 1fr); }
  .advanced-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .scan-form { flex-direction: column; }
  .scan-form button { min-height: 52px; }
  .verdict-meta, .checks-grid, .features, .advanced-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

/* Informational state: useful signal that must not override the final risk verdict. */
.check-card.info {
  border-color: rgba(110,168,255,0.42);
  box-shadow: inset 0 0 46px rgba(110,168,255,0.055);
}
