.fps-page {
  width: min(1380px, 95vw);
}

.fps-hero {
  background: linear-gradient(115deg, rgba(255, 246, 234, 0.9), rgba(236, 250, 255, 0.84));
}

.fps-user-card {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(52, 102, 151, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: #334155;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.88rem;
}

.fps-back-link {
  margin: 10px 0 0;
}

.fps-back-link a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 700;
}

.fps-layout {
  margin-top: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

body.fps-lock-scroll {
  overflow: hidden;
}

.fps-stage-wrap {
  position: relative;
  border: 1px solid rgba(52, 102, 151, 0.24);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(214, 237, 255, 0.95), rgba(193, 228, 255, 0.88));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  min-height: 560px;
}

.fps-stage-wrap.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  margin: 0;
  border-radius: 0;
  border: none;
  min-height: 100dvh;
  height: 100dvh;
  width: 100dvw;
}

.fps-stage {
  width: 100%;
  height: 100%;
  min-height: 560px;
}

.fps-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.fps-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  backdrop-filter: blur(3px);
}

.fps-self-hud {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 8;
  min-width: 200px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.48);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  padding: 8px 10px;
  backdrop-filter: blur(3px);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.28);
}

.fps-self-team {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: #cbd5e1;
}

.fps-self-conn {
  margin-top: 2px;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: #93c5fd;
}

.fps-self-hp-text {
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
}

.fps-self-hp-track {
  margin-top: 6px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.72);
  overflow: hidden;
}

.fps-self-hp-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #06b6d4);
  transition: width 120ms linear, background 180ms ease-out;
}

.fps-self-hud.is-low .fps-self-hp-fill {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.fps-self-hud.is-critical .fps-self-hp-fill {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.fps-crosshair {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  pointer-events: none;
}

.fps-crosshair.is-firing {
  transform: scale(1.2);
}

.fps-crosshair::before,
.fps-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(14, 116, 144, 0.92);
  box-shadow: 0 0 8px rgba(240, 249, 255, 0.92);
}

.fps-crosshair::before {
  width: 2px;
  height: 28px;
  left: 13px;
  top: 0;
}

.fps-crosshair::after {
  width: 28px;
  height: 2px;
  left: 0;
  top: 13px;
}

.fps-shot-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.26), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(125, 211, 252, 0.2), transparent 40%);
  transition: opacity 120ms ease-out;
}

.fps-shot-fx.is-active {
  opacity: 1;
}

.fps-hit-fx {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) scale(0.92);
  color: #22d3ee;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(6, 182, 212, 0.75);
  opacity: 0;
  pointer-events: none;
}

.fps-hit-fx.is-active {
  animation: fps-hit-pop 260ms ease-out;
}

.fps-kill-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 7;
  background:
    radial-gradient(circle at 50% 52%, rgba(251, 191, 36, 0.22), transparent 34%),
    radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.2), transparent 62%);
}

.fps-kill-fx.is-active {
  animation: fps-kill-fx-pop 560ms ease-out;
}

.fps-kill-icon {
  position: absolute;
  right: 16px;
  top: 52px;
  z-index: 9;
  min-width: 78px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.52);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(245, 158, 11, 0.9));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(0.88);
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.36);
}

.fps-kill-icon.is-active {
  animation: fps-kill-icon-pop 1100ms ease-out;
}

.fps-event-toast {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  max-width: min(88%, 760px);
  z-index: 8;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  padding: 8px 12px;
  opacity: 0;
  pointer-events: none;
}

.fps-event-toast.is-active {
  animation: fps-toast-pop 2200ms ease-out;
}

.fps-fullscreen-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 7;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.fps-touch-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  display: none;
}

.fps-move-pad {
  position: absolute;
  left: 16px;
  bottom: 74px;
  width: 126px;
  height: 126px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.32);
  box-shadow: inset 0 0 0 1px rgba(30, 64, 175, 0.3);
  pointer-events: auto;
  touch-action: none;
}

.fps-move-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -27px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.72);
  border: 1px solid rgba(224, 242, 254, 0.9);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.55);
  transition: transform 30ms linear;
}

.fps-look-pad {
  position: absolute;
  right: 16px;
  bottom: 74px;
  width: 150px;
  height: 136px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(15, 23, 42, 0.24);
  color: rgba(226, 232, 240, 0.74);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
}

.fps-look-pad.is-active {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(15, 23, 42, 0.36);
}

.fps-shoot-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-width: 84px;
  border: 1px solid rgba(248, 250, 252, 0.7);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  font-weight: 800;
  padding: 8px 16px;
  pointer-events: auto;
  touch-action: none;
}

.fps-shoot-btn:active,
.fps-shoot-btn.is-active {
  background: rgba(220, 38, 38, 0.95);
  transform: scale(0.96);
}

@keyframes fps-hit-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(1.06);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(0.92);
  }
}

@keyframes fps-toast-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  12% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
}

@keyframes fps-kill-fx-pop {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fps-kill-icon-pop {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.88);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
}

.fps-side-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.fps-panel-card {
  border: 1px solid rgba(52, 102, 151, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.83);
  padding: 12px;
}

.fps-panel-card h2 {
  margin: 0 0 10px;
  font-size: 1.04rem;
  color: #334155;
}

.fps-rank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fps-rank-head h2 {
  margin: 0;
}

.fps-rank-tabs {
  display: inline-flex;
  gap: 6px;
}

.fps-rank-tab {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.85);
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
}

.fps-rank-tab.is-active {
  color: #0f766e;
  background: rgba(204, 251, 241, 0.78);
  border-color: rgba(13, 148, 136, 0.48);
}

.fps-option-list {
  display: grid;
  gap: 8px;
}

.fps-team-join {
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(248, 250, 252, 0.7);
  padding: 8px 9px;
}

.fps-team-join-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
}

.fps-team-join-options {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fps-team-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  color: #334155;
  cursor: pointer;
}

.fps-team-option input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.fps-team-pick-status {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.4;
}

.fps-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 0.86rem;
}

.fps-option-item input {
  width: 16px;
  height: 16px;
}

.fps-player-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.fps-leaderboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.fps-leaderboard-item {
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.34);
  display: grid;
  gap: 3px;
}

.fps-leaderboard-item strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.fps-leaderboard-item span {
  color: #475569;
  font-size: 0.78rem;
}

.fps-leaderboard-item.is-me {
  border-color: rgba(13, 148, 136, 0.45);
  background: rgba(204, 251, 241, 0.56);
}

.fps-player-item {
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(241, 245, 249, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.34);
  display: grid;
  gap: 3px;
}

.fps-player-item strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.fps-player-item span {
  color: #475569;
  font-size: 0.78rem;
}

.fps-player-item.is-self {
  border-color: rgba(13, 148, 136, 0.5);
  background: rgba(204, 251, 241, 0.5);
}

.fps-check-list {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.55;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .fps-layout {
    grid-template-columns: 1fr;
  }

  .fps-user-card {
    grid-template-columns: 1fr;
  }

  .fps-stage,
  .fps-stage-wrap {
    min-height: 480px;
  }

  .fps-self-hud {
    min-width: 170px;
    padding: 7px 8px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .fps-touch-layer {
    display: block;
  }

  .fps-fullscreen-btn {
    display: block;
  }

  .fps-crosshair {
    opacity: 0.88;
  }

  .fps-hint {
    bottom: 150px;
    font-size: 0.8rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .fps-fullscreen-btn {
    display: none;
  }
}
