*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f4f6f8;
  --panel: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --accent: #111111;
  --green: #40c057;
  --red: #fa5252;
  --t1: #1a1a1a;
  --t2: #666666;
  --t3: #999999;
  --blur: blur(24px);
  --r: 20px;
  --shadow: 0 12px 32px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.03);
  --topbar-h: 46px;
}
html, body { width:100%; height:100%; overflow:hidden; background:var(--bg);
  font-family:'Plus Jakarta Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color:var(--t1); -webkit-font-smoothing:antialiased; }
#map { position:fixed; inset:0; z-index:0; }

/* ── Top Bar ── */
.topbar {
  position:fixed; top:0; left:0; right:0; height:46px;
  background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none;
  border-bottom:none; border-radius:0;
  box-shadow:none; z-index:1000;
  display:flex; align-items:center; gap:6px; padding:0 14px;
}
.topbar-logo {
  display:flex; align-items:center; gap:7px;
  font-size:13px; font-weight:700; white-space:nowrap; margin-right:2px;
}
.logo-mark {
  width:24px; height:24px; border-radius:7px; flex-shrink:0;
  overflow:hidden;
}
.logo-mark img { width:100%; height:100%; object-fit:cover; }
.topbar-sep { width:1px; height:22px; background:var(--border); margin:0 2px; flex-shrink:0; }
.topbar-tools {
  display:flex; align-items:center; gap:6px; margin-left:auto; flex-shrink:0;
}
.map-tabs { display:flex; gap:2px; flex:1; overflow-x:auto; overflow-y:visible; scrollbar-width:none; }
.map-tabs::-webkit-scrollbar { display:none; }
.map-tab {
  padding:6px 14px; border-radius:12px; font-size:12px; font-weight:600;
  color:var(--t2); cursor:pointer; border:none; background:transparent;
  transition:all .2s cubic-bezier(0.2, 0.8, 0.2, 1); white-space:nowrap; font-family:inherit;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.map-tab:hover { color:var(--t1); background:rgba(0,0,0,0.04); }
.map-tab.active { color:#fff; background:var(--accent); box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.topbar-pill {
  display:flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:20px; cursor:pointer;
  background:var(--panel); border:1px solid var(--border);
  font-size:12px; font-weight:600; color:var(--t2);
  transition:all .2s cubic-bezier(0.2, 0.8, 0.2, 1); white-space:nowrap; font-family:inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  backdrop-filter: var(--blur);
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.topbar-pill:hover { background:#fff; color:var(--t1); transform:translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.topbar-pill.active { color:#fff; border-color:var(--accent); background:var(--accent); box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.conn-dot { width:6px; height:6px; border-radius:50%; background:#636366; transition:background .3s; flex-shrink:0; }
.conn-dot.ok  { background:var(--green); box-shadow:0 0 7px var(--green); }
.conn-dot.err { background:var(--red); }

/* ── Sidebar (Left Panel) ── */
.sidebar {
  position:fixed; top:calc(var(--topbar-h) + 10px); left:12px; width:230px;
  max-height: calc(100dvh - var(--topbar-h) - 20px);
  display:flex; flex-direction:column; gap:0;
  z-index:999; overflow-y:auto; overflow-x:hidden; scrollbar-width:none;
  touch-action:pan-y;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  transition:transform .4s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: none;
  padding: 4px 0;
  height: fit-content;
}
.sidebar::-webkit-scrollbar { display:none; }
.sidebar.collapsed { transform:translateX(calc(-100% - 16px)); }

.sidebar-backdrop {
  display:none; position:fixed; inset:0; z-index:998;
  background:rgba(0,0,0,0.35); touch-action:manipulation;
}
body.sidebar-open .sidebar-backdrop { display:block; }

.sidebar-toggle {
  position:fixed; top:calc(var(--topbar-h) + 10px); left:250px;
  width:32px; height:32px; border-radius: 16px;
  background:var(--panel);
  backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--border);
  cursor:pointer; z-index:1003;
  color:var(--t1); font-size:18px; font-family:inherit; font-weight:bold;
  display:flex; align-items:center; justify-content:center;
  transition:all .4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow);
  outline:none; user-select:none;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.sidebar-toggle:hover {
  background:#fff; color:var(--accent); transform:scale(1.05);
}
.sidebar-toggle.collapsed { left:16px; transform:rotate(180deg); }

/* ── Panel card ── */
.panel {
  background:transparent;
  border:none; border-radius:0;
  box-shadow:none; padding:0 10px; flex-shrink:0;
  position:relative; overflow:hidden;
}
.panel + .panel {
  border-top:1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
  margin-top: 2px;
}
.panel-title {
  font-size:12px; font-weight:700;
  letter-spacing:0; color:rgba(255, 255, 255, 0.92); margin-bottom:8px;
  display:flex; align-items:center; gap:6px;
}
.panel-title::before {
  content:''; width:4px; height:12px; border-radius:2px;
  background:#ffd700; flex-shrink:0;
}

/* Stats */
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.stat-row {
  display:flex; align-items:center; gap:6px;
  padding:5px 8px; border-radius:6px; background:rgba(255,255,255,0.05);
  transition:all .2s; border:1px solid rgba(255,255,255,0.1);
}
.stat-row:hover { background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.2); }
.stat-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.stat-val { font-size:14px; font-weight:800; letter-spacing:-0.3px; line-height:1; min-width:20px; font-variant-numeric: tabular-nums; color:rgba(255,255,255,0.92); }
.stat-lbl { font-size:10px; font-weight:600; color:rgba(255,255,255,0.5); white-space:nowrap; }

/* Layer rows */
.layer-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:6px; }
.layer-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 10px; cursor:pointer; border-radius:6px;
  border:1px solid rgba(255,255,255,0.1); background:transparent;
  box-shadow: none;
  transition:all .2s;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.layer-row:hover { background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.2); transform:translateY(-1px); }
.layer-row:active { transform:scale(0.98); }
.layer-lbl { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:rgba(255,255,255,0.92); }
.ldot { width:8px; height:8px; border-radius:50%; flex-shrink:0; box-shadow: 0 0 4px currentColor; }

/* 全新 iOS 开关 */
.ltog {
  width:36px; height:20px; border-radius:20px;
  background:rgba(255,255,255,0.2); position:relative; flex-shrink:0; transition:all .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.ltog::after {
  content:''; position:absolute; top:2px; left:2px;
  width:16px; height:16px; border-radius:50%;
  background:#fff; transition:all .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.ltog.on { background:var(--green); }
.ltog.on::after { transform: translateX(16px); }

/* Inputs and Sliders */
.scale-row {
  display:flex; align-items:center; gap:12px; margin-top:8px;
  padding:10px 12px; border-radius:6px;
  background:transparent; border:1px solid rgba(255,255,255,0.1);
  box-shadow: none;
  transition:all .2s;
}
.scale-row:hover { background:rgba(255,255,255,0.05); }
.cfg-lbl { font-size:13px; font-weight:700; color:rgba(255,255,255,0.92); width:32px; flex-shrink:0; }
.scale-slider {
  flex:1; -webkit-appearance:none; height:4px; background:rgba(255,255,255,0.2); border-radius:4px; outline:none; box-shadow:none;
}
.scale-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:16px; height:16px; background:#ffd700;
  border:2px solid #fff; border-radius:50%; cursor:pointer;
  box-shadow:0 2px 4px rgba(0,0,0,0.4); transition:transform 0.1s;
}
.scale-slider::-webkit-slider-thumb:hover { transform:scale(1.15); }

.scale-val, .scale-val-input {
  font-size:12px; font-weight:800; color:#ffd700; font-variant-numeric:tabular-nums;
  background:rgba(255,255,255,0.1); padding:4px 8px; border-radius:6px; min-width:40px; text-align:center;
  border:1px solid rgba(255,255,255,0.2); outline:none;
}
.scale-val-input:focus { border-color:#ffd700; background:rgba(255,255,255,0.2); color:#fff; }

select {
  width:100%; background:#f9fafb;
  border:1px solid var(--border); border-radius:12px;
  color:var(--t1); font-size:13px; font-weight:600;
  padding:8px 12px; outline:none; transition:all .2s;
  appearance:none; -webkit-appearance:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select:hover { border-color:#d1d5db; }
select:focus { border-color:var(--accent); background:#fff; box-shadow:0 0 0 2px rgba(17,17,17,0.1); }

.btn {
  background:var(--accent); color:#fff; border:none; padding:10px 16px; border-radius:12px;
  font-size:13px; font-weight:600; cursor:pointer; transition:all .2s;
  width:100%; margin-top:12px;
}
.btn:hover { background:#333; box-shadow:0 4px 12px rgba(0,0,0,0.1); transform:translateY(-1px); }
.hint { font-size:11px; color:var(--t2); margin-top:8px; text-align:center; font-weight:500; }

/* ── 顶部居中玩家计数条（嵌在topbar内，绝对居中） ── */
.player-counter {
  display: none;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  align-items: center; gap: 0;
  background: rgba(255,255,255,0.9); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 5px 16px;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.player-counter.show { display: flex; }
.pc-item {
  display: flex; align-items: center; gap: 7px; padding: 0 12px;
}
.pc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pc-val { font-size: 18px; font-weight: 800; color: var(--t1); font-variant-numeric: tabular-nums; letter-spacing: -0.5px; min-width: 20px; }
.pc-lbl { font-size: 12px; font-weight: 600; color: var(--t2); }
.pc-sep { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }

/* ── 底部浮动观战栏 ── */
.spectate-bar {
  display: none;
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 1001;
  align-items: center; gap: 10px;
  background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 8px 16px;
  box-shadow: var(--shadow);
}
.spectate-bar.show { display: flex; touch-action: manipulation; }
.spectate-label {
  font-size: 12px; font-weight: 700; color: var(--t2); white-space: nowrap;
}
.spectate-bar select {
  width: auto; min-width: 120px; max-width: 200px;
  background: #f3f4f6; border: 1px solid var(--border); border-radius: 20px;
  color: var(--t1); font-size: 13px; font-weight: 600;
  padding: 6px 28px 6px 12px; outline: none; transition: all .2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.spectate-bar select:focus { border-color: var(--accent); background-color: #fff; }
.spectate-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 6px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all .2s; white-space: nowrap; font-family: inherit;
}
.spectate-btn:hover { background: #333; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.spectate-btn.active { background: var(--green); }

/* 炫酷白色入场界面 */
.bg-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden; z-index: 9998;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  pointer-events: none;
}
.blob { position: absolute; filter: blur(90px); opacity: 0.6; animation: float 12s infinite ease-in-out alternate; }
.blob-1 { width: 500px; height: 500px; background: #d0ebff; top: -150px; left: -100px; border-radius: 50%; }
.blob-2 { width: 600px; height: 600px; background: #eebefa; bottom: -200px; right: -150px; border-radius: 50%; animation-delay: -4s; }
.blob-3 { width: 400px; height: 400px; background: #e3fafc; top: 30%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; animation-delay: -7s; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

.landing-overlay {
  position: fixed; inset: 0; background: transparent;
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; font-family: 'SF Pro Display', system-ui, sans-serif;
  perspective: 1000px;
}
.landing-card {
  position: relative; width: 420px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px; padding: 48px 40px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0,0,0,0.06) inset;
  text-align: center; transform-style: preserve-3d;
  animation: cardEnter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(50px) scale(0.95) rotateX(-5deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); }
}

.logo-box {
  width: 64px; height: 64px; margin: 0 auto 24px auto;
  background: #111; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  animation: pulseShadow 2s infinite alternate;
}
@keyframes pulseShadow {
  from { box-shadow: 0 12px 24px rgba(0,0,0,0.12), 0 0 0 0 rgba(17,17,17,0.15); }
  to { box-shadow: 0 12px 24px rgba(0,0,0,0.12), 0 0 0 12px rgba(17,17,17,0); }
}
.logo-box svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.landing-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; color: #111; letter-spacing: -0.5px; }
.landing-desc { font-size: 15px; color: #666; margin-bottom: 36px; line-height: 1.5; font-weight: 500; }

.input-wrap { position: relative; margin-bottom: 24px; }
.input-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: #adb5bd; transition: color 0.3s;
}
.landing-input {
  width: 100%; padding: 18px 18px 18px 48px;
  font-size: 16px; font-weight: 600; color: #111;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent; border-radius: 18px;
  outline: none; box-shadow: 0 2px 4px rgba(0,0,0,0.02) inset, 0 0 0 1px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center; letter-spacing: 1px;
}
.landing-input::placeholder { color: #adb5bd; font-weight: 500; letter-spacing: normal; }
.landing-input:focus { background: #fff; border-color: #111; box-shadow: 0 8px 16px rgba(0,0,0,0.06), 0 0 0 4px rgba(17,17,17,0.08); }
.landing-input:focus + .input-icon { color: #111; }

.landing-btn {
  width: 100%; padding: 18px;
  font-size: 16px; font-weight: 600; color: #fff;
  background: #111; border: none; border-radius: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative; overflow: hidden;
}
.landing-btn::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.landing-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(17,17,17,0.25); background: #222; }
.landing-btn:hover::before { left: 100%; }
.landing-btn:active { transform: translateY(1px); box-shadow: 0 6px 12px rgba(17,17,17,0.2); }
.btn-icon {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.3s ease; position: relative; z-index: 2;
}
.landing-btn:hover .btn-icon { transform: translateX(5px); }

.error-msg { color: #fa5252; font-size: 13px; font-weight: 500; height: 18px; transition: opacity 0.3s; margin-top: 12px; opacity: 0; }
.landing-hint {
  margin-top: 24px; font-size: 13px; color: #868e96; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.landing-hint::before {
  content: ''; display: block; width: 8px; height: 8px; background: #40c057;
  border-radius: 50%; box-shadow: 0 0 10px #40c057;
}

/* 语言切换 */
.lang-switch {
  position: fixed; top: 24px; right: 24px;
  display: flex; gap: 8px; background: rgba(255,255,255,0.8);
  padding: 6px; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  z-index: 10001;
}
.lang-btn {
  border: none; background: transparent; padding: 6px 12px; border-radius: 14px;
  font-size: 13px; font-weight: 600; color: #666; cursor: pointer; transition: all 0.3s;
}
.lang-btn.active { background: #111; color: #fff; }

/* 动画转场 */
.card-exit { animation: cardExit 0.7s cubic-bezier(0.8, 0, 0.2, 1) forwards; }
@keyframes cardExit {
  0% { transform: scale(1); opacity: 1; filter: blur(0px); }
  30% { transform: scale(1.05); opacity: 1; filter: blur(0px); }
  100% { transform: scale(0.5) translateY(-50px); opacity: 0; filter: blur(20px); visibility: hidden; }
}

.btn-loading { pointer-events: none; color: transparent !important; }
.btn-loading .btn-icon { display: none; }
.btn-loading::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px;
  margin: -11px 0 0 -11px; border: 3px solid rgba(255,255,255,0.2); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.transition-circle {
  position: fixed; top: 50%; left: 50%; width: 2px; height: 2px;
  background: #fff; border-radius: 50%; transform: translate(-50%, -50%) scale(0);
  z-index: 10002; pointer-events: none; opacity: 0;
}
.circle-expand { animation: circleExpand 1.5s cubic-bezier(0.7, 0, 0.1, 1) forwards; }
@keyframes circleExpand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  40% { transform: translate(-50%, -50%) scale(3000); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(3000); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(3000); opacity: 0; display: none; }
}

/* Toast */
#toast {
  position:fixed; bottom:20px; left:50%; transform:translateX(-50%) translateY(16px);
  background:rgba(28,28,42,0.96); backdrop-filter:blur(24px);
  border:1px solid var(--border); border-radius:20px;
  padding:9px 20px; font-size:12px; font-weight:500; color:var(--t1);
  opacity:0; transition:all .22s ease; pointer-events:none; z-index:9999;
  box-shadow:var(--shadow);
}
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* 玩家详细信息面板 */
.player-panel {
  display: none;
  position: fixed; top: 60px; right: 16px; z-index: 1002;
  width: 280px; background: rgba(20,20,30,0.95);
  backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden; animation: panelIn 0.3s ease-out;
}
@keyframes panelIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
.player-panel.show { display: block; }
.pp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pp-name { font-size: 14px; font-weight: 700; color: #fff; }
.pp-close {
  width: 24px; height: 24px; border: none; border-radius: 8px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 12px;
  cursor: pointer; transition: all 0.2s;
}
.pp-close:hover { background: rgba(255,255,255,0.2); }
.pp-content { padding: 12px 16px; }
.pp-section { margin-bottom: 14px; }
.pp-section:last-child { margin-bottom: 0; }
.pp-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
}
.pp-label { font-size: 12px; color: rgba(255,255,255,0.5); }
.pp-value { font-size: 13px; font-weight: 600; color: #fff; }
.pp-bar-wrap {
  display: flex; align-items: center; gap: 8px;
  width: 140px; height: 16px;
}
.pp-bar {
  flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.pp-bar::after {
  content: ''; position: absolute; left: 0; top: 0; height: 100%;
  background: #30D158; border-radius: 3px;
}
.pp-bar.hp::after { background: linear-gradient(90deg, #30D158, #FF9F0A, #FF453A); }
.pp-bar.head::after { background: #0A84FF; }
.pp-bar.armor::after { background: #FFD60A; }
.pp-bar-text { font-size: 11px; color: rgba(255,255,255,0.7); min-width: 50px; text-align: right; }

/* 物品搜索面板 */
.search-panel {
  display: none;
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 1002;
  width: 400px; max-width: calc(100% - 32px);
  background: rgba(20,20,30,0.95); backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}
.search-panel.show { display: block; }
.sp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sp-input {
  flex: 1; height: 32px; padding: 0 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #fff; font-size: 13px; outline: none;
}
.sp-input::placeholder { color: rgba(255,255,255,0.3); }
.sp-close {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 14px;
  cursor: pointer; transition: all 0.2s;
}
.sp-close:hover { background: rgba(255,255,255,0.2); }
.sp-results {
  max-height: 200px; overflow-y: auto;
  padding: 8px 0;
}
.sp-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; cursor: pointer;
  transition: background 0.15s;
}
.sp-result-item:hover { background: rgba(255,255,255,0.05); }
.sp-result-color {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.sp-result-name { font-size: 13px; color: #fff; flex: 1; }
.sp-result-dist { font-size: 12px; color: rgba(255,255,255,0.5); }

/* 地图标记面板 */
.marker-panel {
  display: none;
  position: fixed; bottom: 60px; right: 16px; z-index: 1002;
  width: 260px; background: rgba(20,20,30,0.95);
  backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}
.marker-panel.show { display: block; }
.mp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mp-title { font-size: 13px; font-weight: 700; color: #fff; }
.mp-close {
  width: 24px; height: 24px; border: none; border-radius: 8px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 12px;
  cursor: pointer; transition: all 0.2s;
}
.mp-close:hover { background: rgba(255,255,255,0.2); }
.mp-content { padding: 12px; }
.mp-color-row { margin-bottom: 12px; }
.mp-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 8px; display: block; }
.mp-colors { display: flex; gap: 8px; }
.mp-color-btn {
  width: 28px; height: 28px; border: 2px solid transparent; border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.mp-color-btn:hover { transform: scale(1.1); }
.mp-color-btn.active { border-color: #fff; transform: scale(1.1); }
.mp-input-row { margin-bottom: 12px; }
.mp-input {
  width: 100%; height: 32px; padding: 0 10px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #fff; font-size: 12px; outline: none;
}
.mp-input::placeholder { color: rgba(255,255,255,0.3); }
.mp-add-btn {
  width: 100%; height: 36px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #0A84FF, #0066d6);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; margin-bottom: 12px;
}
.mp-add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,132,255,0.4); }
.mp-list {
  max-height: 150px; overflow-y: auto;
}
.mp-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; margin-bottom: 4px;
  background: rgba(255,255,255,0.05); border-radius: 8px;
}
.mp-list-color { width: 10px; height: 10px; border-radius: 50%; }
.mp-list-name { font-size: 12px; color: #fff; flex: 1; margin-left: 8px; }
.mp-list-remove {
  width: 20px; height: 20px; border: none; border-radius: 4px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 10px;
  cursor: pointer;
}

/* 玩家列表面板 */
.player-list-panel {
  display: none;
  position: fixed; top: 60px; right: 16px; z-index: 1002;
  box-sizing: border-box;
  width: 260px;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 120px);
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.player-list-panel.dragging {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}
.player-list-panel.resizing {
  user-select: none;
}
.pl-width-bar {
  position: relative;
  z-index: 2;
  height: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  touch-action: none;
  flex-shrink: 0;
}
.pl-width-bar:hover { background: rgba(255, 255, 255, 0.08); }
.pl-width-grip {
  width: 40px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.pl-width-bar:hover .pl-width-grip { background: rgba(255, 255, 255, 0.5); }
.pl-scale-wrap {
  transform-origin: top right;
}
.player-list-panel.show { display: block; }
.pl-header {
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
  padding: 14px 16px; background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  cursor: grab;
  user-select: none;
  gap: 8px;
  flex-wrap: nowrap;
}
.pl-drag-handle {
  position: absolute; inset: 0;
  z-index: 0;
  cursor: grab;
  touch-action: none;
}
.pl-header > :not(.pl-drag-handle) {
  position: relative;
  z-index: 1;
}
.pl-header .pl-close { z-index: 2; }
.pl-header:active { cursor: grabbing; }
.pl-header.dragging { cursor: grabbing; }
.pl-header label {
  margin-left: auto !important;
  margin-right: 4px !important;
  flex-shrink: 1;
  min-width: 0;
}
.pl-title { font-size: 14px; font-weight: 800; color: rgba(255, 255, 255, 0.92); }
.pl-close {
  position: relative; z-index: 5; flex-shrink: 0;
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  border: none; border-radius: 8px;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 14px; font-weight: bold;
  cursor: pointer; transition: all 0.2s;
  box-shadow: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pl-close:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.pl-header .pl-close { cursor: pointer; }
.pl-content {
  max-height: calc(100vh - 180px); overflow-y: auto;
  padding: 10px;
}
.pl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 6px;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer; transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pl-item:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.pl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pl-dot.team { background: #30D158; }
.pl-dot.enemy { background: #FF453A; }
.pl-dot.ai { background: #636366; }
.pl-dot.downed { background: #FF9F0A; }
.pl-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35); box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
}
.pl-name { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.92); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-dist { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.5); }

/* 搜索高亮效果 */
.search-highlight {
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

/* Slider */
.scale-row { display:flex; align-items:center; gap:8px; margin-top:8px; }
.scale-row .cfg-lbl { width:auto; }
.scale-slider {
  flex:1; -webkit-appearance:none; appearance:none; height:4px;
  background:rgba(255,255,255,0.12); border-radius:2px; outline:none;
}
.scale-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:14px; height:14px; border-radius:50%;
  background:var(--accent); cursor:pointer; border:2px solid rgba(255,255,255,0.3);
}
.scale-val { font-size:11px; color:var(--t2); min-width:28px; text-align:right; }
.scale-val-input {
  width:42px !important; min-width:42px; max-width:42px; padding:2px 4px !important;
  font-size:11px; text-align:center; color:var(--t2);
  background:rgba(255,255,255,0.06); border:1px solid transparent !important;
  border-radius:5px; outline:none; transition:border-color .15s;
}
.scale-val-input:hover { border-color:var(--border) !important; }
.scale-val-input:focus { border-color:rgba(10,132,255,0.5) !important; color:var(--t1); background:rgba(255,255,255,0.10); }

/* Box config dropdown */
.box-cfg-btn {
  font-size:12px; cursor:pointer; color:var(--t2); padding:0 4px;
  border-radius:4px; transition:color .15s, background .15s; line-height:1; user-select:none;
}
.box-cfg-btn:hover { color:var(--t1); background:rgba(255,255,255,0.08); }
.box-cfg-pop {
  display:none; position:absolute; top:100%; left:0; right:0; z-index:100;
  background:rgba(20,20,34,0.97); backdrop-filter:blur(16px);
  border:1px solid var(--border); border-radius:8px;
  padding:6px 8px; margin-top:2px;
}
.box-cfg-pop.open { display:block; }
.box-chk-row {
  display:flex; align-items:center; gap:6px; padding:4px 2px;
  font-size:11px; font-weight:500; cursor:pointer; border-radius:4px;
}
.box-chk-row:hover { background:rgba(255,255,255,0.06); }
.box-chk-row input[type=checkbox] {
  accent-color:var(--accent); width:14px; height:14px; cursor:pointer;
}

/* Leaflet overrides */
.leaflet-container { background:#0a0a16; }
.leaflet-control-zoom { display:none; }

/* Region labels on map */
.map-region-name {
  overflow:visible !important; background:none !important; border:none !important;
  pointer-events:none !important;
}
.map-region-name span {
  display:inline-block; transform:translate(-50%,-50%);
  white-space:nowrap; font-size:12px; font-weight:600;
  color:rgba(255,255,255,0.82); font-family:-apple-system,'SF Pro Display',sans-serif;
  text-shadow:0 1px 4px rgba(0,0,0,0.95),0 0 8px rgba(0,0,0,0.8);
  letter-spacing:0.3px; pointer-events:none;
}

/* ── Landing Page ── */
.landing-overlay {
  position:fixed; inset:0; z-index:9999;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 50% 40%, #0f1528 0%, #080810 70%);
  transition:opacity .4s, visibility .4s;
}
.landing-overlay.hidden { opacity:0; visibility:hidden; pointer-events:none; }
.landing-card {
  display:flex; flex-direction:column; align-items:center;
  padding:48px 44px 40px; border-radius:24px;
  background:rgba(16,16,30,0.85);
  backdrop-filter:blur(40px) saturate(180%); -webkit-backdrop-filter:blur(40px) saturate(180%);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  min-width:340px; max-width:400px;
  animation:landingIn .6s ease-out;
}
@keyframes landingIn {
  from { opacity:0; transform:translateY(24px) scale(0.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.landing-icon {
  width:64px; height:64px; border-radius:18px; overflow:hidden;
  box-shadow:0 4px 20px rgba(10,132,255,0.3);
  margin-bottom:20px;
}
.landing-icon img { width:100%; height:100%; object-fit:cover; }
.landing-title {
  font-size:22px; font-weight:700; color:#fff;
  letter-spacing:1px; margin:0 0 6px;
}
.landing-desc {
  font-size:13px; color:rgba(255,255,255,0.45); margin:0 0 28px;
}
.landing-input-wrap {
  display:flex; gap:8px; width:100%;
}
.landing-input {
  flex:1; height:44px; border-radius:12px; border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06); color:#fff; padding:0 16px;
  font-size:15px; font-family:inherit; outline:none;
  transition:border-color .2s, box-shadow .2s;
}
.landing-input::placeholder { color:rgba(255,255,255,0.25); }
.landing-input:focus {
  border-color:rgba(10,132,255,0.6);
  box-shadow:0 0 0 3px rgba(10,132,255,0.15);
}
.landing-btn {
  height:44px; padding:0 24px; border-radius:12px; border:none;
  background:linear-gradient(135deg, #0A84FF, #0066d6);
  color:#fff; font-size:15px; font-weight:600; cursor:pointer;
  font-family:inherit; transition:transform .15s, box-shadow .15s;
}
.landing-btn:hover { transform:translateY(-1px); box-shadow:0 4px 16px rgba(10,132,255,0.4); }
.landing-btn:active { transform:translateY(0); }
.landing-hint {
  font-size:11px; color:rgba(255,255,255,0.22); margin:16px 0 0;
}

/* 平板 / 手机：侧栏抽屉模式（含 iPad） */
@media (max-width: 1024px) {
  .topbar-pill--desktop,
  .topbar-sep--desktop { display: none !important; }

  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "counter counter"
      "tabs tools";
    align-items: center;
    height: auto;
    min-height: 40px;
    padding: 6px 8px;
    gap: 6px;
    row-gap: 4px;
  }
  .player-counter {
    grid-area: counter;
    position: static;
    left: auto;
    top: auto;
    transform: none;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    pointer-events: none;
  }
  .player-counter:not(.show) { display: none; }
  .map-tabs {
    grid-area: tabs;
    flex: none;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }
  .topbar-tools {
    grid-area: tools;
    margin-left: 0;
    gap: 4px;
    z-index: 2;
  }
  .map-tab { padding: 5px 10px; font-size: 11px; }
  .topbar-pill { padding: 6px 10px; font-size: 11px; min-height: 36px; }

  .player-counter.show { padding: 4px 10px; }
  .pc-val { font-size: 14px; }
  .pc-lbl { font-size: 10px; }
  .pc-item { padding: 0 6px; }

  .sidebar {
    top: 0;
    left: 0;
    width: min(280px, 85vw);
    height: 100dvh;
    max-height: 100dvh;
    padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: 0;
    z-index: 1002;
    touch-action: pan-y;
    overscroll-behavior: contain;
    transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar.collapsed { transform: translateX(-105%); }
  .sidebar:not(.collapsed) {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }

  body.sidebar-open .sidebar-backdrop { display: block; }

  .sidebar-toggle {
    top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 4px);
    left: 16px;
    z-index: 1005;
    width: 40px;
    height: 40px;
  }
  .sidebar-toggle.collapsed { left: 16px; transform: rotate(180deg); }
  body.sidebar-open .sidebar-toggle {
    left: min(292px, calc(85vw + 12px));
    transform: rotate(0deg);
  }

  .player-list-panel { right: 8px; top: calc(var(--topbar-h) + 42px); z-index: 1002; max-width: calc(100vw - 16px); }
  .player-list-panel .pl-content { max-height: calc(100dvh - var(--topbar-h) - 160px); }
  .high-loot-panel { right: 8px; width: 180px; }
  .team-panel { right: 8px; width: 160px; }

  .search-panel { width: calc(100% - 16px); top: calc(var(--topbar-h) + 42px); }
  .float-stats { top: calc(var(--topbar-h) + 42px); }
  .spectate-bar { bottom: 12px; padding: 6px 12px; }
}

/* 移动端竖屏：进一步压缩 */
@media (max-width: 768px) {
  .topbar { padding: 4px 6px; gap: 4px; min-height: 36px; }
  .map-tab { padding: 4px 8px; font-size: 10px; border-radius: 8px; }
  .topbar-pill { padding: 5px 8px; font-size: 10px; border-radius: 12px; min-height: 34px; }

  .player-list-panel { right: 4px; top: 80px; max-width: calc(100vw - 12px); }
  .high-loot-panel { right:4px; width:160px; }
  .team-panel { right:4px; width:140px; }

  /* 入口卡片自适应 */
  .landing-card { width:90vw !important; min-width:280px !important; padding:32px 24px !important; }
  .landing-title { font-size:22px !important; }
  .landing-desc { font-size:13px !important; }
  .landing-input { font-size:14px !important; padding:14px 14px 14px 42px !important; }
  .landing-btn { padding:14px !important; font-size:14px !important; }
}

/* 全屏模式：确保所有内容铺满屏幕 */
:fullscreen, :-webkit-full-screen {
  background:var(--bg);
  width:100vw !important; height:100vh !important;
  overflow:hidden;
}
::backdrop, ::-webkit-backdrop { background:var(--bg); }
:fullscreen #map, :-webkit-full-screen #map {
  position:fixed !important; inset:0 !important;
  width:100vw !important; height:100vh !important;
}
.high-loot-cfg {
  margin-top:11px; padding-top:10px;
  border-top:1px solid rgba(255,255,255,0.07);
}
.high-loot-switch {
  display:flex; align-items:center; gap:7px;
  font-size:11px; font-weight:700; color:rgba(255,255,255,0.72);
  cursor:pointer; user-select:none;
}
.high-loot-switch input,
.high-loot-actions input {
  accent-color:var(--accent); width:14px; height:14px;
}
.high-loot-actions {
  display:flex; justify-content:flex-end; align-items:center;
  gap:7px; margin-top:7px;
}
.high-loot-actions .box-chk-row {
  padding:0; color:var(--t2); white-space:nowrap;
}
.mini-btn {
  height:25px; padding:0 8px; border-radius:7px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.62);
  font-size:10px; font-weight:700; font-family:inherit;
  cursor:pointer;
}
.mini-btn:hover { background:rgba(255,255,255,0.12); color:#fff; }

/* Scheme G: compact high-value loot rail */
.high-loot-panel {
  --loot-bg-alpha:0;
  --loot-scale:1;
  position:fixed; right:42px; top:38%;
  width:236px; max-width:calc(100vw - 28px);
  z-index:997;
  display:none;
  transform:translateY(-50%) scale(var(--loot-scale));
  transform-origin:right center;
  color:#fff;
  user-select:none;
  cursor:default;
  touch-action:manipulation;
}
.high-loot-panel.show { display:block; }
.high-loot-panel.dragging { cursor:grabbing; }
.high-loot-shell {
  position:relative;
  overflow:hidden;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(0, 0, 0, 0.35) !important;
  box-shadow:none;
  backdrop-filter:blur(8px) saturate(130%);
  -webkit-backdrop-filter:blur(8px) saturate(130%);
}
.high-loot-shell::before {
  display:none;
}
.high-loot-head {
  position:relative;
  display:flex; align-items:center; justify-content:space-between;
  height:30px; padding:0 9px;
  background:transparent;
  border-bottom:1px solid rgba(255,255,255,0.12);
  cursor:grab;
  touch-action:none;
}
.high-loot-title {
  font-size:10px; font-weight:900; letter-spacing:1.4px;
  color:rgba(255,255,255,0.92);
}
.high-loot-count {
  font-size:9px; font-weight:800; color:rgba(255,255,255,0.82);
}
.high-loot-list {
  position:relative;
  padding:5px;
  display:flex; flex-direction:column; gap:3px;
}
.high-loot-row {
  min-height:34px;
  display:grid; grid-template-columns:23px 30px minmax(0,1fr) 45px;
  align-items:center; gap:5px;
  padding:4px 6px 4px 4px;
  border-radius:6px;
  background:transparent;
  border:1px solid rgba(255,255,255,0.10);
  touch-action:manipulation;
  cursor:pointer;
}
.high-loot-row:nth-child(1) {
  background:transparent;
  border-color:rgba(255,255,255,0.18);
}
.high-loot-rank {
  font-size:10px; font-weight:900;
  color:rgba(255,255,255,0.38);
  text-align:center;
}
.high-loot-row:nth-child(1) .high-loot-rank { color:rgba(255,255,255,0.78); }
.high-loot-icon {
  width:28px; height:28px; border-radius:6px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,0.10);
  border:1px solid rgba(255,255,255,0.10);
  overflow:hidden; flex-shrink:0;
}
.high-loot-icon img {
  width:25px; height:25px; object-fit:contain;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}
.high-loot-icon-fallback {
  width:16px; height:16px; border-radius:50%;
  display:block;
  box-shadow:none;
  border:1px solid rgba(255,255,255,0.22);
  opacity:.92;
}
.high-loot-main { min-width:0; }
.high-loot-name {
  font-size:11px; line-height:1.15; font-weight:800;
  color:rgba(255,255,255,0.92);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.high-loot-meta {
  margin-top:2px;
  font-size:9px; line-height:1.1;
  color:rgba(255,255,255,0.46);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.high-loot-value {
  font-size:11px; font-weight:900;
  color:rgba(255,255,255,0.92); text-align:right;
  text-shadow:0 1px 5px rgba(0,0,0,0.8);
  white-space:nowrap;
}
.high-loot-empty {
  position:relative;
  padding:16px 10px 18px;
  text-align:center;
  font-size:11px; font-weight:700;
  color:rgba(255,255,255,0.40);
}
.high-loot-quality-wrap {
  position:relative;
}
.high-loot-quality-btn {
  width:100%;
  justify-content:space-between;
}
.high-loot-quality-btn span {
  margin-left:auto;
  color:rgba(255,255,255,0.52);
  font-size:10px;
}
.high-loot-quality-pop {
  left:0;
  right:0;
  z-index:140;
}
.team-panel {
  --team-panel-bg-alpha:0;
  --team-panel-scale:1;
  position:fixed; right:42px; top:58%;
  width:200px; max-width:calc(100vw - 28px);
  max-height:70vh;
  z-index:996;
  display:none;
  transform:translateY(-50%) scale(var(--team-panel-scale));
  transform-origin:right center;
  color:#fff;
  user-select:none;
  cursor:default;
  touch-action:auto;
}
.team-panel.show { display:block; }
.team-panel.dragging { cursor:grabbing; }
.team-panel-shell {
  overflow:hidden;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(0, 0, 0, 0.35) !important;
  box-shadow:none;
  backdrop-filter:blur(8px) saturate(130%);
  -webkit-backdrop-filter:blur(8px) saturate(130%);
}
.team-panel-head {
  display:flex; align-items:center; justify-content:space-between;
  height:30px; padding:0 7px 0 9px;
  border-bottom:1px solid rgba(255,255,255,0.12);
  cursor:grab;
  touch-action:none;
  gap:6px;
}
.team-panel-title {
  font-size:10px; font-weight:900; letter-spacing:1.4px;
  color:rgba(255,255,255,0.92);
  margin-right:auto;
}
.team-panel-count {
  font-size:9px; font-weight:800; color:rgba(255,255,255,0.82);
}
.team-panel-filter {
  height:20px;
  padding:0 6px;
  border-radius:5px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.62);
  font-size:9px;
  font-weight:900;
  cursor:pointer;
}
.team-panel-filter.active {
  color:#fff;
  border-color:rgba(48,209,88,0.56);
  background:rgba(48,209,88,0.18);
}
.team-panel-list {
  max-height:calc(70vh - 31px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
  padding:5px;
  display:flex; flex-direction:column; gap:4px;
  scrollbar-width:none;
}
.team-panel-list::-webkit-scrollbar { display:none; }
.team-card-compact {
  --team-color:#fff;
  position:relative;
  min-height:82px;
  border-radius:7px;
  border:1px solid rgba(255,255,255,0.10);
  background:transparent;
  overflow:hidden;
  cursor:default;
}
.team-card-compact::before {
  content:"";
  position:absolute; left:0; top:0; bottom:0; width:3px;
  background:var(--team-color);
}
.team-card-top {
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 8px 1px 10px;
}
.team-card-id {
  font-size:11px; font-weight:900; color:var(--team-color);
}
.team-card-state {
  font-size:10px; font-weight:800; color:var(--team-color);
}
.team-avatar-strip {
  display:flex; gap:7px; padding:4px 8px 6px 10px;
  align-items:flex-start;
  flex-wrap:wrap;
  max-height:68px;
  overflow:hidden;
}
.team-avatar-unit {
  width:38px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:2px;
  flex:0 0 auto;
}
.team-avatar-info {
  width:56px;
  margin-left:0;
  text-align:center;
  white-space:nowrap;
  transform-origin:center top;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.team-avatar-gear {
  font-size:11px;
  line-height:1.1;
  font-weight:900;
  text-shadow:0 1px 4px rgba(0,0,0,0.9);
}
.team-avatar-weapon {
  margin-top:1px;
  font-size:11px;
  line-height:1.1;
  font-weight:800;
  color:rgba(255,255,255,0.66);
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:56px;
  text-align:center;
}
.team-mini-avatar {
  position:relative;
  width:24px; height:24px; border-radius:50%;
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.08);
}
.team-mini-avatar img {
  width:100%; height:100%; border-radius:50%; object-fit:cover;
  display:block;
}
.team-mini-avatar::after {
  content:"";
  position:absolute; inset:-3px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,0.14);
}
.team-mini-avatar .hp-arc {
  position:absolute; inset:-3px; border-radius:50%;
  background:conic-gradient(from -90deg, var(--team-color) calc(var(--hp, 100) * 1%), rgba(255,255,255,0.14) 0);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
.team-mini-avatar.down {
  background:rgba(80,80,72,0.92);
  border-color:var(--team-color);
}
.team-mini-avatar.dead {
  background:rgba(72,74,82,0.95);
  border-color:rgba(160,165,176,0.58);
}
.team-mini-avatar.unknown {
  background:rgba(72,74,82,0.72);
  border-color:rgba(180,185,196,0.44);
}
.team-mini-avatar.down img { opacity:.32; }
.team-mini-avatar.dead img {
  opacity:.62;
  filter:grayscale(1) brightness(.62);
}
.team-mini-avatar.unknown img {
  opacity:.82;
  filter:grayscale(.75) brightness(.78);
}
.team-mini-avatar .state-word {
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:900;
  z-index:2; text-shadow:0 1px 5px rgba(0,0,0,0.9);
}
.team-mini-avatar.down .state-word { color:#ffd60a; }
.team-mini-avatar.dead .state-word { color:#ff453a; }
.team-panel-empty {
  padding:18px 10px;
  text-align:center;
  font-size:11px; font-weight:700;
  color:rgba(255,255,255,0.40);
}

