/* ADBLOAT — sibling of piholekiller.com
   Same font stack (VT323 / Press Start 2P / Major Mono Display).
   Same Y2K warez bones. DARKER, GLITCHIER, BLOOD RED focus.
   Where piholekiller screams neon matrix-green violence, adbloat bleeds. */

:root {
  --bg:         #050203;          /* deep blood-tinted black */
  --bg-alt:     #0a0004;
  --bg-card:    #120308;
  --blood:      #ff0033;          /* PRIMARY — the theft, the bleed */
  --blood-dim:  #aa0022;
  --blood-faint:#440011;
  --magenta:    #ff00aa;          /* accent — darker than piholekiller's hot pink */
  --electric:   #00ffff;          /* cyan — data, info, numbers */
  --toxic:      #00ff88;          /* green — reserved for "blocked / safe" states */
  --warn:       #ff8800;          /* orange — warnings */
  --gold:       #ffd700;
  --text:       #ff5577;          /* dim blood — body copy */
  --text-bright:#ffeebb;          /* off-white highlights */
  --ghost:      #884455;          /* very dim for disabled/meta */
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.35;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

/* ─────────── scanlines + noise + vignette + glitch overlays ─────────── */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(255, 0, 51, 0.045) 2px,
    rgba(255, 0, 51, 0.045) 3px
  );
  mix-blend-mode: screen;
}

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/></svg>");
  animation: noise-shift 0.3s steps(2) infinite;
}
@keyframes noise-shift {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-1px, 1px); }
  100% { transform: translate(1px, -1px); }
}

.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 998;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
}

/* Screen-wide glitch tear that strobes every few seconds */
.tear {
  position: fixed; left: 0; right: 0; height: 2px; background: var(--blood);
  top: 30%; pointer-events: none; z-index: 1001; opacity: 0;
  animation: tear-flash 11s infinite;
  box-shadow: 0 0 8px var(--blood);
}
.tear.tear-2 { top: 68%; animation-delay: 5.5s; background: var(--electric); box-shadow: 0 0 8px var(--electric); }
@keyframes tear-flash {
  0%, 96%, 100%     { opacity: 0; height: 1px; }
  97%              { opacity: 0.8; height: 2px; }
  98%              { opacity: 0.1; }
  99%              { opacity: 0.6; height: 4px; transform: translateY(-2px); }
}

/* ─────────── marquee / warning banner ─────────── */
.skull-banner {
  background: var(--blood);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  border-bottom: 3px double var(--magenta);
  position: relative;
  z-index: 10;
}
.marquee {
  display: inline-block;
  animation: marquee 28s linear infinite;
  padding-left: 100%;
}
@keyframes marquee {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* ─────────── main layout ─────────── */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 24px;
  position: relative;
  z-index: 2;
}

/* ─────────── hero ─────────── */
.hero {
  text-align: center;
  padding: 56px 36px;
  margin-bottom: 56px;
  border: 2px dashed var(--blood);
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(255, 0, 51, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
}

/* Corner L-decorations in magenta */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  border: 3px solid var(--magenta);
}
.hero::before { top: -3px; left: -3px; border-right: none; border-bottom: none; }
.hero::after  { bottom: -3px; right: -3px; border-left: none; border-top: none; }

.hero-eyebrow {
  color: var(--electric);
  font-size: 12px;
  letter-spacing: 4px;
  margin-bottom: 24px;
  text-transform: uppercase;
  font-family: 'Press Start 2P', monospace;
}

.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(28px, 7vw, 64px);
  color: var(--blood);
  letter-spacing: -1px;
  margin-bottom: 28px;
  line-height: 1;
  text-shadow:
    0 0 8px var(--blood),
    0 0 22px var(--blood),
    3px 3px 0 var(--magenta),
    -3px -3px 0 var(--electric);
  animation: title-flicker 5s infinite;
}
.hero-title .bleed {
  color: var(--magenta);
  text-shadow:
    0 0 8px var(--magenta),
    0 0 22px var(--magenta),
    3px 3px 0 var(--blood),
    -3px -3px 0 var(--toxic);
}
@keyframes title-flicker {
  0%, 92%, 100%  { opacity: 1; }
  93%           { opacity: 0.3; transform: translate(2px, 0); }
  94%           { opacity: 1;   transform: translate(-2px, 0); }
  95%           { opacity: 0.2; filter: hue-rotate(40deg); }
  96%           { opacity: 1;   filter: none; }
  97%           { opacity: 0.7; }
}

/* Glitch RGB-split on hover for interactive elements */
.glitch-hover {
  position: relative;
  transition: text-shadow 0.08s;
}
.glitch-hover:hover {
  text-shadow:
    -2px 0 var(--electric),
     2px 0 var(--blood),
     0 0 12px var(--magenta);
  animation: glitch-shake 0.18s steps(3) infinite;
}
@keyframes glitch-shake {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-1px, 1px); }
  66%  { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

.hero-sub {
  font-size: clamp(17px, 2.3vw, 24px);
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 36px;
  font-family: 'VT323', monospace;
}
.hero-sub strong { color: var(--text-bright); font-weight: bold; }
.hero-sub em     { color: var(--magenta); font-style: normal; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.stat {
  padding: 6px 14px;
  border: 1px solid var(--blood-dim);
  font-size: 15px;
  color: var(--blood);
  font-family: 'VT323', monospace;
  letter-spacing: 1px;
  background: rgba(255, 0, 51, 0.05);
}

/* ─────────── buttons ─────────── */
.start-btn {
  background: var(--blood);
  color: var(--bg);
  border: none;
  padding: 20px 46px;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
  margin: 6px 8px 14px;
  box-shadow: 6px 6px 0 var(--magenta);
  text-transform: uppercase;
}
.start-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--magenta), 0 0 32px rgba(255, 0, 51, 0.6);
  animation: glitch-shake 0.2s steps(3) infinite;
}
.start-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--magenta);
}
.start-btn.ghost {
  background: transparent;
  color: var(--toxic);
  border: 2px solid var(--toxic);
  box-shadow: 6px 6px 0 var(--blood-dim);
}
.start-btn.ghost:hover {
  background: var(--toxic);
  color: var(--bg);
  box-shadow: 8px 8px 0 var(--blood-dim);
}

.start-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  animation: none !important;
}

/* ─────────── status text + meta lines ─────────── */
.test-status, .baseline-status, .hero-status {
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--ghost);
  letter-spacing: 0.5px;
}
.test-status .tick, .baseline-status .tick { color: var(--toxic); }
.test-status a, .baseline-status a { color: var(--blood); }

/* ─────────── sections ─────────── */
main > section {
  margin-bottom: 56px;
  padding: 26px 26px 26px 34px;
  border-left: 4px solid var(--blood);
  position: relative;
  background: var(--bg-card);
}
main > section:hover { border-left-color: var(--magenta); }

main > section h2, .section-title {
  font-family: 'Major Mono Display', monospace;
  color: var(--electric);
  font-size: clamp(22px, 3.5vw, 32px);
  margin-bottom: 18px;
  text-transform: lowercase;
}

main > section p {
  margin-bottom: 12px;
  font-size: 19px;
  color: var(--text);
}
main > section p strong { color: var(--text-bright); }
main > section p em { color: var(--magenta); font-style: normal; font-weight: bold; }

.highlight {
  color: var(--magenta);
  background: rgba(255, 0, 170, 0.08);
  padding: 1px 5px;
  font-weight: bold;
}

/* ─────────── howto steps ─────────── */
.howto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.howto-step {
  border: 1px dashed var(--blood-dim);
  background: var(--bg-card);
  padding: 18px 20px;
  position: relative;
}
.howto-step::before {
  content: attr(data-step);
  position: absolute; top: -14px; left: 14px;
  background: var(--bg);
  color: var(--blood);
  padding: 0 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 2px;
}
.howto-step h3 {
  font-family: 'Press Start 2P', monospace;
  color: var(--text-bright);
  font-size: 12px;
  letter-spacing: 1px;
  margin: 8px 0 10px;
  text-transform: uppercase;
  line-height: 1.4;
}
.howto-step p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}
@media (max-width: 720px) {
  .howto { grid-template-columns: 1fr; }
}

/* ─────────── test frame + iframe ─────────── */
.test-frame {
  display: none;
  margin-top: 24px;
  padding: 22px;
  background: var(--bg-card);
  border: 2px dashed var(--blood-dim);
}
.test-frame.active { display: block; }

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 2px;
  background: var(--blood-faint);
  margin-bottom: 18px;
}
.live-stat {
  background: var(--bg-card);
  padding: 14px 16px;
}
.live-stat .label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--ghost);
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.live-stat .value {
  font-family: 'VT323', monospace;
  font-size: 32px;
  color: var(--blood);
  line-height: 1;
}
.live-stat .value.good { color: var(--toxic); }
.live-stat .value.accent { color: var(--magenta); }
.live-stat .value.warn { color: var(--warn); }
.live-stat .unit { font-size: 14px; color: var(--ghost); margin-left: 4px; }

.test-iframe-wrap {
  border: 1px solid var(--blood-faint);
  background: #fff;
  min-height: 200px;
  margin-bottom: 14px;
  position: relative;
}
.test-iframe-wrap iframe {
  width: 100%;
  height: 640px;
  border: 0;
  display: block;
}

/* ─────────── results ─────────── */
.results {
  display: none;
  margin-top: 36px;
  padding: 40px 28px;
  border: 2px dashed var(--blood);
  background:
    radial-gradient(ellipse at top, rgba(255, 0, 51, 0.06), transparent 60%),
    var(--bg-card);
  position: relative;
}
.results.active { display: block; }
.results::before, .results::after {
  content: ""; position: absolute;
  width: 24px; height: 24px;
  border: 3px solid var(--magenta);
}
.results::before { top: -3px; left: -3px; border-right: none; border-bottom: none; }
.results::after  { bottom: -3px; right: -3px; border-left: none; border-top: none; }

.score-hero { text-align: center; margin-bottom: 32px; }

.score-ratio {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(64px, 14vw, 140px);
  line-height: 0.95;
  color: var(--toxic);
  text-shadow:
    0 0 10px var(--toxic),
    0 0 30px rgba(0, 255, 136, 0.5),
    4px 4px 0 var(--blood),
    -4px -4px 0 var(--electric);
  animation: title-flicker 6s infinite;
}
.score-ratio .x { font-size: 0.5em; color: var(--ghost); margin-left: 6px; text-shadow: none; }
.score-ratio.slow {
  color: var(--blood);
  text-shadow:
    0 0 10px var(--blood),
    0 0 30px rgba(255, 0, 51, 0.5),
    4px 4px 0 var(--magenta),
    -4px -4px 0 var(--warn);
}

.score-grade {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 26px;
  padding: 8px 22px;
  background: var(--toxic);
  color: var(--bg);
  letter-spacing: 2px;
  margin-top: 14px;
  box-shadow: 4px 4px 0 var(--blood);
}
.score-grade.slow {
  background: var(--blood);
  box-shadow: 4px 4px 0 var(--magenta);
}

.score-label {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--ghost);
  letter-spacing: 1px;
  margin-top: 18px;
  text-transform: uppercase;
}

.score-subscore {
  margin-top: 12px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--electric);
  letter-spacing: 1px;
}

/* ─────────── subscore grid (composite breakdown) ─────────── */
.subscore-grid { margin: 28px 0 20px; }
.subscore-grid > .k {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--ghost);
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.subscore-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px;
  background: var(--blood-faint);
}
.subscore-cell {
  background: var(--bg-card);
  padding: 16px 18px;
  border-top: 3px solid var(--blood-dim);
}
.subscore-cell.good { border-top-color: var(--toxic); }
.subscore-cell.warn { border-top-color: var(--warn); }
.subscore-cell.bad  { border-top-color: var(--blood); }
.subscore-cell .sub-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--ghost);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.4;
}
.subscore-cell .sub-value {
  font-family: 'VT323', monospace;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
}
.subscore-cell.good .sub-value { color: var(--toxic); }
.subscore-cell.warn .sub-value { color: var(--warn); }
.subscore-cell.bad  .sub-value { color: var(--blood); }
.subscore-cell .sub-value .unit {
  font-size: 18px;
  color: var(--ghost);
  margin-left: 2px;
}
.subscore-cell .sub-weight {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: var(--ghost);
  margin-top: 6px;
  letter-spacing: 1px;
}
.subscore-explain {
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: var(--ghost);
  line-height: 1.45;
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 2px solid var(--blood-dim);
}
.subscore-explain strong { color: var(--text-bright); }

/* ─────────── request bar ─────────── */
.request-bar { margin: 24px 0; }
.request-bar .k {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--ghost);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.request-bar-track {
  display: flex;
  height: 34px;
  background: var(--bg);
  border: 1px solid var(--blood-dim);
}
.request-bar-track > div {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  font-weight: bold;
  font-size: 16px;
  transition: width 0.4s;
  color: var(--bg);
}
.request-bar-track .bar-blocked { background: var(--toxic); }
.request-bar-track .bar-loaded { background: var(--blood); }
.request-bar-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ghost);
  font-family: 'VT323', monospace;
  letter-spacing: 1px;
}
.request-bar-legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; }
.request-bar-legend .sw.b { background: var(--toxic); }
.request-bar-legend .sw.l { background: var(--blood); }

/* ─────────── breakdown grid ─────────── */
.breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
  background: var(--blood-faint);
  margin-top: 28px;
}
.breakdown-cell {
  background: var(--bg-card);
  padding: 18px 20px;
}
.breakdown-cell .k {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--ghost);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.breakdown-cell .v {
  font-family: 'VT323', monospace;
  font-size: 30px;
  color: var(--text-bright);
  line-height: 1;
}
.breakdown-cell .v .unit {
  font-size: 15px;
  color: var(--ghost);
  margin-left: 4px;
}

/* ─────────── lifetime steal block ─────────── */
.steal {
  margin-top: 30px;
  padding: 26px 28px;
  background: #000;
  border: 2px solid var(--blood);
  position: relative;
  animation: title-flicker 9s infinite;
}
.steal .header {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--blood);
  letter-spacing: 3px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.steal .amount {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 4.5vw, 36px);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -1px;
  color: var(--toxic);
  text-shadow: 3px 3px 0 var(--blood-dim);
}
.steal .explain {
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  font-family: 'VT323', monospace;
}
.steal .explain strong { color: var(--magenta); }

/* ─────────── sibling cross-link ─────────── */
.sibling {
  margin-top: 50px;
  padding: 24px 26px;
  border: 1px dashed var(--toxic);
  background: rgba(0, 255, 136, 0.04);
}
.sibling .k {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--toxic);
  letter-spacing: 3px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.sibling .title {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--text-bright);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sibling .explain {
  color: var(--text);
  font-size: 17px;
  font-family: 'VT323', monospace;
}
.sibling .explain a { color: var(--blood); text-decoration: underline; }
.sibling .explain a:hover { color: var(--magenta); }

/* ─────────── footer ─────────── */
footer {
  margin-top: 80px;
  padding: 32px 24px;
  border-top: 2px dashed var(--blood-dim);
  color: var(--ghost);
  font-family: 'VT323', monospace;
  font-size: 15px;
  letter-spacing: 1px;
  text-align: center;
}
footer .footer-brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--blood);
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
footer .legal {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ghost);
}
