@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Inter:wght@600;800;900&display=swap');

:root {
  --acid: #d8ff3e;
  --hot: #ff3d71;
  --ink: #080a0f;
  --panel: rgba(11, 14, 22, .9);
  --event-color: #d8ff3e;
  --ui-scale: 1;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: transparent; }
body { color: white; font-family: Inter, sans-serif; }

#arena {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6,8,13,.18) 0%, rgba(6,8,13,.06) 55%, rgba(6,8,13,.72) 100%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(216,255,62,.025) 80px),
    transparent;
}

/* Clean OBS alpha mode: combat pixels only, with no tinted arena wash. */
body.overlay-mode #arena { background: transparent; }
body.overlay-mode #arena::after { display: none; }
body.overlay-mode #hud,
body.overlay-mode #channel-badge { display: none !important; }
body.overlay-mode #feed:not([hidden]) {
  display: block;
  top: calc(108px * var(--ui-scale));
  right: calc(26px * var(--ui-scale));
  bottom: auto;
  max-height: calc(100vh - (56px * var(--ui-scale)));
  overflow: hidden;
  background: rgba(8, 10, 15, .62);
  border-right: 1px solid rgba(216, 255, 62, .28);
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(0,0,0,.18);
  border-radius: calc(12px * var(--ui-scale)) 0 0 calc(12px * var(--ui-scale));
  box-shadow: calc(-16px * var(--ui-scale)) 0 calc(28px * var(--ui-scale)) rgba(0,0,0,.16);
  backdrop-filter: blur(8px);
  text-align: right;
}
body.overlay-mode #feed h2 {
  color: var(--acid);
  text-shadow: 0 2px 3px #000, 1px 1px 0 #000, -1px -1px 0 #000;
}
body.overlay-mode #feed li {
  color: white;
  font-size: calc(11px * var(--ui-scale));
  font-weight: 800;
  text-shadow:
    0 2px 4px #000,
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000;
}
body.overlay-mode #scoreboard {
  border-top-color: rgba(255,255,255,.28);
}
body.overlay-mode #cooldowns,
body.overlay-mode #queue-panel {
  border-top-color: rgba(255,255,255,.22);
}
body.overlay-mode #scoreboard li {
  text-align: left;
}
body.overlay-mode #announcer {
  top: 20%;
  padding: calc(8px * var(--ui-scale)) calc(18px * var(--ui-scale));
  background: rgba(8, 10, 15, .72);
  border-left: calc(5px * var(--ui-scale)) solid var(--acid);
}
body.overlay-mode #match-timer {
  background: transparent;
  border: 0;
  text-shadow:
    0 3px 5px #000,
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000;
}
body.overlay-mode #event-banner {
  background: transparent;
  border: 0;
  text-shadow:
    0 3px 5px #000,
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000;
}

#arena::after {
  content: "";
  position: absolute; inset: auto 0 0; height: 18%;
  background: linear-gradient(transparent, rgba(216,255,62,.08));
  border-bottom: 4px solid var(--acid);
  pointer-events: none;
}

#effects, #fighters { position: absolute; inset: 0; width: 100%; height: 100%; }
#effects { pointer-events: none; }

#setup {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 48px)); padding: 42px;
  background: var(--panel); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 14px 14px 0 var(--acid);
}
.brand, .logo { font-family: "Black Ops One", sans-serif; letter-spacing: 2px; }
.brand { font-size: clamp(36px, 7vw, 64px); line-height: .9; }
.brand span, .logo span { color: var(--acid); }
#setup p { color: #aeb4c1; }
#setup label { display: block; margin: 30px 0 8px; color: var(--acid); font-size: 11px; letter-spacing: 2px; }
.input-row { display: flex; align-items: center; background: #05070b; border: 1px solid #3b414d; }
.input-row > span { padding-left: 15px; color: #737b89; font-size: 20px; }
input { flex: 1; min-width: 0; padding: 15px 8px; color: white; background: none; border: 0; outline: 0; font: 800 17px Inter; }
button { align-self: stretch; padding: 0 20px; border: 0; background: var(--acid); color: var(--ink); font-weight: 900; cursor: pointer; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.settings-grid label,
.settings-checks label {
  margin: 0;
}
.settings-grid label span {
  display: block;
  margin-bottom: 6px;
  color: var(--acid);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.settings-grid input,
.settings-grid select,
#setting-ignore {
  width: 100%;
  padding: 11px 10px;
  color: white;
  background: #05070b;
  border: 1px solid #3b414d;
  outline: 0;
  font: 800 14px Inter;
}
.settings-grid select {
  color-scheme: dark;
}
.settings-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  color: #d7dce5;
  font-size: 12px;
  font-weight: 900;
}
.settings-checks input {
  width: auto;
  margin-right: 6px;
  vertical-align: middle;
}
#setting-ignore {
  margin-top: 0;
}
.providers { display: flex; gap: 8px; margin-top: 20px; }
.providers span { padding: 5px 8px; background: #252a34; color: #aeb4c1; font-size: 10px; letter-spacing: 1px; }
#setup .hint { margin-bottom: 0; font-size: 11px; }
code { color: white; }

#hud {
  position: absolute; top: 24px; left: 28px; right: 28px;
  align-items: center; gap: 24px; height: 64px; padding: 0 18px;
  background: linear-gradient(90deg, var(--panel), rgba(11,14,22,.45), transparent);
  border-left: 5px solid var(--acid); pointer-events: none;
}
#hud:not([hidden]) { display: flex; }
.logo { font-size: 25px; }
#status { display: flex; align-items: center; gap: 8px; color: #9198a5; font-size: 10px; letter-spacing: 1.5px; }
#status i { width: 8px; height: 8px; border-radius: 50%; background: #ffb020; box-shadow: 0 0 12px currentColor; }
#status.live i { background: var(--acid); }
.counter { display: grid; place-items: center; margin-left: auto; min-width: 54px; }
.counter + .counter { margin-left: 0; }
.counter strong { font: 26px "Black Ops One"; line-height: 1; }
.counter small { color: #89909d; font-size: 8px; letter-spacing: 2px; }

#match-timer {
  position: absolute;
  left: 50%;
  top: calc(24px * var(--ui-scale));
  z-index: 30000;
  transform: translateX(-50%);
  padding: calc(7px * var(--ui-scale)) calc(16px * var(--ui-scale));
  color: var(--acid);
  background: rgba(8, 10, 15, .72);
  border-bottom: calc(3px * var(--ui-scale)) solid var(--hot);
  font: calc(34px * var(--ui-scale)) "Black Ops One";
  letter-spacing: 2px;
  pointer-events: none;
}

#event-banner {
  position: absolute;
  left: 50%;
  top: calc(78px * var(--ui-scale));
  z-index: 30000;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  gap: calc(2px * var(--ui-scale));
  min-width: calc(260px * var(--ui-scale));
  padding: calc(8px * var(--ui-scale)) calc(18px * var(--ui-scale));
  color: white;
  background: rgba(8, 10, 15, .78);
  border-left: calc(4px * var(--ui-scale)) solid var(--event-color);
  border-right: calc(4px * var(--ui-scale)) solid var(--event-color);
  box-shadow: 0 0 calc(24px * var(--ui-scale)) rgba(0,0,0,.35);
  pointer-events: none;
}
#event-banner[hidden] { display: none; }
#event-banner strong {
  color: var(--event-color);
  font: calc(24px * var(--ui-scale)) "Black Ops One";
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 #000;
}
#event-banner span {
  color: #fff;
  font-size: calc(10px * var(--ui-scale));
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
#event-banner.show { animation: eventBanner .55s ease-out; }

#feed {
  position: absolute; right: calc(26px * var(--ui-scale)); top: calc(108px * var(--ui-scale)); width: calc(250px * var(--ui-scale)); padding: calc(12px * var(--ui-scale)) calc(14px * var(--ui-scale));
  background: linear-gradient(135deg, rgba(8,10,15,.82), rgba(8,10,15,.2));
  border-top: 2px solid var(--hot); pointer-events: none;
}
#feed h2 { margin: 0 0 calc(10px * var(--ui-scale)); color: var(--hot); font-size: calc(9px * var(--ui-scale)); letter-spacing: calc(2px * var(--ui-scale)); }
#feed ol { display: flex; flex-direction: column; gap: calc(7px * var(--ui-scale)); margin: 0; padding: 0; list-style: none; }
#feed li { color: #bbc0cb; font-size: calc(10px * var(--ui-scale)); animation: feedIn .25s ease-out; }
#feed b { color: white; }
#feed-list {
  height: calc(119px * var(--ui-scale));
  overflow: hidden;
}
#feed-list li {
  min-height: calc(14px * var(--ui-scale));
  line-height: calc(14px * var(--ui-scale));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#scoreboard {
  margin-top: calc(18px * var(--ui-scale));
  padding-top: calc(10px * var(--ui-scale));
  border-top: 1px solid rgba(255,255,255,.18);
}
#scoreboard ol { counter-reset: rank; }
#score-list {
  height: calc(98px * var(--ui-scale));
  overflow: hidden;
}
#scoreboard li {
  display: grid;
  grid-template-columns: calc(18px * var(--ui-scale)) minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(7px * var(--ui-scale));
  min-height: calc(14px * var(--ui-scale));
}
#scoreboard li::before {
  counter-increment: rank;
  content: counter(rank);
  color: var(--acid);
  font: calc(12px * var(--ui-scale)) "Black Ops One";
}
#scoreboard .score-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#scoreboard .score-kills {
  color: var(--acid);
  font: calc(14px * var(--ui-scale)) "Black Ops One";
}
#cooldowns {
  margin-top: calc(18px * var(--ui-scale));
  padding-top: calc(10px * var(--ui-scale));
  border-top: 1px solid rgba(255,255,255,.18);
}
#cooldown-list {
  height: calc(98px * var(--ui-scale));
  overflow: hidden;
}
#cooldown-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(8px * var(--ui-scale));
  min-height: calc(14px * var(--ui-scale));
  text-align: left;
  animation: none;
}
#cooldown-list .cooldown-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#cooldown-list .cooldown-time {
  color: var(--hot);
  font: calc(11px * var(--ui-scale)) "Black Ops One";
}
#queue-panel {
  margin-top: calc(18px * var(--ui-scale));
  padding-top: calc(10px * var(--ui-scale));
  border-top: 1px solid rgba(255,255,255,.18);
}
#queue-list {
  height: calc(98px * var(--ui-scale));
  overflow: hidden;
}
#queue-panel li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: calc(8px * var(--ui-scale));
  min-height: calc(14px * var(--ui-scale));
  text-align: left;
}
#queue-panel li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#queue-panel li small {
  color: var(--acid);
  overflow: hidden;
  max-width: calc(85px * var(--ui-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
#queue-more {
  margin: calc(7px * var(--ui-scale)) 0 0;
  color: #fff;
  font-size: calc(9px * var(--ui-scale));
  text-align: right;
  text-shadow: 1px 1px 2px #000;
}

#channel-badge {
  position: absolute; left: 28px; bottom: 24px; padding: 8px 13px;
  background: var(--panel); border-bottom: 2px solid var(--acid); pointer-events: none;
}
#channel-badge span { display: block; color: var(--acid); font-size: 8px; letter-spacing: 2px; }
#channel-badge strong { font-size: 13px; }

.fighter {
  --size: 68px;
  position: absolute; width: var(--size); height: calc(var(--size) + (40px * var(--ui-scale)));
  transform: translate(-50%, -50%); will-change: transform, left, top;
  filter: drop-shadow(0 7px 5px rgba(0,0,0,.65));
}
.fighter img {
  width: 100%;
  height: var(--size);
  object-fit: contain;
  image-rendering: auto;
  filter: var(--fighter-filter, none);
  transition: filter .25s, width .25s, height .25s;
}
.fighter .name {
  position: absolute; top: calc(var(--size) + (4px * var(--ui-scale))); left: 50%; transform: translateX(-50%);
  max-width: calc(135px * var(--ui-scale)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: calc(3px * var(--ui-scale)) calc(6px * var(--ui-scale)); background: rgba(0,0,0,.75); color: #f3f4f6; font-size: calc(10px * var(--ui-scale));
}
.fighter .level {
  position: absolute;
  top: calc(var(--size) - (7px * var(--ui-scale)));
  right: calc(-4px * var(--ui-scale));
  padding: calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale));
  background: var(--rarity-color, var(--acid));
  color: var(--ink);
  font: calc(9px * var(--ui-scale)) "Black Ops One";
  box-shadow: calc(2px * var(--ui-scale)) calc(2px * var(--ui-scale)) 0 #000;
}
.hp { position: absolute; left: 5%; top: calc(-7px * var(--ui-scale)); width: 90%; height: calc(4px * var(--ui-scale)); background: #2c3038; }
.hp i { display: block; width: 100%; height: 100%; background: var(--acid); transition: width .12s; }
.fighter.hit img { animation: hit .18s linear; filter: brightness(2) saturate(.3); }
.fighter.attack img { animation: attack .2s ease-out; }
.fighter.level-up img { animation: levelUp .55s ease-out; }
.fighter.finalist {
  z-index: 20000;
  height: calc(var(--size) + (72px * var(--ui-scale)));
}
.fighter.finalist > img {
  border-radius: 50%;
  background: rgba(8, 10, 15, .75);
  border: 3px solid currentColor;
  object-fit: cover;
}
.fighter.finalist .level { display: none; }
.fighter.winner {
  filter:
    drop-shadow(0 7px 5px rgba(0,0,0,.65))
    drop-shadow(0 0 22px var(--acid))
    drop-shadow(0 0 38px var(--hot));
}
.fighter.winner img { animation: winnerPulse .9s ease-in-out infinite; }
.fighter.winner .name { animation: winnerNameBounce .9s ease-in-out infinite; }
.fighter.place-2 {
  filter:
    drop-shadow(0 7px 5px rgba(0,0,0,.65))
    drop-shadow(0 0 18px #cbd5e1)
    drop-shadow(0 0 28px rgba(203,213,225,.7));
}
.fighter.place-3 {
  filter:
    drop-shadow(0 7px 5px rgba(0,0,0,.65))
    drop-shadow(0 0 18px #f59e0b)
    drop-shadow(0 0 28px rgba(245,158,11,.62));
}
.fighter.event-target::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid var(--event-color);
  border-radius: 999px;
  opacity: .72;
  filter: drop-shadow(0 0 10px var(--event-color));
  animation: eventTargetPulse .7s ease-in-out infinite;
  pointer-events: none;
}
.podium-result {
  position: absolute;
  top: calc(var(--size) + (54px * var(--ui-scale)));
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  gap: calc(1px * var(--ui-scale));
  min-width: calc(74px * var(--ui-scale));
  padding: calc(4px * var(--ui-scale)) calc(8px * var(--ui-scale));
  color: white;
  background: rgba(8, 10, 15, .82);
  border-bottom: 2px solid currentColor;
  font-family: "Black Ops One";
  text-align: center;
  text-shadow: calc(2px * var(--ui-scale)) calc(2px * var(--ui-scale)) 0 #000;
  pointer-events: none;
}
.podium-result span { font-size: calc(22px * var(--ui-scale)); line-height: 1; }
.podium-result strong {
  color: currentColor;
  font-size: calc(10px * var(--ui-scale));
  white-space: nowrap;
}
.fighter.place-1 .podium-result { color: #facc15; }
.fighter.place-2 .podium-result { color: #cbd5e1; }
.fighter.place-3 .podium-result { color: #f59e0b; }
.podium-emotes {
  position: absolute;
  top: calc(var(--size) + (20px * var(--ui-scale)));
  left: 50%;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: calc(4px * var(--ui-scale));
  transform: translateX(-50%);
  pointer-events: none;
}
.podium-emotes img {
  width: calc(var(--size) * .34);
  height: calc(var(--size) * .34);
  object-fit: contain;
  padding: calc(2px * var(--ui-scale));
  background: rgba(8, 10, 15, .78);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: calc(8px * var(--ui-scale));
  filter: drop-shadow(0 calc(3px * var(--ui-scale)) calc(2px * var(--ui-scale)) rgba(0,0,0,.75));
}
.fighter.dead { animation: death .48s forwards; pointer-events: none; }
.damage {
  position: absolute; z-index: 10000; color: white; font: calc(18px * var(--ui-scale)) "Black Ops One";
  transform: translate(-50%, -100%);
  text-shadow: calc(2px * var(--ui-scale)) calc(2px * var(--ui-scale)) 0 #000; pointer-events: none; animation: damage .7s forwards;
}
.winner-text {
  z-index: 30000;
  font-size: calc(30px * var(--ui-scale));
  opacity: 1;
  text-shadow:
    0 0 12px currentColor,
    3px 3px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000;
  animation: winnerText 1.2s ease-out forwards;
}
.crit-text {
  z-index: 10001;
  font-size: calc(22px * var(--ui-scale));
  text-shadow:
    0 0 10px currentColor,
    2px 2px 0 #000,
    -1px -1px 0 #000;
}

#announcer {
  position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%);
  color: white; font: calc(56px * var(--ui-scale)) "Black Ops One";
  text-align: center; text-shadow: 5px 5px 0 var(--hot); opacity: 0; pointer-events: none;
}
#announcer.show { animation: announce 1.8s ease-out; }

@keyframes hit { 50% { transform: translateX(9px) rotate(8deg); } }
@keyframes attack { 50% { transform: scale(1.28) rotate(-8deg); } }
@keyframes levelUp {
  35% { transform: scale(1.5); filter: brightness(2.2) saturate(2); }
}
@keyframes winnerPulse {
  50% { transform: translateY(-10px) scale(1.12) rotate(-4deg); filter: brightness(1.5) saturate(2.2); }
}
@keyframes winnerNameBounce {
  50% { transform: translateX(-50%) translateY(-10px) scale(1.12); }
}
@keyframes death { to { transform: translate(-50%,-50%) scale(0) rotate(420deg); opacity: 0; } }
@keyframes damage { to { transform: translate(-50%, -100%) translateY(-42px) scale(1.4); opacity: 0; } }
@keyframes winnerText {
  0% { transform: translate(-50%, -100%) scale(.85); opacity: 0; }
  12%, 78% { opacity: 1; }
  45% { transform: translate(-50%, -100%) translateY(-22px) scale(1.35); opacity: 1; }
  100% { transform: translate(-50%, -100%) translateY(-48px) scale(1.12); opacity: .65; }
}
@keyframes eventBanner {
  0% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(.92); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes eventTargetPulse {
  50% { opacity: 1; transform: scale(1.12); }
}
@keyframes announce { 0% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); } 15%,70% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; } }
@keyframes feedIn { from { opacity: 0; transform: translateX(15px); } }

@media (max-width: 700px) {
  #feed { display: none; }
  #hud { left: 12px; right: 12px; top: 12px; }
  .logo { font-size: 17px; }
}
