:root {
  --bg: #07070a;
  --panel: #0f0f15;
  --panel2: #15151d;
  --line: #24242f;
  --ink: #ecebf2;
  --dim: #8a8a9a;
  --red: #ff2e3a;
  --red2: #b3121d;
  --cyan: #3cf2ff;
  --amber: #ffb22e;
  --green: #4dff88;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --disp: 'Anton', Impact, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; background: radial-gradient(1200px 500px at 50% -200px, #2a0a10 0%, transparent 70%), var(--bg); }
a { color: var(--cyan); }
button { font-family: var(--mono); cursor: pointer; }
small { color: var(--dim); font-weight: 400; }
[hidden] { display: none !important; }

/* ---------- top ---------- */
.top { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(7,7,10,.92); backdrop-filter: blur(6px); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 8px; }
.brand span { font-family: var(--disp); font-size: 30px; letter-spacing: 2px; color: var(--red); text-shadow: 0 0 18px rgba(255,46,58,.45); }
.tag { color: var(--dim); font-size: 13px; }
.status { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); text-transform: uppercase; }
.status.pre { color: var(--amber); border-color: rgba(255,178,46,.4); }
.status.live { color: var(--green); border-color: rgba(77,255,136,.4); }
.status.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 8px var(--green); animation: blink 1.4s infinite; }
.status.off { color: var(--red); border-color: rgba(255,46,58,.4); }
.actions { display: flex; gap: 8px; align-items: center; }
.ca, .sound { background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.buy { background: var(--red); color: #fff; font-weight: 800; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 12px; letter-spacing: .5px; box-shadow: 0 0 20px rgba(255,46,58,.35); }
.announce { background: var(--amber); color: #120c00; font-weight: 800; text-align: center; padding: 8px 12px; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- power bar ---------- */
.grid-power { max-width: 1320px; margin: 16px auto 0; padding: 0 16px; }
.pw-head { display: flex; justify-content: space-between; align-items: end; font-weight: 800; letter-spacing: 1px; }
.pw-h { color: var(--red); font-family: var(--disp); font-size: 22px; letter-spacing: 2px; }
.pw-a { color: var(--cyan); font-family: var(--disp); font-size: 22px; letter-spacing: 2px; }
.pw-mid { color: var(--ink); font-size: 13px; text-align: center; }
.pw-bar { position: relative; height: 22px; margin: 6px 0; border-radius: 6px; overflow: hidden; background: linear-gradient(90deg, #0b3a40, #0d5560); border: 1px solid #1c4c55; box-shadow: inset 0 0 18px rgba(60,242,255,.25); }
.pw-fill { position: absolute; inset: 0 auto 0 0; width: 0; min-width: 4px; background: linear-gradient(90deg, var(--red2), var(--red)); box-shadow: 0 0 22px rgba(255,46,58,.7); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.pw-spark { position: absolute; top: -6px; bottom: -6px; width: 3px; left: 0; background: #fff; box-shadow: 0 0 12px #fff, 0 0 24px var(--red); transition: left .8s cubic-bezier(.2,.8,.2,1); }
.pw-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 12px; flex-wrap: wrap; }
.pw-foot b { color: var(--ink); }

/* ---------- layout ---------- */
.layout { max-width: 1320px; margin: 16px auto; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

/* ---------- cull panel ---------- */
.cull { display: grid; grid-template-columns: 280px 1fr; gap: 16px; background: linear-gradient(180deg, #1a0a0e, var(--panel)); border: 1px solid #3a141b; border-radius: 14px; padding: 16px; box-shadow: 0 0 40px rgba(255,46,58,.08); }
@media (max-width: 720px) { .cull { grid-template-columns: 1fr; } }
.cull-kind { color: var(--red); font-weight: 800; letter-spacing: 2px; font-size: 12px; }
.cull-clock { font-family: var(--disp); font-size: 76px; line-height: 1; letter-spacing: 2px; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.cull-clock.hot { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { text-shadow: 0 0 24px var(--red); } }
.cull-rule { color: var(--dim); font-size: 12px; line-height: 1.5; }
.block-h { font-weight: 800; letter-spacing: 1.5px; font-size: 12px; color: var(--amber); margin-bottom: 8px; }
.block { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .block { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.block li { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; text-align: center; position: relative; cursor: pointer; }
.block li:first-child { border-color: var(--red); box-shadow: 0 0 16px rgba(255,46,58,.35); }
.block li:first-child::after { content: 'NEXT OUT'; white-space: nowrap; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 4px; letter-spacing: 1px; }
.block img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #000; display: block; }
.block .s { font-weight: 800; font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block .c { font-size: 11px; }
.dn { color: var(--red); }
.up { color: var(--green); }
.immune { margin-top: 10px; font-size: 12px; color: var(--cyan); }
.votebar { margin-top: 8px; font-size: 12px; color: var(--dim); }
.votebar b { color: var(--ink); }

/* ---------- arena ---------- */
.arena-h { display: flex; justify-content: space-between; align-items: end; margin: 22px 0 10px; gap: 10px; flex-wrap: wrap; }
.arena-h h2 { font-family: var(--disp); font-weight: 400; letter-spacing: 2px; font-size: 26px; margin: 0; }
.arena-h h2 small { font-family: var(--mono); font-size: 11px; letter-spacing: 0; margin-left: 8px; }
.legend { display: flex; gap: 10px; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.lg-imm { color: var(--cyan); }
.lg-blk { color: var(--amber); }
.arena { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .arena { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: relative; overflow: hidden; transition: border-color .3s, transform .3s; }
.tile.blk { border-color: rgba(255,178,46,.55); }
.tile.next { border-color: var(--red); box-shadow: 0 0 18px rgba(255,46,58,.3); }
.tile.imm { border-color: var(--cyan); box-shadow: 0 0 18px rgba(60,242,255,.25); }
.tile .scr { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #000; }
.tile .scr img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1) contrast(1.05); }
.tile .scr::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); pointer-events: none; mix-blend-mode: multiply; }
.tile .rk { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; z-index: 2; }
.tile .bdg { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; z-index: 2; letter-spacing: .5px; }
.tile.imm .bdg { background: var(--cyan); color: #001014; }
.tile.next .bdg { background: var(--red); color: #fff; }
.tile.blk:not(.next) .bdg { background: var(--amber); color: #120c00; }
.tile .nm { display: flex; justify-content: space-between; gap: 6px; margin-top: 7px; font-weight: 800; font-size: 13px; }
.tile .nm span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; margin-top: 2px; }
.tile .pwr { height: 4px; background: #1a1a22; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.tile .pwr i { display: block; height: 100%; background: linear-gradient(90deg, #0d7d88, var(--cyan)); border-radius: 4px; transition: width .8s; }
.tile .vt { margin-top: 7px; width: 100%; border: 1px solid #4a1820; background: #1c0b0f; color: var(--red); font-weight: 800; font-size: 11px; padding: 6px; border-radius: 6px; letter-spacing: 1px; }
.tile .vt:hover:not(:disabled) { background: var(--red); color: #fff; }
.tile .vt:disabled { opacity: .45; cursor: default; }
.tile .vt.mine { background: var(--red); color: #fff; }
.tile.dying { animation: dying .6s infinite; }
@keyframes dying { 50% { filter: brightness(.4) hue-rotate(-20deg); } }
.tile.gone .scr img { animation: crtoff .7s forwards; }
@keyframes crtoff { 0% { transform: scale(1); filter: brightness(1.6); } 60% { transform: scale(1, .02); filter: brightness(3); } 100% { transform: scale(0, 0); filter: brightness(0); } }

/* ---------- side ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.hint { color: var(--dim); font-size: 11px; margin: 0 0 10px; line-height: 1.5; }
.empty { color: var(--dim); font-size: 12px; list-style: none; }
.buys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.buys button { background: var(--panel2); border: 1px solid var(--line); color: var(--ink); padding: 10px; border-radius: 8px; font-weight: 800; }
.buys button small { display: block; font-size: 10px; margin-top: 2px; }
.buys .whale { border-color: var(--red); color: var(--red); }
.buys .sell { color: var(--dim); }
.wall { display: flex; flex-wrap: wrap; gap: 6px; }
.wall .h { width: 34px; height: 34px; border-radius: 8px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.wall .h svg { width: 100%; height: 100%; display: block; }
.wall .h.out { opacity: .25; filter: grayscale(1); }
.wall .h.new { animation: pop .6s; border-color: var(--red); }
@keyframes pop { 0% { transform: scale(.2); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.grave { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; }
.grave li { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.grave li.empty { display: block; border: 0; }
.grave img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; filter: grayscale(1) contrast(1.2); background: #000; }
.grave .g1 { font-weight: 800; font-size: 12px; }
.grave .g2 { color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grave button { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; font-size: 11px; padding: 4px 7px; }
.feed { list-style: none; padding: 0; margin: 0; max-height: 300px; overflow: auto; font-size: 12px; }
.feed li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; justify-content: space-between; }
.feed li.empty { display: block; border: 0; }
.feed .k-human { color: var(--red); }
.feed .k-gone { color: var(--dim); }
.feed .k-kill { color: var(--amber); }
.feed .k-imm { color: var(--cyan); }
.feed a { color: var(--dim); text-decoration: none; }
.tagd { font-size: 9px; color: var(--amber); border: 1px solid rgba(255,178,46,.4); border-radius: 3px; padding: 0 3px; margin-left: 4px; }

/* ---------- how ---------- */
.how { max-width: 1320px; margin: 10px auto 30px; padding: 0 16px; }
.how h2 { font-family: var(--disp); font-weight: 400; letter-spacing: 2px; }
.how ol { line-height: 1.8; color: #cfcfd8; padding-left: 20px; }
.fine { color: var(--dim); font-size: 11px; line-height: 1.6; max-width: 900px; }
.foot { text-align: center; padding: 20px; border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 18px; font-size: 12px; }
.foot a { color: var(--dim); text-decoration: none; }

/* ---------- kill overlay ---------- */
.kill { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; gap: 28px; padding: 20px; flex-wrap: wrap; overflow: auto; }
.kill-crt { position: relative; flex: none; width: min(380px, 40vw, 72vh); aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #000; border: 10px solid #1b1b22; box-shadow: 0 0 0 2px #2b2b35, 0 30px 80px rgba(0,0,0,.8), 0 0 60px rgba(60,242,255,.25); }
.kill-crt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kill-crt .scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 2px, transparent 2px 4px); pointer-events: none; }
.kill-crt.glitch img { animation: glitch .12s steps(2) infinite; }
@keyframes glitch { 0% { transform: translate(0); filter: hue-rotate(0); } 50% { transform: translate(-6px, 2px); filter: hue-rotate(90deg) saturate(3); } 100% { transform: translate(5px, -3px); filter: hue-rotate(-60deg); } }
.kill-crt.off img { animation: crtoff 0.9s forwards; }
.kill-crt.dead img { animation: none; transform: none; opacity: .22; filter: grayscale(1) contrast(1.4) brightness(.6); transition: opacity 1.2s; }
.kill-crt .nosig { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-family: var(--disp); font-size: 42px; letter-spacing: 4px; color: #e6e6ee; text-shadow: 0 0 12px rgba(255,255,255,.5); }
.kill-crt.dead .nosig { display: flex; animation: flick 2s infinite; }
@keyframes flick { 0%, 92%, 100% { opacity: .9; } 94% { opacity: .2; } 96% { opacity: .7; } }
.kill-crt.dead::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 20px #fff; animation: dot 1.4s forwards; }
@keyframes dot { to { opacity: 0; transform: scale(.2); } }
.sparks { position: absolute; inset: 0; pointer-events: none; }
.sparks i { position: absolute; width: 3px; height: 3px; background: #fff; border-radius: 50%; box-shadow: 0 0 8px var(--cyan); }
.kill-card { width: min(460px, 50vw); opacity: 0; transform: translateY(16px); transition: all .5s; }
.kill-card.show { opacity: 1; transform: none; }
.kc-stamp { font-family: var(--disp); font-size: 64px; color: var(--red); letter-spacing: 3px; line-height: 1; text-shadow: 0 0 30px rgba(255,46,58,.6); transform: rotate(-3deg); }
.kc-name { font-weight: 800; font-size: 22px; margin-top: 10px; }
.kc-meta { color: var(--dim); margin-top: 4px; }
.kc-words { margin: 16px 0; padding: 12px 14px; border-left: 3px solid var(--red); background: #140a0d; font-size: 16px; line-height: 1.5; min-height: 52px; }
.kc-words::after { content: '▍'; color: var(--red); animation: blink .8s infinite; }
.kc-words.done::after { content: ''; }
.kc-how { color: var(--amber); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.kc-btns { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.kc-btns a, .kc-btns button { background: var(--panel2); border: 1px solid var(--line); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 800; font-size: 12px; text-decoration: none; }
.kc-btns .kc-x { background: #fff; color: #000; }

/* ---------- modal + toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; max-width: 420px; width: 100%; }
.modal-box h3 { margin-top: 0; }
.modal-btns { display: flex; gap: 8px; }
.modal-btns button { flex: 1; padding: 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font-weight: 800; }
.modal-btns .go { background: var(--red); border-color: var(--red); color: #fff; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1d1d26; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; z-index: 70; font-size: 13px; max-width: 90vw; }
.flash { position: fixed; inset: 0; background: #fff; z-index: 45; pointer-events: none; animation: flash .5s forwards; }
@keyframes flash { from { opacity: .8; } to { opacity: 0; } }
.blackout { position: fixed; inset: 0; background: #000; z-index: 44; pointer-events: none; animation: bo 1.2s forwards; }
@keyframes bo { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: .9; } 100% { opacity: 0; } }

@media (max-width: 760px) {
  .kill { flex-direction: column; justify-content: flex-start; gap: 16px; padding-top: 28px; }
  .kill-crt { width: min(300px, 72vw, 40vh); border-width: 7px; }
  .kill-card { width: min(460px, 92vw); }
  .kc-words { font-size: 14px; margin: 10px 0; }
}
@media (max-width: 520px) {
  .tag { display: none; }
  .brand span { font-size: 24px; }
  .cull-clock { font-size: 58px; }
  .kc-stamp { font-size: 48px; }
  .pw-foot small { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
