/* 贪蛇出动 greedy_snake 样式(tool 独立维护,不与其他 tool 共用) */ * { margin: 0; padding: 0; box-sizing: border-box; } html, body { width: 100%; height: 100%; overflow: hidden; background: #1c2450; touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; } #gs-root { position: fixed; inset: 0; } #gs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; } .gs-hidden { display: none !important; } /* ---------- 左上 HUD ---------- */ #gs-hud-stats { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 14px; color: #fff; font-size: 14px; line-height: 1.9; z-index: 5; text-shadow: 0 1px 3px rgba(0,0,0,.5); } .gs-stat-label { color: #e8ecff; } .gs-stat-value.coins { color: #ffd23e; font-weight: 700; } .gs-stat-value.lucky { color: #ff5fa2; font-weight: 700; } .gs-stat-value.kills { color: #ff5fa2; font-weight: 700; } /* ---------- 顶部进度 ---------- */ #gs-hud-progress { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; z-index: 5; } #gs-progress-title { color: #ffd23e; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); } #gs-progress-bar-wrap { display: flex; align-items: center; gap: 6px; margin-top: 4px; } #gs-progress-flame { font-size: 16px; } #gs-progress-bar { width: 150px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.25); overflow: hidden; border: 1px solid rgba(255,255,255,.35); } #gs-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffb62e, #ffd23e); border-radius: 6px; transition: width .2s; } #gs-progress-text { color: #fff; font-size: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.6); min-width: 64px; text-align: left; } /* ---------- 右上排行榜 ---------- */ #gs-hud-board { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 8px; width: 168px; background: rgba(28,36,80,.82); border-radius: 8px; z-index: 5; padding: 6px 8px 8px; color: #cfd6ff; font-size: 11px; backdrop-filter: blur(3px); } #gs-board-title { text-align: center; color: #fff; font-size: 13px; font-weight: 700; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.15); } #gs-board-best { color: #8fa0ff; margin-top: 4px; } #gs-board-best-row { display: flex; justify-content: space-between; padding: 2px 0 4px; border-bottom: 1px solid rgba(255,255,255,.12); } #gs-board-best-row .best { color: #ffd23e; font-weight: 700; } #gs-board-list .gs-board-row { display: flex; align-items: center; gap: 4px; padding: 1.5px 0; } #gs-board-list .gs-board-rank { width: 16px; text-align: center; color: #9aa6e8; flex: none; } #gs-board-list .gs-board-rank.r1 { color: #ffd23e; } #gs-board-list .gs-board-rank.r2 { color: #d7dbe8; } #gs-board-list .gs-board-rank.r3 { color: #e8a06a; } #gs-board-list .gs-board-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #gs-board-list .gs-board-score { color: #fff; } #gs-board-list .gs-board-row.me .gs-board-name, #gs-board-list .gs-board-row.me .gs-board-score, #gs-board-list .gs-board-row.me .gs-board-rank { color: #ff5fa2; font-weight: 700; } /* ---------- 摇杆 ---------- */ #gs-joystick { position: absolute; left: 26px; bottom: calc(34px + env(safe-area-inset-bottom)); width: 118px; height: 118px; border-radius: 50%; background: rgba(10,14,34,.55); z-index: 6; } #gs-joystick-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; border-radius: 50%; background: rgba(214,220,235,.92); transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,.4); } /* ---------- 加速按钮 ---------- */ #gs-boost { position: absolute; right: 26px; bottom: calc(30px + env(safe-area-inset-bottom)); width: 96px; height: 96px; border-radius: 50%; border: none; z-index: 6; background: rgba(226,230,240,.92); box-shadow: 0 3px 10px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; } #gs-boost.active { background: #ffd23e; transform: scale(1.06); } #gs-boost.active svg path { fill: #7a4b00; } /* ---------- 遮罩通用 ---------- */ .gs-overlay { position: absolute; inset: 0; z-index: 20; background: rgba(8,10,26,.62); display: flex; align-items: center; justify-content: center; } /* ---------- 道具转盘 ---------- */ #gs-roulette { flex-direction: column; } #gs-roulette-title { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 2px 6px rgba(0,0,0,.6); margin-bottom: 18px; } #gs-roulette-body { display: flex; align-items: center; gap: 14px; } #gs-slot-machine { position: relative; padding: 20px 18px 30px; background: linear-gradient(180deg, #6a4bd8, #4b32b3); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.5); } .gs-bulbs { position: absolute; display: flex; } .gs-bulbs i { width: 8px; height: 8px; border-radius: 50%; background: #ffe9a3; box-shadow: 0 0 6px #ffd23e; margin: 0 9px; } .gs-bulbs i.off { background: #b9a5ff; box-shadow: none; } .gs-bulbs-top { top: 5px; left: 10px; right: 10px; justify-content: space-between; } .gs-bulbs-bottom { bottom: 5px; left: 10px; right: 10px; justify-content: space-between; } .gs-bulbs-left { left: 5px; top: 12px; bottom: 12px; flex-direction: column; justify-content: space-between; } .gs-bulbs-right { right: 5px; top: 12px; bottom: 12px; flex-direction: column; justify-content: space-between; } .gs-bulbs-left i, .gs-bulbs-right i { margin: 7px 0; } #gs-reels { display: flex; gap: 8px; } .gs-reel { width: 92px; height: 148px; border-radius: 8px; cursor: pointer; background: radial-gradient(circle at 50% 45%, #7fb3ff 0%, #4d7ddb 55%, #3a5cb4 100%); border: 2px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; transition: transform .15s, border-color .15s, box-shadow .15s; } .gs-reel.selected { border-color: #ffd23e; box-shadow: 0 0 14px rgba(255,210,62,.8); transform: scale(1.04); } .gs-reel-icon { width: 62px; height: 62px; } .gs-reel-icon svg, .gs-reel-icon canvas { width: 100%; height: 100%; } #gs-roulette-skip { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; color: #e5dcff; font-size: 13px; cursor: pointer; } #gs-reroll { writing-mode: vertical-rl; letter-spacing: 4px; background: linear-gradient(180deg, #58c8f2, #2ea7e0); color: #fff; border: none; border-radius: 16px; padding: 12px 8px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.4); } #gs-reroll:disabled { filter: grayscale(.6); opacity: .7; } #gs-reroll .gs-gem { writing-mode: horizontal-tb; margin-bottom: 4px; } /* ---------- 复活面板 ---------- */ #gs-revive-panel { position: relative; width: min(430px, 92vw); background: rgba(10,12,24,.92); border-radius: 14px; padding: 26px 20px 24px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.6); } #gs-revive-close { position: absolute; top: 8px; right: 12px; background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; } #gs-revive-title { color: #ffd23e; font-size: 16px; font-weight: 700; } #gs-revive-title span { color: #ff8a3e; } #gs-revive-count-wrap { position: relative; width: 74px; height: 74px; margin: 18px auto 16px; } #gs-revive-count-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#ffd23e var(--p, 100%), rgba(255,255,255,.15) 0); -webkit-mask: radial-gradient(circle, transparent 55%, #000 56%); mask: radial-gradient(circle, transparent 55%, #000 56%); } #gs-revive-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; font-weight: 800; } #gs-revive-btn { background: linear-gradient(180deg, #ffb62e, #ff8a1e); color: #fff; border: none; border-radius: 8px; padding: 10px 26px; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(255,150,30,.45); } #gs-revive-btn:disabled { filter: grayscale(.7); opacity: .7; } /* ---------- 结算面板 ---------- */ #gs-result-panel { width: min(430px, 92vw); background: rgba(10,12,24,.92); border-radius: 14px; padding: 22px 20px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.6); } #gs-result-title { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 2px; } .gs-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 10px; } .gs-result-cell { background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px 0; } .gs-result-num { font-size: 22px; font-weight: 800; color: #fff; } .gs-result-num.coins { color: #ffd23e; } .gs-result-num.kills { color: #ff5fa2; } .gs-result-num.lucky { color: #ff5fa2; } .gs-result-label { color: #9aa6e8; font-size: 12px; margin-top: 2px; } #gs-result-best { color: #8fa0ff; font-size: 13px; margin-bottom: 16px; } #gs-result-best em { color: #ffd23e; font-style: normal; font-weight: 700; } #gs-result-btns { display: flex; gap: 12px; justify-content: center; } .gs-btn-primary { background: linear-gradient(180deg, #ffb62e, #ff8a1e); color: #fff; border: none; border-radius: 8px; padding: 10px 30px; font-size: 15px; font-weight: 700; cursor: pointer; } .gs-btn-ghost { background: rgba(255,255,255,.12); color: #cfd6ff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 10px 22px; font-size: 15px; cursor: pointer; } /* ---------- Toast ---------- */ #gs-toast { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); padding: 8px 18px; border-radius: 18px; z-index: 40; color: #fff; font-size: 13px; pointer-events: none; background: rgba(46,120,220,.92); box-shadow: 0 4px 14px rgba(0,0,0,.4); } #gs-toast.success { background: rgba(46,180,90,.92); } #gs-toast.error { background: rgba(220,60,60,.92); } /* ---------- 交互详情弹窗 ---------- */ #gs-dialog { position: absolute; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; } #gs-dialog-box { width: min(560px, 94vw); max-height: 70vh; background: #10142c; border: 1px solid #3a4a8c; border-radius: 10px; display: flex; flex-direction: column; } #gs-dialog-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #2a3568; color: #fff; font-size: 13px; } #gs-dialog-head #gs-dialog-title { flex: 1; font-weight: 700; } #gs-dialog-head button { background: #2a3568; color: #cfd6ff; border: none; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; } #gs-dialog-body { margin: 0; padding: 10px 12px; overflow: auto; color: #9fe8b8; font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; } /* 横屏适配:竖屏时提示旋转 */ #gs-rotate-tip { position: absolute; inset: 0; z-index: 60; background: #1c2450; color: #cfd6ff; display: none; align-items: center; justify-content: center; text-align: center; font-size: 15px; padding: 0 30px; } @media (orientation: portrait) and (max-width: 520px) { #gs-rotate-tip { display: flex; } }