:root {
  --bg-void: #050305;
  --bg-deep: #0a0608;
  --bg-panel: #10090c;
  --bg-card: #161014;
  --bg-elev: #1c1418;
  --bg-hover: #24181c;
  --line: rgba(255, 48, 48, 0.12);
  --line-strong: rgba(255, 48, 48, 0.28);
  --red: #ff2a2a;
  --red-hot: #ff4d4d;
  --red-deep: #b80f1a;
  --red-dim: #6a1018;
  --red-glow: rgba(255, 42, 42, 0.42);
  --red-soft: rgba(255, 42, 42, 0.14);
  --text: #f6f1f2;
  --text-2: #c8b8bb;
  --muted: #8a7a7d;
  --ok: #2ee59d;
  --ok-soft: rgba(46, 229, 157, 0.14);
  --warn: #ffc857;
  --warn-soft: rgba(255, 200, 87, 0.12);
  --info: #5aa9ff;
  --danger: #ff4d6d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 272px;
  --header: 72px;
  --font: "Rajdhani", "Segoe UI", sans-serif;
  --display: "Oxanium", "Rajdhani", sans-serif;
  --mono: "Share Tech Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  font-family: var(--font);
  background: var(--bg-void);
  color: var(--text);
  letter-spacing: 0.02em;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; font-size: 16px; }
button { font-size: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.np-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}
.np-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.np-icon.filled svg { fill: currentColor; stroke: none; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.08) 2px 3px
  );
  mix-blend-mode: overlay;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--red-glow); }
  50% { box-shadow: 0 0 24px 2px var(--red-glow); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes dash {
  to { stroke-dashoffset: 0; }
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}
@keyframes countFlash {
  0% { text-shadow: 0 0 0 transparent; }
  40% { text-shadow: 0 0 18px var(--red-glow); }
  100% { text-shadow: none; }
}

.anim-in { animation: fadeUp 0.55s ease both; }
.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }
.delay-4 { animation-delay: 0.24s; }
.delay-5 { animation-delay: 0.3s; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.16) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary {
  background: linear-gradient(180deg, var(--red-hot), var(--red-deep));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 10px 28px var(--red-glow);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--red); color: #fff; box-shadow: 0 0 18px var(--red-soft); }
.btn-full { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

.field { display: grid; gap: 8px; }
.field label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.field-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  background: #120a0d;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: 0.2s ease;
}
.field-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft), 0 0 22px var(--red-soft);
}
.field-wrap input,
.field-wrap textarea,
.field-wrap select {
  width: 100%;
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  min-height: 48px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  caret-color: var(--red-hot);
}
.field-wrap input::placeholder,
.field-wrap textarea::placeholder {
  color: var(--muted);
  opacity: 0.9;
  -webkit-text-fill-color: var(--muted);
}
.field-wrap input:-webkit-autofill,
.field-wrap input:-webkit-autofill:hover,
.field-wrap input:-webkit-autofill:focus,
.field-wrap input:-webkit-autofill:active,
.field-wrap select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #120a0d inset !important;
  box-shadow: 0 0 0 1000px #120a0d inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--red-hot);
  border-radius: 10px;
  transition: background-color 99999s ease-out 0s;
}
.field-wrap input:autofill,
.field-wrap select:autofill {
  box-shadow: 0 0 0 1000px #120a0d inset;
  -webkit-text-fill-color: var(--text);
}
.field-wrap textarea { min-height: 88px; padding: 12px 0; resize: vertical; }
.field-wrap .np-icon { color: var(--muted); }
.field-wrap:focus-within .np-icon { color: var(--red-hot); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-red { background: var(--red-soft); color: var(--red-hot); }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--muted); }

.card {
  background:
    linear-gradient(180deg, rgba(255,42,42,0.05), transparent 28%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--red);
  opacity: 0.45;
  pointer-events: none;
}
.card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.toast-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  left: auto;
  z-index: 200;
  display: grid;
  gap: 10px;
  max-width: calc(100vw - 24px);
}
.toast {
  min-width: min(280px, 100%);
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.3s ease;
}

#npGuard {
  position: fixed;
  z-index: 10060;
  min-width: 196px;
  background: linear-gradient(165deg, #1a0c10, #0d0608);
  border: 1px solid rgba(255, 48, 48, 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.62), 0 0 24px rgba(255, 42, 42, 0.15);
  padding: 10px 10px 8px;
  color: #fff;
  animation: fadeUp 0.18s ease;
}
#npGuard button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  background: none;
  border: 0;
  cursor: pointer;
}
#npGuard button:hover { background: rgba(255,42,42,0.14); }
#npGuard small {
  display: block;
  text-align: center;
  margin-top: 6px;
  color: #ff4d4d;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #080406; }
::-webkit-scrollbar-thumb { background: #3a1a1e; border-radius: 99px; }
