:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #101114;
  color: #f6f7fb;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(40, 135, 122, 0.16), transparent 28rem),
    linear-gradient(145deg, #101114 0%, #181a1f 55%, #101114 100%);
}

button {
  font: inherit;
}

#game-shell {
  position: relative;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(16, 17, 20, 0.45), rgba(16, 17, 20, 0.82)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 26px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 26px
    );
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#play-button {
  min-width: min(520px, 88vw);
  min-height: 92px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: #0f1115;
  cursor: pointer;
  background: #f4d35e;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.42),
    inset 0 -8px 0 rgba(0, 0, 0, 0.16);
  font-size: clamp(2rem, 7vw, 4.9rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  transform: translateY(0);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    filter 120ms ease;
}

#play-button:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.5),
    inset 0 -8px 0 rgba(0, 0, 0, 0.16);
}

#play-button:active {
  transform: translateY(2px);
  box-shadow:
    0 14px 48px rgba(0, 0, 0, 0.44),
    inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.overlay-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: rgba(246, 247, 251, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
}

.overlay-meta span,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(20, 22, 27, 0.78);
  backdrop-filter: blur(12px);
}

.overlay-meta span {
  padding: 8px 12px;
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.top-row,
.bottom-row {
  position: absolute;
  right: 18px;
  left: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.top-row {
  top: 16px;
  align-items: flex-start;
}

.bottom-row {
  bottom: 16px;
  align-items: flex-end;
}

.panel {
  min-height: 48px;
  padding: 10px 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

.room-panel,
.status-panel,
.vitals-panel,
.movement-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label {
  color: rgba(246, 247, 251, 0.64);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.badge {
  display: inline-grid;
  min-width: 64px;
  min-height: 28px;
  place-items: center;
  border-radius: 6px;
  color: #101114;
  background: #74d3ae;
  font-size: 0.78rem;
  font-weight: 950;
}

.room-link {
  max-width: min(42vw, 360px);
  border: 0;
  color: #f6f7fb;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  pointer-events: auto;
  background: transparent;
  font-weight: 850;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-link:hover {
  color: #f4d35e;
}

#net-status {
  color: rgba(246, 247, 251, 0.78);
  font-size: 0.86rem;
  font-weight: 750;
}

.vitals-panel strong,
.movement-panel strong {
  min-width: 54px;
  color: #f4d35e;
  font-size: 1.55rem;
  line-height: 1;
}

.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
}

.crosshair span {
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
}

.crosshair span:first-child {
  width: 2px;
  height: 24px;
}

.crosshair span:last-child {
  width: 24px;
  height: 2px;
}

.kill-feed {
  position: absolute;
  top: 82px;
  right: 18px;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 36px));
  margin: 0;
  padding: 0;
  list-style: none;
}

.kill-feed li {
  border-left: 4px solid #ee6055;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f6f7fb;
  background: rgba(20, 22, 27, 0.86);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  font-size: 0.9rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .top-row,
  .bottom-row {
    right: 10px;
    left: 10px;
  }

  .top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .status-panel,
  .room-panel {
    justify-content: space-between;
  }

  .bottom-row {
    bottom: 10px;
  }

  .panel {
    min-height: 42px;
    padding: 9px 10px;
  }

  .kill-feed {
    top: 118px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}
