:root {
  --bg: #04060c;
  --bg2: #070b14;
  --panel: #0a0f1c;
  --panel2: #0e1526;
  --border: #1b2540;
  --green: #00ff9c;
  --green-dim: #0a3;
  --amber: #ffb020;
  --red: #ff2d5e;
  --cyan: #23d5ff;
  --purple: #c47bff;
  --text: #d8e2f5;
  --dim: #5f6f92;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, #0b1a2455 0%, transparent 60%),
    linear-gradient(var(--bg2) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg2) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 40px 40px, 40px 40px, auto;
  color: var(--text);
  font-family: "VT323", monospace;
  font-size: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  image-rendering: pixelated;
  overflow-x: hidden;
}
/* CRT scanlines + vignette over everything */
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 60%, rgba(0,0,0,.45) 100%);
}

header { padding: 22px 28px 4px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.logo {
  font-family: "Press Start 2P", monospace; font-size: 26px; letter-spacing: 3px;
  color: var(--green);
  text-shadow: 0 0 6px var(--green), 0 0 24px #00ff9c66, 0 0 60px #00ff9c33;
  animation: neon-flicker 6s infinite;
}
.logo span { color: #fff; text-shadow: 0 0 6px #fff8, 0 0 24px #ffffff44; }
.logo::after {
  content: "▮"; color: var(--green); margin-left: 6px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes neon-flicker {
  0%, 92%, 94%, 100% { opacity: 1; }
  93% { opacity: .55; }
}
.tagline { color: var(--dim); font-size: 22px; }
.tagline::before { content: "// "; color: var(--green-dim); }

.ca-bar { display: flex; gap: 12px; padding: 14px 28px; align-items: center; flex-wrap: wrap; }
#ca-input {
  flex: 1; min-width: 300px;
  background: linear-gradient(180deg, #060a13, #0a0f1c);
  border: 2px solid var(--border); border-radius: 2px;
  color: var(--green); font-family: inherit; font-size: 22px; padding: 12px 16px; outline: none;
  caret-color: var(--green);
  box-shadow: inset 0 0 18px #000a;
  transition: border-color .15s, box-shadow .15s;
}
#ca-input::placeholder { color: var(--dim); }
#ca-input:focus { border-color: var(--green); box-shadow: inset 0 0 18px #000a, 0 0 16px #00ff9c33; }
#check-btn {
  font-family: "Press Start 2P", monospace; font-size: 13px; padding: 16px 22px;
  background: var(--green); color: #032015; border: 0; border-radius: 2px; cursor: pointer;
  box-shadow: 0 0 18px #00ff9c55, 0 4px 0 #00994f;
  transition: transform .05s, box-shadow .15s;
}
#check-btn:hover:not(:disabled) { box-shadow: 0 0 30px #00ff9c88, 0 4px 0 #00994f; }
#check-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 30px #00ff9c88, 0 1px 0 #00994f; }
#check-btn:disabled { background: var(--border); color: var(--dim); cursor: wait; box-shadow: none; }
.checks-left { color: var(--dim); }
.error-bar {
  margin: 0 28px; padding: 10px 16px; border: 2px solid var(--red); color: var(--red);
  background: #1a070d; box-shadow: 0 0 20px #ff2d5e33, inset 0 0 20px #ff2d5e11;
}

main { display: flex; gap: 20px; padding: 12px 28px; flex: 1; align-items: flex-start; flex-wrap: wrap; }
.office-wrap { flex: 0 0 auto; position: relative; }
#office {
  border: 2px solid var(--border); border-radius: 3px; background: #000;
  width: 680px; max-width: 100%;
  box-shadow: 0 0 0 1px #000, 0 0 40px #00ff9c11, 0 18px 50px #000c;
}
#office canvas { display: block; width: 100%; height: auto; }
.office-caption { color: var(--dim); padding: 8px 2px 0; max-width: 680px; }
.office-caption::before { content: "> "; color: var(--green); }

.right-col { flex: 1; min-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.feed-head {
  font-family: "Press Start 2P", monospace; font-size: 11px; color: var(--green);
  text-shadow: 0 0 8px #00ff9c66; letter-spacing: 2px;
  display: flex; align-items: center; gap: 10px;
}
.feed-head::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--green-dim), transparent); }
.feed {
  background: linear-gradient(180deg, var(--panel), #080d18);
  border: 2px solid var(--border); border-radius: 3px; padding: 14px;
  min-height: 240px; max-height: 430px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: inset 0 0 30px #0009, 0 10px 30px #000a;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.feed:empty::before { content: "awaiting contract address…"; color: var(--dim); animation: blink 1.4s steps(1) infinite; }

.feed-msg {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px;
  padding: 10px; border-radius: 3px;
  background: #0c1222aa; border: 1px solid var(--border);
  border-left: 3px solid var(--wc, var(--border));
  animation: msg-in .18s ease-out;
  box-shadow: 0 4px 14px #0006;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.feed-msg .avatar {
  width: 32px; height: 32px; image-rendering: pixelated;
  border: 1px solid var(--wc, var(--border)); border-radius: 3px;
  background: #060a13; box-shadow: 0 0 10px color-mix(in srgb, var(--wc) 35%, transparent);
}
.feed-msg .who { font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--wc); text-shadow: 0 0 8px color-mix(in srgb, var(--wc) 60%, transparent); }
.feed-msg .conf {
  color: var(--amber); font-size: 14px; margin-left: 8px; font-family: "VT323", monospace;
  border: 1px solid #ffb02055; padding: 0 5px; border-radius: 2px; vertical-align: 2px;
}
.feed-msg p { margin: 3px 0 0; line-height: 1.25; }
.feed-msg.w-liquidity { --wc: var(--cyan); }
.feed-msg.w-bundle { --wc: var(--amber); }
.feed-msg.w-sniper { --wc: var(--red); }
.feed-msg.w-kol { --wc: var(--purple); }
.feed-msg.w-dev { --wc: var(--green); }
.feed-msg.w-manager { --wc: #fff; background: #131a2ecc; }

.score-panel {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel2), #0a0f1c);
  border: 2px solid var(--border); border-radius: 3px; padding: 20px; text-align: center;
  box-shadow: 0 10px 40px #000b;
  animation: msg-in .25s ease-out;
}
.score-panel.g { border-color: #00ff9c66; box-shadow: 0 0 40px #00ff9c22, 0 10px 40px #000b; }
.score-panel.a { border-color: #ffb02066; box-shadow: 0 0 40px #ffb02022, 0 10px 40px #000b; }
.score-panel.r { border-color: #ff2d5e66; box-shadow: 0 0 40px #ff2d5e22, 0 10px 40px #000b; }
.score-token { color: var(--dim); font-size: 22px; }
.score-num {
  font-family: "Press Start 2P", monospace; font-size: 64px; margin: 10px 0 6px;
}
.score-num.g { color: var(--green); text-shadow: 0 0 14px #00ff9c88, 0 0 50px #00ff9c44; }
.score-num.a { color: var(--amber); text-shadow: 0 0 14px #ffb02088, 0 0 50px #ffb02044; }
.score-num.r { color: var(--red); text-shadow: 0 0 14px #ff2d5e88, 0 0 50px #ff2d5e44; }
.score-bar {
  height: 10px; margin: 6px auto 10px; max-width: 320px;
  border: 1px solid var(--border); border-radius: 2px; background: #060a13; overflow: hidden;
}
.score-bar i {
  display: block; height: 100%; width: 0; transition: width 1s steps(20);
  background: repeating-linear-gradient(90deg, var(--bc, var(--green)) 0 8px, color-mix(in srgb, var(--bc, var(--green)) 55%, black) 8px 10px);
  box-shadow: 0 0 12px var(--bc, var(--green));
}
.score-panel.g .score-bar i { --bc: var(--green); }
.score-panel.a .score-bar i { --bc: var(--amber); }
.score-panel.r .score-bar i { --bc: var(--red); }
.score-label { font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--dim); letter-spacing: 3px; }
.verdict {
  font-family: "Press Start 2P", monospace; font-size: 20px; margin: 14px 0;
  display: inline-block; padding: 10px 18px; border: 2px solid; border-radius: 2px;
}
.verdict.g { color: var(--green); border-color: var(--green); box-shadow: 0 0 20px #00ff9c44, inset 0 0 20px #00ff9c11; }
.verdict.a { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 20px #ffb02044, inset 0 0 20px #ffb02011; }
.verdict.r { color: var(--red); border-color: var(--red); box-shadow: 0 0 20px #ff2d5e44, inset 0 0 20px #ff2d5e11; animation: alarm 1s infinite; }
@keyframes alarm { 50% { box-shadow: 0 0 40px #ff2d5e88, inset 0 0 20px #ff2d5e33; } }
.share-row { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }
.share-row button {
  font-family: "Press Start 2P", monospace; font-size: 10px; padding: 12px 14px; cursor: pointer;
  background: var(--panel); color: var(--text); border: 2px solid var(--border); border-radius: 2px;
  transition: all .12s;
}
.share-row button:hover { border-color: var(--green); color: var(--green); box-shadow: 0 0 16px #00ff9c33; transform: translateY(-2px); }

footer { color: var(--dim); padding: 16px 28px; font-size: 16px; border-top: 1px solid var(--border); margin-top: 12px; }
.hidden { display: none !important; }
