:root {
  color: #f7f7fb;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #101018;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-width: 320px;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #141414;
  touch-action: none;
}

.hud {
  position: fixed;
  z-index: 5;
  pointer-events: none;
}

.hud-top {
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand,
.chip,
.icon-button,
.scoreboard,
.power-panel,
.controls-hint,
.feed,
.banner {
  background: rgba(17, 18, 23, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.brand {
  max-width: min(56vw, 340px);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip {
  min-width: 76px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  pointer-events: auto;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.ui-icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scoreboard {
  position: fixed;
  z-index: 5;
  top: 72px;
  left: 16px;
  display: grid;
  gap: 7px;
  min-width: 190px;
  max-width: min(310px, calc(100vw - 32px));
  padding: 10px;
  border-radius: 8px;
}

.score-row {
  display: grid;
  grid-template-columns: 14px minmax(74px, 1fr) 30px 20px 42px;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  padding: 3px 4px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
}

.score-row.is-you {
  background: rgba(255, 241, 118, 0.18);
  outline: 1px solid rgba(255, 241, 118, 0.42);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.score-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-status {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ffca3a;
  font-style: normal;
}

.row-status:empty {
  opacity: 0;
}

.row-status.danger {
  color: #ff5454;
}

.health-bar {
  width: 42px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.health-bar > i {
  display: block;
  height: 100%;
  background: #65d87c;
}

.power-panel {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 8px;
  width: min(560px, calc(100vw - 28px));
  padding: 10px;
  border-radius: 8px;
  transform: translateX(-50%);
}

.power-panel.is-hidden {
  display: none;
}

.power-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.power-card.is-ready {
  background: color-mix(in srgb, var(--power-color) 20%, rgba(255, 255, 255, 0.09));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--power-color) 42%, transparent);
}

.power-card::after {
  position: absolute;
  inset: calc((1 - var(--cooldown, 0)) * 100%) 0 0;
  content: "";
  background: rgba(0, 0, 0, 0.46);
  pointer-events: none;
}

.power-card b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ctf-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.ctf-score b {
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.ctf-score span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  white-space: nowrap;
}

.ctf-score .ui-icon {
  width: 13px;
  height: 13px;
}

.power-card small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
}

.power-card kbd,
.loadout-slots kbd {
  min-width: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.power-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #141414;
  font-size: 18px;
  font-weight: 900;
}

.feed {
  position: fixed;
  z-index: 5;
  right: 16px;
  top: 72px;
  display: grid;
  gap: 6px;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 720;
}

.feed div {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
}

.feed i {
  display: grid;
  place-items: center;
  color: #ffca3a;
  font-style: normal;
}

.feed:empty {
  display: none;
}

.kill-feedback {
  position: fixed;
  z-index: 6;
  left: 50%;
  top: 19%;
  display: grid;
  gap: 4px;
  min-width: 260px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(12, 13, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px) scale(0.96);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.kill-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  animation: feedback-punch 260ms ease-out;
}

.kill-feedback > i {
  justify-self: center;
  color: #ffca3a;
  font-size: 24px;
}

.kill-feedback b {
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}

.kill-feedback span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.kill-feedback.positive {
  border-color: rgba(101, 216, 124, 0.64);
}

.kill-feedback.negative {
  border-color: rgba(255, 84, 84, 0.68);
}

.controls-hint {
  position: fixed;
  z-index: 5;
  right: 16px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  width: 172px;
  padding: 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  font-weight: 800;
}

.controls-hint span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.controls-hint b {
  color: #ffffff;
}

.mobile-ui {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: none;
  pointer-events: none;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
}

.mobile-ui[aria-hidden="true"] {
  display: none;
}

.mobile-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.mobile-chip,
.mobile-reset,
.mobile-meta {
  background: rgba(11, 14, 20, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  border-radius: 10px;
}

.mobile-chip {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mobile-reset {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  color: #f7f7fb;
}

.mobile-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 800;
}

.mobile-board {
  margin-top: 7px;
  display: grid;
  gap: 3px;
  max-width: 158px;
  padding: 6px 7px;
  border-radius: 9px;
  background: rgba(8, 12, 18, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.mobile-board-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 6px;
  min-height: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 800;
}

.mobile-board-row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.mobile-board-row.is-you {
  color: #fff7b6;
}

.mobile-board-row b {
  font-size: 10px;
}

.mobile-controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 74px));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.mobile-stick {
  width: 148px;
  height: 148px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at 45% 45%, rgba(255, 255, 255, 0.11), rgba(0, 0, 0, 0.2));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  position: relative;
  touch-action: none;
  opacity: 0.62;
}

.mobile-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.mobile-powers {
  position: absolute;
  right: 10px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.mobile-power {
  position: relative;
  overflow: hidden;
  width: 66px;
  min-height: 66px;
  display: grid;
  gap: 3px;
  justify-items: center;
  align-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 18, 0.34);
  color: rgba(255, 255, 255, 0.95);
  pointer-events: auto;
  --cooldown: 0;
  --mobile-power-color: #f7f7fb;
  backdrop-filter: blur(4px);
}

.mobile-power::after {
  position: absolute;
  inset: calc((1 - var(--cooldown)) * 100%) 0 0;
  content: "";
  background: rgba(0, 0, 0, 0.52);
  pointer-events: none;
}

.mobile-power i {
  color: var(--mobile-power-color);
  font-style: normal;
  font-size: 24px;
}

.mobile-power small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

body.is-mobile-ui .mobile-ui {
  display: block;
}

body.is-mobile-ui .hud-top,
body.is-mobile-ui .scoreboard,
body.is-mobile-ui .power-panel,
body.is-mobile-ui .feed,
body.is-mobile-ui .controls-hint {
  display: none;
}

.banner {
  position: fixed;
  z-index: 10;
  inset: 50% auto auto 50%;
  width: min(940px, calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.banner.is-hidden {
  display: none;
}

.banner h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}

.banner p {
  margin: 12px 0 18px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.45;
}

.banner button {
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #ffca3a;
  color: #17130b;
  cursor: pointer;
  font-weight: 900;
}

.banner button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.banner > #start {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -10px 22px rgba(17, 18, 23, 0.72);
}

.loadout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  text-align: left;
}

.banner .loadout-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 5px 9px;
  min-width: 0;
  min-height: 82px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
}

.banner .loadout-card.is-selected {
  border-color: rgba(255, 202, 58, 0.88);
  background: rgba(255, 202, 58, 0.14);
}

.banner .loadout-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.loadout-card b {
  align-self: end;
  font-size: 12px;
}

.loadout-card span {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  line-height: 1.35;
}

.loadout-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--power-color) 26%, rgba(255, 255, 255, 0.08));
  color: var(--power-color);
  font-size: 21px;
}

.loadout-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}

.loadout-slots span {
  display: grid;
  grid-template-columns: auto 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-dashboard {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 12px;
  margin: 16px 0 18px;
  text-align: left;
}

.dash-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.loadout-section {
  grid-row: span 2;
}

.powers-section {
  grid-column: 1 / -1;
}

.dash-section h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1;
}

.dash-section h2 .ui-icon {
  color: #ffca3a;
}

.dash-section label,
.bind-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 850;
}

.dash-section input[type="number"] {
  width: 74px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
}

.banner .bind-key {
  min-width: 72px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.banner .bind-key.is-listening {
  border-color: rgba(255, 202, 58, 0.8);
  color: #ffca3a;
}

.power-tune-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.power-tune {
  display: grid;
  grid-template-columns: 18px 30px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.power-tune.is-off {
  opacity: 0.46;
}

.power-tune input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffca3a;
}

.power-tune .loadout-icon {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

.power-tune span {
  display: grid;
  min-width: 0;
}

.power-tune b,
.power-tune small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.power-tune b {
  color: #ffffff;
  font-size: 12px;
}

.power-tune small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

body.is-impact .power-panel,
body.is-impact .scoreboard {
  animation: hud-impact 180ms ease-out;
}

@keyframes feedback-punch {
  0% {
    transform: translate(-50%, -4px) scale(0.92);
  }
  58% {
    transform: translate(-50%, 0) scale(1.06);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes hud-impact {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.025);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

.scoreboard {
  transform-origin: top left;
}

body.is-impact .scoreboard {
  animation-name: hud-impact-left;
}

@keyframes hud-impact-left {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  .hud-top {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .brand {
    max-width: calc(100vw - 140px);
    font-size: 12px;
  }

  .scoreboard {
    top: 62px;
    left: 10px;
    min-width: 170px;
  }

  .feed {
    display: none;
  }

  .controls-hint {
    right: 10px;
    bottom: 92px;
    width: 154px;
  }

  .power-panel {
    bottom: 10px;
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .power-card {
    grid-template-columns: 20px 1fr;
    padding: 8px;
  }

  .power-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .banner h1 {
    font-size: 30px;
  }

  .custom-dashboard {
    grid-template-columns: 1fr;
  }

  .loadout-section,
  .powers-section {
    grid-column: auto;
    grid-row: auto;
  }

  .loadout-grid {
    grid-template-columns: 1fr;
  }

  .loadout-slots {
    grid-template-columns: 1fr;
  }

  .power-tune-grid {
    grid-template-columns: 1fr;
  }

  .dash-section label,
  .bind-row {
    grid-template-columns: 1fr;
  }
}
