/* ThreatWall – designed on a fixed 1920×1080 canvas that is scaled to fit any screen. */
:root {
  --bg: #060a11;
  --panel: #0c131d;
  --panel2: #111a27;
  --line: #1c2838;
  --text: #e8eef6;
  --muted: #8193a8;
  --dim: #56677c;
  --crit: #ff3b4f;
  --high: #ff9f1c;
  --ok: #2fd27a;
  --accent: #3ab4ff;
  --violet: #a78bfa;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; cursor: none; }
body {
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  padding: 26px 28px 24px;
  display: flex; flex-direction: column; gap: 20px;
  transform-origin: 0 0;
  background:
    radial-gradient(1100px 520px at 85% -12%, rgba(58,180,255,.09), transparent 60%),
    radial-gradient(900px 520px at -5% 112%, rgba(255,59,79,.08), transparent 60%),
    var(--bg);
}

/* ---------------- header ---------------- */
.top {
  height: 112px; flex: none;
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 34px;
}
.brand { display: flex; align-items: center; gap: 18px; }
.logo { width: 62px; height: 62px; }
.logo path:first-child { fill: rgba(255,59,79,.16); stroke: var(--crit); stroke-width: 1.6; }
.logo .pulse { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; animation: draw 3s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 30; } 50%, 100% { stroke-dashoffset: 0; } }
h1 { font-size: 34px; font-weight: 800; letter-spacing: .14em; line-height: 1; }
.sub { margin-top: 8px; font-size: 16px; color: var(--muted); letter-spacing: .06em; display: flex; align-items: center; gap: 12px; }
.demo-badge { background: var(--high); color: #1a1000; font-weight: 800; font-size: 13px; letter-spacing: .12em;
  padding: 4px 10px; border-radius: 6px; }

.level {
  --lc: var(--muted);
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px 14px 20px; border-radius: 16px;
  border: 2px solid color-mix(in srgb, var(--lc) 55%, transparent);
  background: color-mix(in srgb, var(--lc) 12%, transparent);
}
.level.l-guarded { --lc: var(--ok); }
.level.l-elevated { --lc: #ffd23f; }
.level.l-high { --lc: var(--high); }
.level.l-severe { --lc: var(--crit); }
.ldot { width: 22px; height: 22px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 0 0 var(--lc);
  animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lc) 70%, transparent); }
  100% { box-shadow: 0 0 0 18px transparent; } }
.llbl { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.lval { font-size: 30px; font-weight: 800; letter-spacing: .08em; color: var(--lc); line-height: 1.1; }

.stats { display: flex; gap: 14px; justify-content: center; }
.stat {
  --sc: var(--accent);
  min-width: 210px; padding: 12px 22px 12px 20px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--sc);
}
.stat.crit { --sc: var(--crit); } .stat.kev { --sc: var(--high); }
.stat.rw { --sc: var(--violet); } .stat.grp { --sc: var(--accent); }
.num { font-size: 46px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.num.bump { animation: bump .9s ease; }
@keyframes bump { 30% { color: var(--sc); transform: scale(1.08); } }
.slbl { white-space: nowrap; margin-top: 6px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.clock { text-align: right; }
.time { font-size: 62px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.time .sec { color: var(--dim); font-size: 34px; margin-left: 4px; }
.date { margin-top: 6px; font-size: 18px; color: var(--muted); }

/* ---------------- grid & panels ---------------- */
.grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.16fr 1.04fr 1fr; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.grow { flex: 1; }
.panel {
  position: relative; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 18px 22px;
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
}
.ph { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex: none; }
h2 { --hc: var(--crit); font-size: 21px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; white-space: nowrap; }
h2::before { content: ""; width: 6px; height: 24px; border-radius: 3px; background: var(--hc); }
h2.rw { --hc: var(--violet); } h2.kev { --hc: var(--high); } h2.news { --hc: var(--accent); }
.hint { font-size: 15px; color: var(--dim); white-space: nowrap; }
.pager { margin-left: auto; display: flex; gap: 7px; }
.pager i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .4s, width .4s; }
.pager i.on { background: var(--muted); width: 26px; border-radius: 5px; }
.list { flex: 1; min-height: 0; }
.list.swap > * { animation: rise .6s ease both; }
.list.swap > *:nth-child(2) { animation-delay: .05s; } .list.swap > *:nth-child(3) { animation-delay: .1s; }
.list.swap > *:nth-child(4) { animation-delay: .15s; } .list.swap > *:nth-child(5) { animation-delay: .2s; }
.list.swap > *:nth-child(6) { animation-delay: .25s; } .list.swap > *:nth-child(7) { animation-delay: .3s; }
.list.swap > *:nth-child(8) { animation-delay: .35s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.empty { color: var(--dim); font-size: 19px; padding: 30px 4px; }

.tag { font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.tag.exp { background: var(--crit); color: #fff; }
.tag.new { background: var(--accent); color: #00131f; animation: blink 1.6s ease-in-out infinite; }
.tag.rw { background: rgba(167,139,250,.18); color: var(--violet); border: 1px solid rgba(167,139,250,.4); }
@keyframes blink { 50% { opacity: .45; } }
.age { color: var(--dim); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------- CVE list ---------------- */
.cve { display: grid; grid-template-columns: 86px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cve:last-child { border-bottom: 0; }
.score {
  width: 86px; height: 86px; border-radius: 16px; display: grid; place-items: center;
  font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--crit); background: rgba(255,59,79,.12); border: 2px solid rgba(255,59,79,.55);
}
.score.s10 { background: var(--crit); color: #fff; border-color: var(--crit); box-shadow: 0 0 24px rgba(255,59,79,.45); }
.score.na { color: var(--muted); background: rgba(129,147,168,.1); border-color: var(--line); font-size: 20px; }
.cve .row1 { display: flex; align-items: center; gap: 12px; white-space: nowrap; min-width: 0; }
.cve > div:last-child { min-width: 0; }
.cve .id { font-family: var(--mono); font-size: 23px; font-weight: 700; letter-spacing: .01em; }
.cve .row1 .age { margin-left: auto; }
.cve .prod { margin-top: 3px; font-size: 18px; color: var(--accent); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cve .desc { margin-top: 4px; font-size: 16.5px; line-height: 1.38; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cve.is-new .score { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 30px rgba(58,180,255,.6); } }

/* ---------------- ransomware ---------------- */
.vic { display: grid; grid-template-columns: 76px 1fr auto 56px; gap: 14px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.vic:last-child { border-bottom: 0; }
.vic .t { font-family: var(--mono); font-size: 16px; color: var(--dim); }
.vic .name { font-size: 19px; font-weight: 650; display: flex; align-items: center; gap: 10px; min-width: 0; }
.vic .name span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vic .name .tag { flex: none; }
.vic .sector { font-size: 14px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { font-size: 15px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.cc { font-family: var(--mono); font-size: 15px; font-weight: 700; text-align: center; padding: 4px 0;
  border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.cc.home { color: var(--accent); border-color: rgba(58,180,255,.5); }

.bar { display: grid; grid-template-columns: 150px 1fr 44px; gap: 14px; align-items: center; margin: 9px 0; }
.bar .g { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .tr { height: 16px; border-radius: 8px; background: rgba(255,255,255,.04); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 8px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.bar .n { font-size: 18px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- KEV ---------------- */
.kv { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .row1 { display: flex; align-items: center; gap: 10px; }
.kv .id { font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--high); }
.kv .row1 .age { margin-left: auto; }
.kv .what { margin-top: 3px; font-size: 16.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv .what b { color: var(--muted); font-weight: 600; }

/* ---------------- news ---------------- */
#newsBox { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.feat { padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.feat.swap { animation: rise .7s ease both; }
.feat .meta { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--accent); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; }
.feat .meta.prio > span:first-child { color: #fff; background: var(--crit); padding: 3px 10px; border-radius: 6px; }
.psrc { color: var(--crit); font-weight: 800; }
.feat .meta .age { text-transform: none; letter-spacing: 0; font-weight: 400; }
.feat .hl { margin-top: 8px; font-size: 27px; font-weight: 750; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prog { margin-top: 12px; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--accent); }
.prog i.run { animation: prog linear forwards; }
@keyframes prog { to { width: 100%; } }
.more { margin-top: 6px; flex: 1; min-height: 0; overflow: hidden; }
.more div { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; font-size: 16.5px; color: var(--muted);
  border-bottom: 1px solid rgba(28,40,56,.6); }
.more div span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more div:last-child { border-bottom: 0; }

/* ---------------- footer / ticker ---------------- */
.bottom { height: 58px; flex: none; display: flex; align-items: stretch; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); }
.tlabel { display: grid; place-items: center; padding: 0 22px; background: var(--crit); color: #fff;
  font-weight: 800; font-size: 17px; letter-spacing: .16em; }
.track { flex: 1; overflow: hidden; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.tmove { position: absolute; top: 0; left: 0; height: 100%; display: flex; align-items: center; white-space: nowrap;
  font-size: 20px; will-change: transform; animation: tick linear infinite; }
.tmove span { padding: 0 18px; }
.tmove .src { color: var(--accent); font-weight: 700; padding-right: 8px; }
.tmove .src.prio { color: #fff; background: var(--crit); border-radius: 6px; padding: 3px 10px; margin-right: 10px; }
.tmove .sep { color: var(--crit); padding: 0 6px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.status { display: flex; align-items: center; gap: 10px; padding: 0 22px; font-size: 15px; color: var(--muted);
  border-left: 1px solid var(--line); white-space: nowrap; }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.status.stale .sdot { background: var(--high); } .status.down .sdot { background: var(--crit); }
.status.demo .sdot { background: var(--high); }
.status.live .sdot { animation: blink 2s infinite; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
