/* ========================================================================== CS · 枪火对决 —— 深色科技风 UI ========================================================================== */ :root { --bg: #060a10; --bg2: #0a1119; --panel: rgba(10, 17, 25, 0.92); --panel-solid: #0b131c; --line: rgba(96, 141, 176, 0.2); --line-bright: rgba(86, 202, 237, 0.45); --txt: #e2ecf6; --dim: #7b91a6; --dim2: #4f6579; --cyan: #38e1ff; --cyan-deep: #1497ba; --orange: #ff8a3d; --red: #ff4a5c; --green: #46e08a; --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif; } * { box-sizing: border-box; } html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; } body { user-select: none; } #gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #121a24; cursor: crosshair; } #vm { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; } [hidden] { display: none !important; } /* ------------------------------- 通用控件 ------------------------------- */ .btn { appearance: none; border: 1px solid var(--line); background: rgba(19, 30, 42, 0.72); color: var(--txt); font-family: inherit; font-size: 14px; padding: 11px 18px; border-radius: 9px; cursor: pointer; transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease; display: inline-flex; align-items: center; justify-content: center; gap: 10px; line-height: 1.2; } .btn:hover { border-color: var(--line-bright); background: rgba(26, 43, 59, 0.9); } .btn:active { transform: translateY(1px); } .btn.primary { border-color: rgba(56, 225, 255, 0.55); background: linear-gradient(180deg, rgba(28, 118, 148, 0.55), rgba(12, 62, 82, 0.75)); box-shadow: 0 0 0 1px rgba(56, 225, 255, 0.08), 0 8px 30px -12px rgba(56, 225, 255, 0.6); color: #eafcff; font-weight: 600; } .btn.primary:hover { border-color: var(--cyan); background: linear-gradient(180deg, rgba(34, 146, 182, 0.7), rgba(14, 76, 100, 0.85)); } .btn.ghost { background: rgba(255, 255, 255, 0.02); } .btn.block { width: 100%; } .btn.big { padding: 15px 20px; font-size: 16px; letter-spacing: 0.04em; } .btn.sm { padding: 7px 12px; font-size: 12.5px; } .btn.tiny { padding: 5px 10px; font-size: 12px; border-radius: 6px; } .btn kbd { font-family: var(--mono); font-size: 10.5px; color: var(--cyan); border: 1px solid rgba(56, 225, 255, 0.3); border-radius: 4px; padding: 2px 5px; opacity: 0.8; } .slider { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--dim); margin-top: 14px; } .slider span b { color: var(--cyan); font-family: var(--mono); font-weight: 600; } input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--cyan-deep), rgba(255, 255, 255, 0.08)); outline: none; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #d8f7ff; border: 2px solid var(--cyan); box-shadow: 0 0 10px rgba(56, 225, 255, 0.7); cursor: pointer; } /* --------------------------------- 大厅 --------------------------------- */ #lobby { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% 0%, rgba(16, 32, 46, 0.9) 0%, rgba(7, 12, 18, 0.93) 55%, rgba(4, 7, 10, 0.96) 100%); z-index: 20; overflow: auto; padding: 24px 18px; } .bg-grid { position: absolute; inset: -20%; background-image: linear-gradient(rgba(86, 180, 210, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(86, 180, 210, 0.055) 1px, transparent 1px); background-size: 46px 46px; transform: perspective(560px) rotateX(58deg) translateY(6%); mask-image: radial-gradient(ellipse at 50% 38%, #000 0%, transparent 72%); pointer-events: none; } .lobby-wrap { position: relative; width: min(520px, 100%); margin: auto; } .brand { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; } .logo { width: 54px; height: 54px; flex: none; color: var(--cyan); border-radius: 14px; border: 1px solid rgba(56, 225, 255, 0.28); background: radial-gradient(circle at 30% 20%, rgba(56, 225, 255, 0.18), transparent 65%), rgba(9, 20, 28, 0.9); display: grid; place-items: center; box-shadow: 0 0 34px -8px rgba(56, 225, 255, 0.5); } .logo svg { width: 32px; height: 32px; } .brand-text h1 { margin: 0; font-size: 24px; letter-spacing: 0.02em; } .brand-text p { margin: 4px 0 0; color: var(--dim); font-size: 12.5px; letter-spacing: 0.05em; } .lobby-card { background: linear-gradient(180deg, rgba(15, 24, 34, 0.96), rgba(9, 15, 22, 0.96)); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 28px 70px -30px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04); backdrop-filter: blur(6px); } .map-strip { display: flex; align-items: baseline; gap: 10px; padding-bottom: 15px; margin-bottom: 17px; border-bottom: 1px dashed rgba(96, 141, 176, 0.22); font-size: 12px; } .map-label { color: var(--dim2); letter-spacing: 0.16em; } .map-name { font-size: 16px; font-weight: 600; color: #cfeaf6; } .map-meta { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 11px; } .lobby-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; } .lobby-row .btn { flex-direction: column; gap: 3px; padding: 12px 10px; } .lobby-row .btn small { color: var(--dim); font-size: 11px; } .or { display: flex; align-items: center; gap: 12px; color: var(--dim2); font-size: 11.5px; letter-spacing: 0.08em; margin: 18px 0 12px; } .or::before, .or::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line), transparent); } .join-row { display: flex; gap: 9px; } .code-input { flex: 1; min-width: 0; background: rgba(4, 9, 14, 0.85); border: 1px solid var(--line); border-radius: 9px; color: #dff6ff; font-family: var(--mono); font-size: 20px; letter-spacing: 0.42em; text-align: center; padding: 10px 4px 10px 14px; text-transform: uppercase; outline: none; transition: border-color 0.16s ease, box-shadow 0.16s ease; } .code-input::placeholder { color: var(--dim2); letter-spacing: 0.2em; font-size: 14px; } .code-input:focus { border-color: var(--line-bright); box-shadow: 0 0 0 3px rgba(56, 225, 255, 0.08); } .tips { margin: 20px 0 0; padding: 14px 16px; list-style: none; border-radius: 10px; background: rgba(56, 225, 255, 0.035); border: 1px solid rgba(56, 225, 255, 0.09); font-size: 12px; color: var(--dim); line-height: 1.85; } .tips b { color: #b6dced; font-family: var(--mono); font-size: 11px; border: 1px solid rgba(96, 141, 176, 0.28); border-radius: 3px; padding: 1px 4px; background: rgba(255, 255, 255, 0.03); } .net-row { display: flex; align-items: center; gap: 8px; margin-top: 15px; font-size: 11.5px; color: var(--dim); font-family: var(--mono); } .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim2); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03); } .dot.on { background: var(--green); box-shadow: 0 0 9px var(--green); } .dot.off { background: var(--red); box-shadow: 0 0 9px var(--red); } .lobby-foot { margin-top: 16px; text-align: center; font-size: 11px; color: var(--dim2); letter-spacing: 0.14em; } /* --------------------------------- HUD --------------------------------- */ #hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; --ch-gap: 7px; --ch-len: 8px; } #hud > * { position: absolute; } /* 顶部比分 */ .hud-top { top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 20px; } .scoreboard-mini { display: flex; align-items: center; gap: 14px; background: rgba(6, 12, 18, 0.62); border: 1px solid rgba(96, 141, 176, 0.16); border-radius: 12px; padding: 8px 16px; backdrop-filter: blur(8px); } .scoreboard-mini .side { display: flex; align-items: center; gap: 8px; } .scoreboard-mini .side b { font-family: var(--mono); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; } .scoreboard-mini .me b { color: var(--cyan); text-shadow: 0 0 18px rgba(56, 225, 255, 0.55); } .scoreboard-mini .foe b { color: var(--orange); text-shadow: 0 0 18px rgba(255, 138, 61, 0.5); } .scoreboard-mini .tag { font-size: 10.5px; color: var(--dim); letter-spacing: 0.1em; } .roundbox { display: flex; align-items: center; gap: 12px; padding: 0 12px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } .score-sep { color: var(--dim2); font-family: var(--mono); font-size: 17px; margin-top: -2px; } .round-meta { display: flex; flex-direction: column; font-family: var(--mono); font-size: 10.5px; color: var(--dim); line-height: 1.55; letter-spacing: 0.05em; } .round-meta #roundTimer { color: #cfeaf6; font-size: 13px; } .hud-right { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--dim); background: rgba(6, 12, 18, 0.5); border: 1px solid rgba(96, 141, 176, 0.14); padding: 7px 12px; border-radius: 9px; } .hud-right b { color: #b8d8e6; font-weight: 600; } .spec-badge { color: var(--cyan); border: 1px solid rgba(56, 225, 255, 0.35); padding: 2px 7px; border-radius: 5px; font-size: 10px; letter-spacing: 0.08em; } /* 准星 */ #crosshair { left: 50%; top: 50%; width: 0; height: 0; transition: opacity 0.12s; } #crosshair i { position: absolute; background: rgba(236, 255, 255, 0.92); box-shadow: 0 0 4px rgba(0, 0, 0, 0.9); border-radius: 1px; } #crosshair .ch.t, #crosshair .ch.b { width: 2px; height: var(--ch-len); left: -1px; } #crosshair .ch.t { bottom: var(--ch-gap); } #crosshair .ch.b { top: var(--ch-gap); } #crosshair .ch.l, #crosshair .ch.r { height: 2px; width: var(--ch-len); top: -1px; } #crosshair .ch.l { right: var(--ch-gap); } #crosshair .ch.r { left: var(--ch-gap); } #crosshair .ch-dot { width: 2px; height: 2px; left: -1px; top: -1px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); } #crosshair.shot i { background: #fff; } #crosshair.hit .ch-dot { background: var(--red); width: 4px; height: 4px; left: -2px; top: -2px; } /* 命中标记 */ #hitmarker { left: 50%; top: 50%; width: 0; height: 0; opacity: 0; } #hitmarker i { position: absolute; width: 9px; height: 2px; background: #fff; box-shadow: 0 0 5px rgba(255, 255, 255, 0.9); border-radius: 1px; } #hitmarker i:nth-child(1) { transform: rotate(45deg) translate(7px, 0); } #hitmarker i:nth-child(2) { transform: rotate(45deg) translate(-7px, 0); } #hitmarker i:nth-child(3) { transform: rotate(-45deg) translate(7px, 0); } #hitmarker i:nth-child(4) { transform: rotate(-45deg) translate(-7px, 0); } #hitmarker.on { opacity: 1; animation: hm 0.24s ease-out; } #hitmarker.kill i { background: var(--red); box-shadow: 0 0 8px var(--red); width: 12px; } @keyframes hm { 0% { opacity: 1; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.25); } } /* 受伤红闪 */ #dmgFlash { inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 42%, rgba(255, 32, 52, 0.62) 100%); transition: opacity 0.42s ease-out; } #dmgFlash.on { opacity: 1; transition: opacity 0.06s ease-in; } /* 底部 HP / 弹药 */ .hud-bottom { left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 24px 22px; } .hp-panel, .ammo-panel { background: rgba(6, 12, 18, 0.66); border: 1px solid rgba(96, 141, 176, 0.16); border-radius: 12px; padding: 10px 16px 11px; backdrop-filter: blur(8px); min-width: 168px; } .hp-row { display: flex; align-items: baseline; gap: 6px; } .hp-num { font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1; color: #eafff5; font-variant-numeric: tabular-nums; } .hp-unit { font-size: 10px; color: var(--dim); letter-spacing: 0.16em; } .hp-bar { height: 3px; margin-top: 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.09); overflow: hidden; } .hp-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #2fd08a, #46e08a); box-shadow: 0 0 8px rgba(70, 224, 138, 0.6); transition: width 0.18s ease, background 0.2s ease; } .hp-bar i.warn { background: linear-gradient(90deg, #e0a53a, #ffd166); box-shadow: 0 0 8px rgba(255, 209, 102, 0.5); } .hp-bar i.low { background: linear-gradient(90deg, #d03648, #ff4a5c); box-shadow: 0 0 8px rgba(255, 74, 92, 0.6); } .hp-sub { display: flex; justify-content: space-between; margin-top: 7px; font-size: 10.5px; color: var(--dim); font-family: var(--mono); } .kda { color: #a8c6d6; } .ammo-panel { text-align: right; min-width: 176px; } .wname { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--cyan); text-transform: uppercase; } .ammo-row { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; margin-top: 2px; } .ammo-row .mag { font-family: var(--mono); font-size: 32px; font-weight: 600; line-height: 1; color: #f2fbff; font-variant-numeric: tabular-nums; } .ammo-row .mag.empty { color: var(--red); } .ammo-row .reserve { font-family: var(--mono); font-size: 13px; color: var(--dim); } .reload-track { height: 3px; margin-top: 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.09); overflow: hidden; } .reload-track i { display: block; height: 100%; width: 0%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); } .whint { margin-top: 7px; font-size: 10px; color: var(--dim2); letter-spacing: 0.04em; } /* 击杀播报 */ #killfeed { right: 20px; top: 78px; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; } .kf { display: flex; align-items: center; gap: 8px; background: rgba(6, 12, 18, 0.72); border: 1px solid rgba(96, 141, 176, 0.18); border-radius: 8px; padding: 6px 11px; font-size: 12px; animation: kfIn 0.22s ease-out; backdrop-filter: blur(6px); } .kf.me { border-color: rgba(56, 225, 255, 0.42); } .kf.foe { border-color: rgba(255, 138, 61, 0.4); } .kf .who { color: #cfeaf6; } .kf .me { color: var(--cyan); } .kf .foe { color: var(--orange); } .kf .gun { font-family: var(--mono); font-size: 10.5px; color: var(--dim); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; } .kf .hs { color: var(--red); font-size: 10.5px; } @keyframes kfIn { from { opacity: 0; transform: translateX(14px); } } /* 中央横幅 */ #banner { left: 50%; top: 34%; transform: translate(-50%, -50%); text-align: center; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9); animation: bannerIn 0.3s ease-out; } .banner-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.42em; color: var(--cyan); margin-bottom: 8px; } .banner-title { font-size: 40px; font-weight: 700; letter-spacing: 0.06em; color: #f2fbff; } .banner-sub { margin-top: 8px; font-size: 13px; color: #a8c6d6; letter-spacing: 0.06em; } @keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); } } /* 死亡 */ #deathScreen { inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(30, 6, 10, 0.28), rgba(4, 6, 9, 0.72)); } .death-card { text-align: center; padding: 22px 40px; border-radius: 14px; border: 1px solid rgba(255, 74, 92, 0.3); background: rgba(12, 8, 10, 0.7); backdrop-filter: blur(6px); } .death-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.4em; color: var(--red); } .death-by { margin: 10px 0 8px; font-size: 20px; } .death-by b { color: var(--orange); } .death-by span { font-family: var(--mono); font-size: 12px; color: var(--dim); } .death-next { font-size: 12px; color: var(--dim); } .death-next b { color: #dff6ff; font-family: var(--mono); } /* 观战条 */ #spectateBar { left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; background: rgba(6, 12, 18, 0.74); border: 1px solid rgba(96, 141, 176, 0.18); border-radius: 10px; padding: 8px 12px 8px 16px; font-size: 12px; color: var(--dim); pointer-events: auto; backdrop-filter: blur(6px); } #spectateBar b { color: #cfeaf6; font-family: var(--mono); font-size: 11px; } /* 记分板 */ #scoreboard { inset: 0; display: grid; place-items: center; background: rgba(3, 7, 11, 0.62); backdrop-filter: blur(3px); } .sb-card { width: min(520px, 92vw); border-radius: 14px; border: 1px solid var(--line); background: rgba(9, 16, 24, 0.96); overflow: hidden; } .sb-head, .sb-row { display: grid; grid-template-columns: 1fr 68px 68px 86px; align-items: center; padding: 11px 18px; font-family: var(--mono); font-size: 12px; } .sb-head { color: var(--dim2); font-size: 10.5px; letter-spacing: 0.14em; border-bottom: 1px solid var(--line); } .sb-row { border-bottom: 1px solid rgba(96, 141, 176, 0.08); } .sb-row:last-child { border-bottom: none; } .sb-row .pname { color: #d5eaf5; display: flex; align-items: center; gap: 8px; } .sb-row .swatch { width: 6px; height: 6px; border-radius: 50%; } .sb-row .swatch.me { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); } .sb-row .swatch.foe { background: var(--orange); box-shadow: 0 0 7px var(--orange); } .sb-row .num { font-variant-numeric: tabular-nums; color: #b8d8e6; } .sb-row .st { font-size: 11px; color: var(--dim); } .sb-row .st.dead { color: var(--red); } .sb-foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim2); font-family: var(--mono); } /* 暂停 */ #pauseScreen { inset: 0; display: grid; place-items: center; background: rgba(3, 7, 11, 0.72); backdrop-filter: blur(5px); pointer-events: auto; } .pause-card { width: min(380px, 90vw); padding: 26px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(16, 26, 37, 0.98), rgba(9, 15, 22, 0.98)); text-align: center; } .pause-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.36em; color: var(--cyan); } .pause-card h3 { margin: 9px 0 5px; font-size: 19px; } .pause-card .hint { margin: 0; font-size: 12px; color: var(--dim); } .pause-card .slider { text-align: left; } .pause-actions { display: flex; gap: 9px; margin-top: 18px; } .pause-actions .btn { flex: 1; } /* 等待对手 */ #waiting { inset: 0; display: grid; place-items: center; background: rgba(4, 8, 12, 0.52); backdrop-filter: blur(2px); pointer-events: auto; } .waiting-card { text-align: center; padding: 30px 40px; border-radius: 16px; border: 1px solid var(--line); background: rgba(9, 16, 24, 0.95); font-size: 13px; color: var(--dim); } .waiting-card .code { font-family: var(--mono); font-size: 40px; letter-spacing: 0.28em; color: #dff6ff; margin: 12px 0 6px; text-shadow: 0 0 26px rgba(56, 225, 255, 0.45); } .waiting-card .tiny { font-size: 11.5px; color: var(--dim2); margin-bottom: 14px; } .pulse { width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 50%; border: 2px solid rgba(56, 225, 255, 0.6); animation: pulse 1.6s ease-out infinite; } @keyframes pulse { 0% { transform: scale(0.65); opacity: 1; box-shadow: 0 0 0 0 rgba(56, 225, 255, 0.35); } 100% { transform: scale(1.1); opacity: 0.15; box-shadow: 0 0 0 22px rgba(56, 225, 255, 0); } } /* 比赛结束 */ #matchOver { inset: 0; display: grid; place-items: center; background: rgba(3, 7, 11, 0.74); backdrop-filter: blur(6px); pointer-events: auto; } .match-card { width: min(400px, 90vw); padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(16, 26, 37, 0.98), rgba(9, 15, 22, 0.98)); text-align: center; box-shadow: 0 30px 80px -30px #000; } .match-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.4em; color: var(--dim2); } .match-card h2 { margin: 10px 0 6px; font-size: 32px; letter-spacing: 0.08em; color: var(--cyan); text-shadow: 0 0 30px rgba(56, 225, 255, 0.4); } .match-card h2.lose { color: var(--orange); text-shadow: 0 0 30px rgba(255, 138, 61, 0.35); } .match-score { font-family: var(--mono); font-size: 40px; color: #eafcff; display: flex; align-items: center; justify-content: center; gap: 12px; } .match-score i { font-style: normal; color: var(--dim2); font-size: 26px; } .match-card .hint { margin: 6px 0 18px; font-size: 12px; color: var(--dim); } .match-actions { display: flex; gap: 9px; } .match-actions .btn { flex: 1; } /* toast */ #toast { position: fixed; left: 50%; bottom: 88px; transform: translate(-50%, 12px); background: rgba(12, 22, 31, 0.96); border: 1px solid rgba(56, 225, 255, 0.28); color: #d9f4ff; font-size: 13px; padding: 10px 18px; border-radius: 9px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 40; max-width: 78vw; text-align: center; } #toast.on { opacity: 1; transform: translate(-50%, 0); } /* 小屏适配 */ @media (max-width: 720px) { .brand-text h1 { font-size: 20px; } .banner-title { font-size: 26px; } .hud-bottom { padding: 0 12px 12px; } .hp-panel, .ammo-panel { min-width: 132px; padding: 8px 12px; } .hp-num, .ammo-row .mag { font-size: 24px; } .scoreboard-mini { gap: 8px; padding: 6px 10px; } .scoreboard-mini .side b { font-size: 18px; } .hud-right .stat { display: none; } .whint { display: none; } } /* ========================================================================== 触屏操作(手机 / 平板) ========================================================================== */ #touch { inset: 0; display: none; pointer-events: none; } body.touch #touch { display: block; } body.touch.ingame { touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; } body.touch.ingame #gl, body.touch.ingame #vm { touch-action: none; } body.touch .hud-right { display: none; } /* 左摇杆 */ .tstick { position: absolute; left: calc(20px + env(safe-area-inset-left, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: clamp(104px, 19vh, 152px); height: clamp(104px, 19vh, 152px); border-radius: 50%; border: 1.5px solid rgba(120, 200, 230, 0.3); background: radial-gradient(circle at 50% 46%, rgba(18, 44, 62, 0.42), rgba(5, 10, 16, 0.5)); box-shadow: inset 0 0 26px rgba(56, 225, 255, 0.08), 0 8px 26px -14px #000; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; } .tstick::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 1px dashed rgba(120, 200, 230, 0.18); } .tknob { position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 38% 32%, rgba(186, 242, 255, 0.9), rgba(30, 122, 158, 0.8)); box-shadow: 0 0 18px rgba(56, 225, 255, 0.45), inset 0 0 10px rgba(255, 255, 255, 0.35); will-change: transform; } /* 右侧按键 */ .tbtn { position: absolute; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(120, 200, 230, 0.3); background: radial-gradient(circle at 40% 34%, rgba(26, 58, 80, 0.62), rgba(7, 14, 21, 0.58)); box-shadow: 0 6px 20px -10px #000, inset 0 1px 0 rgba(255, 255, 255, 0.08); color: rgba(226, 246, 255, 0.92); font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; transition: transform 0.06s ease, background 0.1s ease, border-color 0.1s ease; } .tbtn.on { background: radial-gradient(circle at 40% 34%, rgba(56, 225, 255, 0.45), rgba(8, 52, 70, 0.7)); border-color: rgba(56, 225, 255, 0.85); transform: scale(0.95); } .tbtn.fire { right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: clamp(76px, 14vh, 108px); height: clamp(76px, 14vh, 108px); font-size: 15px; color: #ffe2cd; border-color: rgba(255, 138, 61, 0.5); background: radial-gradient(circle at 40% 34%, rgba(120, 52, 20, 0.55), rgba(24, 12, 8, 0.6)); box-shadow: 0 0 26px -10px rgba(255, 138, 61, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); } .tbtn.fire.on { background: radial-gradient(circle at 40% 34%, rgba(255, 160, 80, 0.72), rgba(90, 34, 8, 0.8)); border-color: rgba(255, 180, 110, 0.95); box-shadow: 0 0 34px -6px rgba(255, 138, 61, 0.85); } .tbtn.jump { right: calc(134px + env(safe-area-inset-right, 0px)); bottom: calc(30px + env(safe-area-inset-bottom, 0px)); width: clamp(58px, 10vh, 76px); height: clamp(58px, 10vh, 76px); font-size: 13px; } .tbtn.small { width: clamp(50px, 8.6vh, 66px); height: clamp(50px, 8.6vh, 66px); font-size: 11px; } #tReload { right: calc(26px + env(safe-area-inset-right, 0px)); bottom: calc(132px + env(safe-area-inset-bottom, 0px)); } #tSwap { right: calc(100px + env(safe-area-inset-right, 0px)); bottom: calc(118px + env(safe-area-inset-bottom, 0px)); } .tbtn.icon { right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(10px + env(safe-area-inset-top, 0px)); width: 40px; height: 40px; border-radius: 12px; font-size: 17px; font-weight: 400; } /* 触屏下的 HUD 重新排布:把血量和弹药挪到上面,底部全留给手 */ body.touch .hud-top { padding: calc(8px + env(safe-area-inset-top, 0px)) calc(10px + env(safe-area-inset-right, 0px)) 0 calc(10px + env(safe-area-inset-left, 0px)); } body.touch .scoreboard-mini { padding: 5px 10px; gap: 8px; } body.touch .scoreboard-mini .side b { font-size: 18px; } body.touch .scoreboard-mini .tag { font-size: 9px; } body.touch .roundbox { padding: 0 8px; gap: 8px; } body.touch .round-meta { font-size: 9px; } body.touch .round-meta #roundTimer { font-size: 11px; } body.touch .hud-bottom { padding: 0; } .touch-tip { display: none; margin: 11px 0 0; text-align: center; font-size: 11px; color: var(--dim); letter-spacing: 0.02em; } body.touch .touch-tip { display: block; } body.touch .hp-panel { position: fixed; left: calc(10px + env(safe-area-inset-left, 0px)); top: calc(56px + env(safe-area-inset-top, 0px)); min-width: 112px; padding: 5px 10px 6px; } body.touch .hp-num { font-size: 21px; } body.touch .hp-bar { margin-top: 5px; } body.touch .hp-sub { margin-top: 4px; font-size: 9.5px; } body.touch .ammo-panel { position: fixed; right: calc(10px + env(safe-area-inset-right, 0px)); top: calc(54px + env(safe-area-inset-top, 0px)); min-width: 118px; padding: 5px 10px 6px; } body.touch .wname { font-size: 9.5px; } body.touch .ammo-row .mag { font-size: 23px; } body.touch .ammo-row .reserve { font-size: 11px; } body.touch .reload-track { margin-top: 5px; } body.touch .whint { display: none; } body.touch #killfeed { top: calc(122px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); } body.touch .kf { font-size: 10.5px; padding: 4px 8px; } body.touch #spectateBar { bottom: auto; top: calc(118px + env(safe-area-inset-top, 0px)); font-size: 11px; } body.touch .banner-title { font-size: 28px; } body.touch .banner-sub { font-size: 12px; } body.touch .death-card { padding: 18px 30px; } /* 竖屏提示 */ #rotateHint { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(4, 8, 12, 0.96); } @media (orientation: portrait) { body.touch #rotateHint { display: grid; } } .rot-card { text-align: center; color: var(--txt); } .rot-card p { margin: 0; font-size: 17px; letter-spacing: 0.06em; } .rot-card .tiny { margin-top: 6px; font-size: 12px; color: var(--dim); letter-spacing: 0.04em; } .rot-icon { width: 88px; height: 58px; margin: 0 auto 20px; border: 2px solid var(--cyan); border-radius: 10px; box-shadow: 0 0 30px -8px rgba(56, 225, 255, 0.7); animation: rot 2.6s ease-in-out infinite; } @keyframes rot { 0%, 22% { transform: rotate(0deg); } 55%, 82% { transform: rotate(-90deg); } 100% { transform: rotate(-90deg); } } /* 小屏 / 横屏矮窗口:大厅和大按钮适配 */ @media (max-width: 620px), (max-height: 520px) { #lobby { align-items: flex-start; padding: 14px 12px; } .lobby-wrap { width: min(440px, 100%); } .brand { gap: 11px; margin-bottom: 13px; } .logo { width: 44px; height: 44px; } .logo svg { width: 26px; height: 26px; } .brand-text h1 { font-size: 19px; } .brand-text p { font-size: 11px; } .lobby-card { padding: 15px; border-radius: 13px; } .tips { font-size: 11px; line-height: 1.7; padding: 10px 12px; margin-top: 12px; } .tips li:nth-child(3) { display: none; } .code-input { font-size: 17px; padding: 9px 4px 9px 12px; } .btn { min-height: 44px; } .pause-card, .match-card { width: min(340px, 92vw); padding: 20px; } .sb-card { width: min(420px, 94vw); } .sb-head, .sb-row { grid-template-columns: 1fr 54px 54px 70px; padding: 9px 12px; font-size: 11.5px; } } /* 手机横屏(矮窗口):大厅压到一屏内 */ @media (max-height: 520px) { body.touch #lobby { align-items: center; padding: 10px 12px; } body.touch .lobby-wrap { width: min(720px, 100%); display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; } body.touch .brand { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; } body.touch .brand-text h1 { font-size: 17px; } body.touch .brand-text p { font-size: 10.5px; line-height: 1.6; } body.touch .lobby-card { padding: 12px 14px; } body.touch .map-strip { padding-bottom: 8px; margin-bottom: 9px; } body.touch .btn.big { padding: 11px 16px; font-size: 15px; } body.touch .lobby-row { margin-top: 8px; } body.touch .lobby-row .btn { padding: 8px 10px; } body.touch .or { margin: 9px 0 7px; } body.touch .code-input { padding: 7px 4px 7px 12px; font-size: 15px; } body.touch .slider { margin-top: 9px; font-size: 11px; } body.touch .tips, body.touch .lobby-foot, body.touch .net-row { display: none; } body.touch .btn kbd { display: none; } } .touch-tip { display: none; margin: 11px 0 0; text-align: center; font-size: 11px; color: var(--dim); letter-spacing: 0.02em; } body.touch .touch-tip { display: block; } body.touch .hp-panel { top: calc(60px + env(safe-area-inset-top, 0px)); } body.touch .ammo-panel { top: calc(56px + env(safe-area-inset-top, 0px)); } body.touch #killfeed { top: calc(128px + env(safe-area-inset-top, 0px)); }