:root {
  --cyan: #49d9ff;
  --pink: #ff4eb8;
  --green: #66f2bd;
  --gold: #f8c14c;
  --ice: #eef8ff;
  --muted: rgba(238, 248, 255, 0.72);
  --panel: rgba(12, 19, 32, 0.78);
  --panel-strong: rgba(13, 20, 34, 0.93);
  --line: rgba(255, 255, 255, 0.14);
  --bg: #07111d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #081625 0%, #050b14 54%, #03070d 100%);
  color: var(--ice);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.radar-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(68, 181, 235, 0.12), transparent 34%);
  opacity: 0.55;
}

.radar-topbar {
  position: relative;
  z-index: 3;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 11, 0.88);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.radar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.radar-brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 217, 255, 0.28);
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  background: rgba(11, 22, 38, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.radar-brand strong,
.radar-brand span:last-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-brand strong {
  max-width: 52vw;
  font-size: 18px;
}

.radar-brand span:last-child {
  max-width: 54vw;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.radar-topbar-actions,
.radar-counts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-count,
.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 28, 45, 0.72);
  color: var(--ice);
  text-decoration: none;
}

.team-count {
  min-width: 82px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.team-blue {
  color: #c9f5ff;
  border-color: rgba(73, 217, 255, 0.34);
}

.team-pink {
  color: #ffd8ef;
  border-color: rgba(255, 78, 184, 0.34);
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 18px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 217, 255, 0.42);
  background: rgba(13, 26, 42, 0.9);
}

.radar-status {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(248, 193, 76, 0.55);
}

.radar-status.online {
  background: var(--green);
  box-shadow: 0 0 18px rgba(102, 242, 189, 0.55);
}

.radar-status.closed,
.radar-status.error {
  background: var(--pink);
  box-shadow: 0 0 18px rgba(255, 78, 184, 0.55);
}

.radar-layout {
  position: relative;
  z-index: 1;
  height: calc(100svh - 86px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  padding: 22px;
}

.radar-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 30px;
  gap: 10px;
}

.radar-canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(5, 12, 22, 0.84);
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.44);
}

#radarCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#radarCanvas.is-dragging {
  cursor: grabbing;
}

.radar-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 5, 9, 0.55);
  color: var(--ice);
  font-weight: 800;
  text-align: center;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.radar-overlay.is-hidden {
  opacity: 0;
}

.radar-session-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  color: rgba(238, 248, 255, 0.62);
  font-size: 12px;
  overflow: hidden;
}

.radar-session-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-sidebar {
  min-height: 0;
  display: grid;
  grid-auto-rows: min-content;
  gap: 14px;
  overflow: auto;
  padding-right: 2px;
}

.radar-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.panel-head {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ice);
}

.panel-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0;
}

.team-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.team-dot.blue {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(73, 217, 255, 0.5);
}

.team-dot.pink {
  background: var(--pink);
  box-shadow: 0 0 16px rgba(255, 78, 184, 0.5);
}

.player-list,
.object-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.player-card,
.object-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(17, 27, 43, 0.72);
}

.player-card {
  padding: 9px;
}

.player-card.dead {
  opacity: 0.52;
}

.player-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.player-name,
.player-weapon {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name {
  font-size: 13px;
  font-weight: 800;
}

.player-weapon {
  margin-top: 2px;
  color: rgba(238, 248, 255, 0.58);
  font-size: 11px;
}

.bomb-badge {
  padding: 2px 6px;
  border: 1px solid rgba(248, 193, 76, 0.42);
  border-radius: 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.bars {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
}

.bar.hp span {
  background: linear-gradient(90deg, #ff5578, #66f2bd);
}

.bar.armor span {
  background: linear-gradient(90deg, #49d9ff, #eef8ff);
}

.object-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  color: rgba(238, 248, 255, 0.78);
  font-size: 12px;
}

.object-swatch {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--green);
}

.control-row,
.control-stack {
  display: grid;
  gap: 7px;
  padding: 11px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(238, 248, 255, 0.76);
  font-size: 12px;
}

.control-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

input[type="checkbox"] {
  width: 38px;
  height: 22px;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  position: relative;
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: rgba(238, 248, 255, 0.8);
  transition: transform 0.16s ease, background 0.16s ease;
}

input[type="checkbox"]:checked {
  border-color: rgba(73, 217, 255, 0.46);
  background: rgba(73, 217, 255, 0.2);
}

input[type="checkbox"]:checked::before {
  transform: translateX(16px);
  background: var(--cyan);
}

select,
input[type="range"] {
  width: 100%;
}

select {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(13, 22, 36, 0.92);
  color: var(--ice);
  padding: 0 10px;
}

input[type="range"] {
  accent-color: var(--cyan);
}

.esp-body {
  overflow: hidden;
  background: #020509;
}

#espCanvas {
  width: 100vw;
  height: 100vh;
  display: block;
  background:
    radial-gradient(circle at center, rgba(73, 217, 255, 0.12), transparent 36%),
    #020509;
}

.esp-status {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 10, 18, 0.78);
  color: var(--ice);
  font-size: 12px;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .radar-layout {
    height: auto;
    min-height: calc(100svh - 86px);
    grid-template-columns: 1fr;
  }

  .radar-stage {
    height: calc(100svh - 104px);
    min-height: 460px;
  }

  .radar-sidebar {
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 620px) {
  .radar-topbar {
    height: auto;
    min-height: 86px;
    align-items: flex-start;
    flex-direction: column;
  }

  .radar-layout {
    min-height: calc(100svh - 132px);
    padding: 14px;
  }

  .radar-topbar-actions,
  .radar-counts {
    width: 100%;
  }

  .team-count {
    flex: 1;
  }

  .radar-stage {
    height: 62svh;
    min-height: 380px;
  }
}
