* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1a1612; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; color: #efe6d6; }
#view { display: block; width: 100%; height: 100%; cursor: none; }
#hud { pointer-events: none; position: fixed; inset: 0; }
#brand { position: absolute; top: 14px; left: 16px; font-size: 13px; letter-spacing: 2px; color: #f0d78c; opacity: 0.85; text-shadow: 0 1px 2px #000; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; }
#crosshair i { position: absolute; background: #f4efe4; box-shadow: 0 0 0 1px #1a1612; }
#crosshair i:nth-child(1) { left: 9px; top: 0; width: 2px; height: 6px; }
#crosshair i:nth-child(2) { left: 9px; bottom: 0; width: 2px; height: 6px; }
#crosshair i:nth-child(3) { left: 0; top: 9px; width: 6px; height: 2px; }
#crosshair i:nth-child(4) { right: 0; top: 9px; width: 6px; height: 2px; }
#crosshair.ads { opacity: 0; }
#hitmark { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #3dff6a; transform: rotate(45deg) scale(0.2); opacity: 0; }
#hitmark.show { opacity: 1; transform: rotate(45deg) scale(1); transition: none; }
#muzzle { position: absolute; left: 62%; bottom: 18%; width: 90px; height: 90px; margin: 0 0 0 -45px; background: radial-gradient(circle, #fff6c8 0%, #ffb347 28%, transparent 62%); opacity: 0; mix-blend-mode: screen; }
#muzzle.ads-hide { opacity: 0 !important; }
#scope {
  position: absolute; inset: 0;
  z-index: 5;
  background: #050505;
  opacity: 1;
}
#scope.hidden { display: none !important; }
#scope .scope-mask {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%,
      transparent 0%,
      transparent 31.5%,
      rgba(0,0,0,0.55) 32.2%,
      rgba(0,0,0,0.92) 33.5%,
      #000 38%,
      #000 100%);
}
#scope .scope-glass {
  position: absolute;
  left: 50%; top: 50%;
  width: min(72vmin, 720px);
  height: min(72vmin, 720px);
  margin: calc(min(72vmin, 720px) / -2) 0 0 calc(min(72vmin, 720px) / -2);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 10px #0a0a0a,
    inset 0 0 0 14px #2a2a2a,
    inset 0 0 0 18px #111,
    inset 0 0 60px rgba(20, 40, 30, 0.35),
    inset 0 0 120px rgba(0, 0, 0, 0.45),
    0 0 0 3px #1a1a1a;
  background:
    radial-gradient(circle at 38% 32%, rgba(180, 220, 200, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(40, 70, 55, 0.08) 0%, transparent 70%);
  overflow: hidden;
}
#scope .scope-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(90, 90, 90, 0.5);
  pointer-events: none;
}
#scope .reticle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; }
/* 红点 / 全息 */
#scope.reticle-dot .dot {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #ff2a2a;
  box-shadow: 0 0 6px #ff4444, 0 0 12px rgba(255, 40, 40, 0.8);
}
#scope.reticle-dot .holo-ring {
  position: absolute; left: 50%; top: 50%;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 1.5px solid rgba(255, 60, 60, 0.55);
  border-radius: 50%;
}
/* 2× 简易 duplex */
#scope.reticle-duplex .cross-v,
#scope.reticle-duplex .cross-h {
  position: absolute; left: 50%; top: 50%; background: #1a1a1a;
}
#scope.reticle-duplex .cross-v { width: 2px; height: 42%; margin: -21% 0 0 -1px; }
#scope.reticle-duplex .cross-h { width: 42%; height: 2px; margin: -1px 0 0 -21%; }
#scope.reticle-duplex .center-gap {
  position: absolute; left: 50%; top: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: transparent;
  box-shadow: 0 0 0 100px #000;
  clip-path: inset(0);
  display: none;
}
#scope.reticle-duplex .post {
  position: absolute; left: 50%; top: 50%;
  width: 3px; height: 22%; margin: 4px 0 0 -1.5px;
  background: #111;
}
/* 4× ACOG 风格 chevron */
#scope.reticle-acog .chev {
  position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; margin: -2px 0 0 -10px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 14px solid #c42828;
  filter: drop-shadow(0 0 2px #000);
}
#scope.reticle-acog .stadia {
  position: absolute; left: 50%; background: #222;
  width: 18px; height: 2px; margin-left: -9px;
}
#scope.reticle-acog .stadia:nth-child(2) { top: calc(50% + 18px); }
#scope.reticle-acog .stadia:nth-child(3) { top: calc(50% + 32px); width: 12px; margin-left: -6px; }
#scope.reticle-acog .stadia:nth-child(4) { top: calc(50% + 44px); width: 8px; margin-left: -4px; }
#scope.reticle-acog .vline {
  position: absolute; left: 50%; top: calc(50% + 12px);
  width: 2px; height: 40%; margin-left: -1px; background: #1a1a1a;
}
#scope .scope-dust {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 60% 70%, rgba(255,255,255,0.04) 0%, transparent 20%);
  opacity: 0.5; pointer-events: none;
}
#hp { position: absolute; left: 24px; bottom: 40px; width: 180px; height: 10px; background: #2a241c; border: 1px solid #6b5a42; }
#hp span { display: block; height: 100%; width: 100%; background: #d4a017; }
#armorBar { position: absolute; left: 24px; bottom: 28px; width: 180px; height: 6px; background: #2a241c; border: 1px solid #4a6b8a; }
#armorBar span { display: block; height: 100%; width: 100%; background: #5a9ec8; }
#ammo { position: absolute; right: 28px; bottom: 22px; font-size: 36px; font-weight: 700; letter-spacing: 1px; text-shadow: 0 2px 0 #1a1612; }
#ammo span { font-size: 16px; opacity: 0.7; margin-left: 6px; }
#optic { position: absolute; right: 28px; bottom: 64px; font-size: 12px; opacity: 0.75; }
#skillCd { position: absolute; left: 24px; bottom: 58px; font-size: 12px; opacity: 0.8; color: #b8d4ff; }
#obj { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 8px 16px; background: rgba(18, 14, 10, 0.55); border: 1px solid #6b5a42; font-size: 14px; }
#prompt { position: absolute; left: 50%; bottom: 88px; transform: translateX(-50%); font-size: 15px; color: #ffe08a; min-height: 1.2em; text-shadow: 0 1px 2px #000; }
#fps { position: absolute; top: 14px; right: 16px; font-size: 12px; opacity: 0.55; }
#loginGate, #home, #end {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  background: rgba(12, 10, 8, 0.88); text-align: center; gap: 10px; padding: 28px 16px 48px; overflow: auto;
  z-index: 20;
}
#loginGate h1, #home h1, #end h2 { font-size: clamp(28px, 5vw, 40px); letter-spacing: 4px; color: #f0d78c; }
.sub { opacity: 0.8; margin-bottom: 4px; max-width: 560px; line-height: 1.5; font-size: 13px; }
#home ul { list-style: none; opacity: 0.85; font-size: 13px; line-height: 1.75; max-width: 560px; }
.panel {
  pointer-events: auto; width: min(560px, 94vw); text-align: left;
  background: rgba(26, 22, 18, 0.92); border: 1px solid #6b5a42; padding: 12px 14px; border-radius: 4px;
  display: grid; gap: 8px;
}
.panel h3 { font-size: 14px; color: #f0d78c; letter-spacing: 1px; margin: 0; }
.panel label { display: grid; gap: 4px; font-size: 12px; opacity: 0.95; }
.panel input, .panel select, .panel textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #6b5a42; background: #2a241c; color: #efe6d6; font-size: 13px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.code-row .grow { flex: 1; min-width: 140px; }
.loadout { grid-template-columns: 1fr 1fr; }
.loadout label:last-child { grid-column: 1 / -1; }
.status { font-size: 12px !important; opacity: 0.75; margin: 0 !important; }
.home-top { width: min(560px, 94vw); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lang-switch { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.lang-switch select { width: auto; padding: 6px 8px; }
.download-row { margin-top: 4px; }
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; background: #c9a227; color: #1a1612; text-decoration: none;
  font-size: 14px; font-weight: 700; border: 0; min-width: 140px;
}
.dl-btn.disabled { opacity: 0.45; pointer-events: none; filter: grayscale(0.3); }
.dl-btn:not(.disabled):hover { filter: brightness(1.08); }
.dev-apps-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px;
}
.devapps-item {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  background: #2a241c; border: 1px solid #4a3f32; color: #efe6d6; text-decoration: none; font-size: 12px;
}
.devapps-item img, .devapps-fallback {
  width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
  background: #3a3228; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #f0d78c;
}
.modal {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); padding: 16px;
}
.modal-card {
  width: min(420px, 94vw); background: #1a1612; border: 1px solid #6b5a42; padding: 16px;
  display: grid; gap: 10px; text-align: left;
}
.modal-card h3 { color: #f0d78c; }
button {
  pointer-events: auto; margin-top: 4px; padding: 10px 22px; background: #c9a227; color: #1a1612;
  border: 0; font-size: 15px; font-weight: 700; cursor: pointer;
}
button.ghost { background: transparent; color: #f0d78c; border: 1px solid #c9a227; }
button:hover { filter: brightness(1.08); }
.hidden { display: none !important; }
@media (max-width: 640px) {
  .loadout { grid-template-columns: 1fr; }
  #loginGate h1, #home h1 { font-size: 28px; }
}
