:root {
  --lime: #39ff14;
  --mag: #ff00ea;
  --cyan: #00f6ff;
  --gold: #ffe600;
  --bg: #050505;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: #fff;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
.fineprint,
.perm-card,
.mute,
.chat,
.searching,
.cert-card,
.toast,
.perm-remember,
.subtag,
.live-row {
  font-family: system-ui, sans-serif;
}

body {
  user-select: none;
}

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

.toasts {
  position: fixed;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(280px, calc(100% - 1.6rem));
  pointer-events: none;
}

.toast {
  background: rgba(28, 28, 30, 0.94);
  color: #fff;
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s cubic-bezier(0.2, 1.1, 0.3, 1);
}

.toast strong {
  display: block;
  font-size: 0.78rem;
  color: #9ae6b4;
  margin-bottom: 0.15rem;
}

.toast span {
  font-size: 0.92rem;
}

.landing {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 4.5rem 1.25rem 2rem;
  text-align: center;
  z-index: 1;
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 0, 234, 0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(57, 255, 20, 0.2), transparent 45%),
    repeating-conic-gradient(from 0deg, #111 0 12deg, #1a1a1a 0 24deg);
  animation: hue 8s linear infinite;
}

.landing-noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.marquee,
.ticker {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  background: #000;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

.marquee {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.4rem 0;
  border-bottom: 2px solid var(--lime);
}

.marquee span,
.ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ff4d6d;
}

.live-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2a2a;
  animation: blink 1s step-end infinite;
}

.live-row span {
  color: #ccc;
  font-weight: 500;
  letter-spacing: 0;
}

.eyebrow {
  letter-spacing: 0.28em;
  font-size: 0.68rem;
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

.title {
  position: relative;
  font-size: clamp(2.4rem, 10vw, 6rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    4px 4px 0 var(--mag),
    -3px -3px 0 var(--cyan),
    0 0 24px var(--lime);
  animation: shake-title 0.18s infinite;
}

.tld {
  color: var(--lime);
}

.tagline {
  font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: 0.08em;
  color: var(--gold);
}

.subtag {
  font-size: 0.85rem;
  color: #bbb;
  font-style: italic;
}

.cta {
  margin-top: 0.35rem;
  padding: 1rem 1.6rem;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  background: linear-gradient(90deg, var(--lime), var(--gold), var(--mag), var(--cyan), var(--lime));
  background-size: 300% 100%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #000, 0 0 32px var(--mag);
  cursor: pointer;
  animation: slide 2.4s linear infinite, pulse 1.1s ease-in-out infinite;
}

.cta:hover,
.cta:focus-visible {
  transform: scale(1.04) rotate(-1deg);
  outline: none;
}

.cta:disabled {
  opacity: 0.7;
  cursor: wait;
  animation: slide 2.4s linear infinite;
}

.fineprint {
  max-width: 26rem;
  color: #9aa;
  font-size: 0.78rem;
  line-height: 1.45;
}

.searching {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #050505;
  text-align: center;
  padding: 2rem;
}

.search-kicker {
  color: var(--lime);
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  font-weight: 700;
}

.searching h2 {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(1.6rem, 6vw, 3rem);
  text-shadow: 3px 3px 0 var(--mag);
}

.search-bar {
  width: min(420px, 80%);
  height: 18px;
  border: 3px solid #fff;
  background: #111;
  overflow: hidden;
}

.search-bar i {
  display: block;
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, var(--lime), var(--gold), var(--mag));
  animation: load-bar 1.8s linear forwards;
}

#search-status {
  min-height: 1.4em;
  color: #ddd;
  font-size: 1rem;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: #000;
  cursor: crosshair;
}

#cam {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

#out {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
}

#out.spinning {
  animation: feed-spin 1.35s cubic-bezier(0.12, 0.8, 0.2, 1);
}

.scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
}

.scan-frame {
  position: absolute;
  inset: 16% 18%;
  animation: scan-pulse 1.2s ease-in-out infinite;
}

.scan-frame i {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 3px solid var(--lime);
}

.scan-frame i:nth-child(1) {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.scan-frame i:nth-child(2) {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
}

.scan-frame i:nth-child(3) {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
}

.scan-frame i:nth-child(4) {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

.scan.locked .scan-frame {
  border-color: var(--gold);
  animation: none;
}

.scan.locked .scan-frame i {
  border-color: var(--gold);
}

#scan-status,
#scan-pct {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.18em;
  text-shadow: 2px 2px 0 #000;
}

#scan-status {
  bottom: 18%;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: var(--lime);
}

#scan-pct {
  bottom: 12.5%;
  font-size: 1rem;
  color: var(--gold);
}

.hud {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: 1rem 1rem 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-shadow: 2px 2px 0 #000;
}

.hud-top,
.hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.hud-bottom {
  padding-right: 7.5rem;
}

.rec {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ff2a2a;
}

.rec i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff2a2a;
  animation: blink 1s step-end infinite;
}

.mlg-badge {
  padding: 0.15rem 0.45rem;
  background: var(--gold);
  color: #000;
  transform: rotate(8deg);
}

.chat {
  position: absolute;
  top: 3.4rem;
  left: 1rem;
  width: min(240px, 46vw);
  list-style: none;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.chat li {
  margin-bottom: 0.28rem;
  animation: fade-row 6s linear forwards;
}

.chat b {
  color: var(--cyan);
  margin-right: 0.3rem;
}

.killfeed {
  position: absolute;
  top: 3.5rem;
  right: 1rem;
  list-style: none;
  text-align: right;
  font-size: 0.95rem;
  color: var(--lime);
}

.killfeed li {
  margin-bottom: 0.35rem;
  animation: fade-row 2.8s linear forwards;
}

.ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 6;
  padding: 0.28rem 0;
  border-top: 2px solid var(--mag);
}

.mute {
  position: absolute;
  z-index: 9;
  right: 1rem;
  bottom: 2.6rem;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
}

.too-bad {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  text-align: center;
  transform: rotate(-7deg);
}

.too-bad p {
  font-size: clamp(2.6rem, 11vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-shadow:
    5px 5px 0 #000,
    4px 4px 0 var(--mag),
    -3px -3px 0 var(--cyan);
  animation: slam 0.5s cubic-bezier(0.15, 1.5, 0.3, 1) both;
}

.too-bad p:last-child {
  color: var(--lime);
  animation-delay: 0.1s;
}

.cert {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.35);
}

.cert-card {
  width: min(420px, 100%);
  background:
    repeating-linear-gradient(
      0deg,
      #f6ecd0 0,
      #f6ecd0 28px,
      #f3e6c4 28px,
      #f3e6c4 29px
    );
  color: #1a1208;
  border: 8px double #7a5a18;
  padding: 1.4rem 1.3rem 1.2rem;
  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  animation: slam 0.55s cubic-bezier(0.15, 1.4, 0.3, 1);
}

.cert-card.shake {
  animation: cert-shake 0.45s ease;
}

.cert-seal {
  color: #7a5a18;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 800;
}

.cert-kicker {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
}

.cert-card h2 {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 0.9;
  margin: 0.2rem 0;
}

.cert-mid {
  font-size: 0.9rem;
}

.cert-big {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  margin: 0.35rem 0;
}

.cert-sub {
  font-size: 0.8rem;
  color: #5c4a28;
  margin-bottom: 0.9rem;
}

.cert-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.cert-actions button {
  padding: 0.55rem 0.8rem;
  border: 2px solid #1a1208;
  background: #ffe600;
  font-weight: 800;
  cursor: pointer;
}

#cert-deny {
  background: #fff;
}

.fake-perm {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  background: rgba(0, 0, 0, 0.45);
}

.perm-card {
  width: min(360px, calc(100% - 2rem));
  background: #202124;
  color: #e8eaed;
  border-radius: 12px;
  padding: 18px 18px 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  font-size: 14px;
}

.perm-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9aa0a6;
  font-size: 12px;
  margin-bottom: 14px;
}

.perm-lock {
  width: 12px;
  height: 12px;
  border: 2px solid #9aa0a6;
  border-radius: 3px 3px 0 0;
  position: relative;
}

.perm-lock::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 6px;
  width: 10px;
  height: 7px;
  background: #9aa0a6;
  border-radius: 1px;
}

.perm-title {
  color: #e8eaed;
  margin-bottom: 10px;
}

.perm-action {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.cam-icon {
  width: 18px;
  height: 14px;
  border: 2px solid #e8eaed;
  border-radius: 3px;
  position: relative;
}

.cam-icon::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 2px;
  border: 5px solid transparent;
  border-left-color: #e8eaed;
}

.perm-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9aa0a6;
  font-size: 12px;
  margin-bottom: 14px;
}

.perm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.perm-actions button {
  min-width: 76px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

#perm-more {
  background: transparent;
  color: #9aa0a6;
  min-width: 0;
  margin-right: auto;
  padding-left: 0;
}

#perm-block {
  background: transparent;
  color: #8ab4f8;
}

#perm-allow {
  background: #8ab4f8;
  color: #202124;
}

@keyframes hue {
  to {
    filter: hue-rotate(360deg);
  }
}

@keyframes shake-title {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1px, 1px);
  }
  50% {
    transform: translate(1px, -1px);
  }
  75% {
    transform: translate(-1px, 0);
  }
}

@keyframes slide {
  to {
    background-position: 300% 0;
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 4px #000, 0 0 48px var(--lime);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes fade-row {
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes feed-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  55% {
    transform: rotate(1120deg) scale(1.16);
  }
  100% {
    transform: rotate(1080deg) scale(1);
  }
}

@keyframes slam {
  0% {
    transform: scale(4.2) rotate(-18deg);
    opacity: 0;
  }
  72% {
    transform: scale(0.9) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes load-bar {
  to {
    width: 100%;
  }
}

@keyframes scan-pulse {
  50% {
    inset: 14% 16%;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(-120%);
    opacity: 0;
  }
}

@keyframes cert-shake {
  25% {
    transform: translateX(-8px) rotate(-1deg);
  }
  50% {
    transform: translateX(8px) rotate(1deg);
  }
  75% {
    transform: translateX(-5px);
  }
}

@media (max-width: 600px) {
  .hud-top,
  .hud-bottom {
    font-size: 0.8rem;
  }

  .mute {
    bottom: 3.4rem;
  }

  .chat {
    width: 42vw;
    font-size: 0.7rem;
  }
}
