starmusic-mobile
1<template>
2 <view :class="['page', tvCls]" :style="themeStyle">
3 <tv-nav />
4
5 <!-- 星空背景层(纯装饰,不拦截点击) -->
6 <view class="sky">
7 <view class="aura" />
8 <view v-for="s in bgStars" :key="s.id" class="bg-star" :style="s.style" />
9 </view>
10
11 <!-- 返回 -->
12 <view class="nav-bar">
13 <view class="back-btn d-press" data-navid="about-back" @click="handleBack">
14 <lx-icon name="arrow" :size="40" color="#ffffff" />
15 </view>
16 </view>
17
18 <scroll-view scroll-y class="about-scroll">
19 <!-- 品牌区 -->
20 <view class="brand d-fade-up">
21 <view class="brand-logo">
22 <lx-icon name="music" :size="76" color="theme" />
23 </view>
24 <text class="brand-name">starmusic</text>
25 <text class="brand-sub">夏日之瓜 · 仰望星辰工作室出品</text>
26 </view>
27
28 <!-- 静态星空装饰(安静的一角,游戏彩蛋藏在底部版本号) -->
29 <view class="deco-card d-fade-up" style="--delay: 120ms">
30 <view class="deco-sky">
31 <view v-for="s in decoStars" :key="s.id" class="deco-star" :style="s.style" />
32 <view class="deco-moon" />
33 <view class="deco-shooting" />
34 </view>
35 <text class="deco-text">愿每一次仰望,都有星光回应</text>
36 </view>
37
38 <!-- 游戏解锁的寄语 -->
39 <view v-if="unlocked.length" class="messages d-fade-up">
40 <text v-for="(msg, i) in unlocked" :key="i" class="message">「{{ msg }}」</text>
41 </view>
42
43 <!-- 底部 -->
44 <view class="footer">
45 <text class="version" @click="handleVersionTap">v{{ version }}</text>
46 <text class="copyright">© 仰望星辰工作室</text>
47 </view>
48 </scroll-view>
49
50 <!-- ============ 彩蛋:星辰跳一跳 ============ -->
51 <view v-if="showGame" class="game-layer">
52 <view class="game-panel d-pop-in">
53 <view class="game-head">
54 <text class="game-title">✦ 星辰跳一跳</text>
55 <text class="game-score">{{ score }} 分</text>
56 <view class="game-close d-press" @click="closeGame">
57 <lx-icon name="close" :size="32" color="#c9c4b6" />
58 </view>
59 </view>
60
61 <!-- 舞台:长按蓄力,松开起跳 -->
62 <!-- 注意:touch 事件不能加 .prevent —— 它会阻止触摸设备的 click 合成,
63 导致舞台内的「开始游戏 / 再来一局」按钮点不动;防选中改用 CSS 的 user-select -->
64 <view
65 class="stage"
66 data-nav-scope
67 @touchstart="onStagePressStart"
68 @touchend="onStagePressEnd"
69 @touchcancel="onStagePressEnd"
70 @click="handleStageTap"
71 >
72 <!-- 地面 -->
73 <view class="ground" />
74
75 <!-- 平台(世界坐标 → 屏幕坐标) -->
76 <view
77 v-for="p in visiblePlatforms"
78 :key="p.id"
79 class="platform"
80 :class="{ target: p.isTarget }"
81 :style="{ left: p.screenLeft + '%', width: p.width + '%' }"
82 >
83 <view class="platform-top" />
84 <text v-if="p.isTarget" class="platform-hint">✦</text>
85 </view>
86
87 <!-- 星星(外层控制水平位移与弧线,内层控制蓄力压扁) -->
88 <view
89 class="star-wrap"
90 :class="{ jumping: jumping, falling: starFall }"
91 :style="{ left: starScreenLeft + '%' }"
92 >
93 <view class="star-core" :style="coreStyle" />
94 </view>
95
96 <!-- 蓄力条 -->
97 <view class="power-bar">
98 <view class="power-fill" :class="{ full: power >= 100 }" :style="{ width: power + '%' }" />
99 </view>
100
101 <!-- 开始 / 结束 覆盖层 -->
102 <view v-if="!gamePlaying" class="stage-mask">
103 <text class="mask-title">{{ gameOver ? '星星坠落了' : '准备好了吗' }}</text>
104 <text class="mask-score" v-if="gameOver">本局得分 {{ score }}</text>
105 <text class="mask-tip">{{ gameOver ? '长按蓄力,松开起跳' : '跳过一颗颗星,别掉下去' }}</text>
106 <view class="mask-btn d-press" @click.stop="startGame">
107 {{ gameOver ? '再来一局' : '开始游戏' }}
108 </view>
109 </view>
110 </view>
111
112 <view class="game-foot">
113 <text class="foot-tip">长按蓄力 · 松开起跳 · 落在中心额外加分</text>
114 </view>
115 </view>
116 </view>
117 </view>
118</template>
119
120<script>
121/**
122 * 关于页(品牌信息 + 隐藏彩蛋小游戏)
123 *
124 * 设计说明:
125 * - 页面本身是「墨黑 + 金色星光」的静态展示:品牌区 + 一片安静的星空装饰 + 版本号。
126 * - 彩蛋藏在最底部的版本号上(致敬 Android 版本号彩蛋):连点 7 次弹出「星辰跳一跳」,
127 * 平时它看起来只是一行普通小字。
128 * - 跳一跳玩法:长按舞台蓄力(星星随蓄力压扁),松开起跳,落点在平台内则继续,
129 * 落在平台中心区域额外加分;掉出平台即结束。
130 * 平台使用「世界坐标 + 镜头偏移」实现:每成功一次镜头平滑右移,
131 * 当前平台固定停在舞台 26% 处,与微信跳一跳的镜头推进手感一致。
132 * - 该页刻意不使用自定义背景图(会与星空冲突)。
133 */
134import { getAppVersion } from '../../common/update.js'
135import { deviceClass } from '../../common/tv.js'
136import LxIcon from '../../components/lx-icon/lx-icon.vue'
137
138/** 触发彩蛋所需连点次数 */
139const EGG_TAPS = 7
140/** 蓄力上限与每次增量(约 1.25 秒充满,留足操作余量) */
141const MAX_POWER = 100
142const POWER_STEP = 4
143const POWER_INTERVAL = 50
144/** 满蓄力的跳跃距离(世界坐标单位,%) */
145const MAX_JUMP = 60
146/**
147 * 平台间距与宽度范围(%)
148 * 间距偏近 + 平台偏宽:需要蓄力 27%~50%(约 334~625ms),
149 * 再加上平台宽度带来的容错,可接受窗口约 ±230ms,手感才跟得上
150 */
151const GAP_MIN = 16
152const GAP_MAX = 30
153const WIDTH_MIN = 22
154const WIDTH_MAX = 34
155/** 落点与平台中心的偏差小于「宽度 × 该比例」时算完美居中 */
156const PERFECT_RATIO = 0.1
157/** 跳跃动画时长(需与样式中的过渡时间保持一致) */
158const JUMP_DURATION = 460
159/** 背景装饰星点数量 */
160const BG_STAR_COUNT = 36
161/** 按得分解锁的寄语(最后一条即完整彩蛋) */
162const MESSAGES = [
163 { at: 3, text: '每一颗星星,都是一个未说出口的愿望' },
164 { at: 6, text: '愿你像星辰一样,即使微弱,也始终发光' },
165 { at: 10, text: '仰望星辰的人,终会成为别人的光' },
166 { at: 15, text: '夏日之瓜 · 仰望星辰工作室 · 感谢你发现这里' },
167]
168
169export default {
170 components: { LxIcon },
171 data() {
172 return {
173 tvCls: '',
174 version: '',
175 bgStars: [],
176 unlocked: [],
177 // ===== 彩蛋触发 =====
178 tapCount: 0,
179 showGame: false,
180 // ===== 跳一跳 =====
181 gamePlaying: false,
182 gameOver: false,
183 score: 0,
184 pressing: false,
185 power: 0,
186 jumping: false,
187 starFall: false,
188 platforms: [],
189 currentPlatform: null,
190 targetPlatformId: 0,
191 starWorldX: 0,
192 platformSeq: 0,
193 _tapTimer: null,
194 _powerTimer: null,
195 _pressTimeout: null,
196 _jumpTimer: null,
197 _lastTouchEnd: 0,
198 }
199 },
200 computed: {
201 /** 镜头偏移:让当前平台中心固定在舞台 26% 处 */
202 cameraX() {
203 const cur = this.currentPlatform
204 if (!cur) return 0
205 return cur.x + cur.width / 2 - 26
206 },
207 /** 世界坐标 → 屏幕坐标,并过滤掉视野外的平台(控制 DOM 数量) */
208 visiblePlatforms() {
209 const cam = this.cameraX
210 const list = []
211 for (const p of this.platforms) {
212 const screenLeft = p.x - cam
213 if (screenLeft < -45 || screenLeft > 125) continue
214 list.push({ ...p, screenLeft, isTarget: p.id === this.targetPlatformId })
215 }
216 return list
217 },
218 /** 星星的屏幕横坐标(%) */
219 starScreenLeft() {
220 return this.starWorldX - this.cameraX
221 },
222 /** 星星蓄力压扁效果(以底部为原点) */
223 coreStyle() {
224 const p = this.power / MAX_POWER
225 return {
226 '--sx': (1 + p * 0.3).toFixed(3),
227 '--sy': (1 - p * 0.42).toFixed(3),
228 }
229 },
230 /** 装饰星点(固定一组,避免每次渲染都随机跳变) */
231 decoStars() {
232 return this.bgStars.slice(0, 22)
233 },
234 },
235 onLoad() {
236 this.tvCls = deviceClass()
237 this.version = getAppVersion()
238 this.buildBgStars()
239 },
240 onUnload() {
241 this.stopPress()
242 if (this._jumpTimer) clearTimeout(this._jumpTimer)
243 if (this._tapTimer) clearTimeout(this._tapTimer)
244 },
245 methods: {
246 handleBack() {
247 if (this.showGame) {
248 this.closeGame()
249 return
250 }
251 const pages = getCurrentPages()
252 if (pages.length > 1) uni.navigateBack()
253 else uni.reLaunch({ url: '/pages/index/index' })
254 },
255 /** 背景闪烁星点(位置与节奏随机,只在初始化时生成一次) */
256 buildBgStars() {
257 const list = []
258 for (let i = 0; i < BG_STAR_COUNT; i++) {
259 list.push({
260 id: i,
261 style: {
262 left: (Math.random() * 100).toFixed(2) + '%',
263 top: (Math.random() * 100).toFixed(2) + '%',
264 opacity: (0.2 + Math.random() * 0.5).toFixed(2),
265 animationDelay: (Math.random() * 4).toFixed(2) + 's',
266 animationDuration: (2.6 + Math.random() * 3).toFixed(2) + 's',
267 },
268 })
269 }
270 this.bgStars = list
271 },
272
273 // ============ 彩蛋触发(连点版本号) ============
274 handleVersionTap() {
275 if (this.showGame) return
276 this.tapCount++
277 if (this.tapCount >= EGG_TAPS) {
278 this.tapCount = 0
279 if (this._tapTimer) clearTimeout(this._tapTimer)
280 this.showGame = true
281 // 只布置好场景,等用户点「开始游戏」再进入可操作状态
282 this.prepareScene()
283 return
284 }
285 // 前两次静默,第三次开始给一点提示(保留探索感)
286 if (this.tapCount >= 3) {
287 uni.showToast({ title: `再点 ${EGG_TAPS - this.tapCount} 次试试`, icon: 'none', duration: 700 })
288 }
289 if (this._tapTimer) clearTimeout(this._tapTimer)
290 this._tapTimer = setTimeout(() => {
291 this.tapCount = 0
292 }, 5000)
293 },
294 closeGame() {
295 this.showGame = false
296 this.stopPress()
297 this.gamePlaying = false
298 },
299
300 // ============ 跳一跳 ============
301 /** 布置初始场景(不进入可操作状态,等待用户点「开始游戏」) */
302 prepareScene() {
303 const first = { id: 1, x: 8, width: 30 }
304 this.platformSeq = 1
305 this.platforms = [first]
306 this.currentPlatform = first
307 this.starWorldX = first.x + first.width / 2
308 this.score = 0
309 this.gameOver = false
310 this.gamePlaying = false
311 this.pressing = false
312 this.power = 0
313 this.jumping = false
314 this.starFall = false
315 this.unlocked = []
316 this.spawnNextPlatform()
317 },
318 /** 「开始游戏」/「再来一局」:清掉残留定时器、重置场景并进入可操作状态 */
319 startGame() {
320 this.stopPress()
321 if (this._jumpTimer) {
322 clearTimeout(this._jumpTimer)
323 this._jumpTimer = null
324 }
325 this.prepareScene()
326 this.gamePlaying = true
327 },
328 /** 生成下一个平台(间距与宽度随机,保证可跳到) */
329 spawnNextPlatform() {
330 const cur = this.currentPlatform
331 const gap = GAP_MIN + Math.random() * (GAP_MAX - GAP_MIN)
332 const width = WIDTH_MIN + Math.random() * (WIDTH_MAX - WIDTH_MIN)
333 const next = {
334 id: ++this.platformSeq,
335 x: cur.x + cur.width + gap,
336 width,
337 }
338 this.platforms = [...this.platforms, next]
339 this.targetPlatformId = next.id
340 // 只保留最近 8 个平台,避免 DOM 无限增长
341 if (this.platforms.length > 8) this.platforms = this.platforms.slice(-8)
342 },
343 /** 长按舞台开始蓄力 */
344 onStagePressStart() {
345 if (!this.gamePlaying || this.gameOver || this.jumping || this.pressing) return
346 this.pressing = true
347 this.power = 0
348 this._powerTimer = setInterval(() => {
349 this.power = Math.min(MAX_POWER, this.power + POWER_STEP)
350 }, POWER_INTERVAL)
351 // 兜底:手指滑出舞台时 touchend 可能收不到,超时后自动起跳,避免一直卡在蓄力态
352 this._pressTimeout = setTimeout(() => {
353 if (!this.pressing) return
354 const power = this.power
355 this.stopPress()
356 this.power = 0
357 this.jump(power)
358 }, 1600)
359 },
360 /** 松手起跳 */
361 onStagePressEnd() {
362 this._lastTouchEnd = Date.now()
363 if (!this.pressing) return
364 const power = this.power
365 this.stopPress()
366 this.power = 0
367 this.jump(power)
368 },
369 stopPress() {
370 this.pressing = false
371 if (this._powerTimer) {
372 clearInterval(this._powerTimer)
373 this._powerTimer = null
374 }
375 if (this._pressTimeout) {
376 clearTimeout(this._pressTimeout)
377 this._pressTimeout = null
378 }
379 },
380 /** 遥控 / 鼠标单击:按固定力度跳一次(触摸结束会紧跟 click,用时间戳滤掉) */
381 handleStageTap() {
382 if (Date.now() - this._lastTouchEnd < 400) return
383 if (!this.gamePlaying || this.gameOver || this.jumping || this.pressing) return
384 this.jump(38)
385 },
386 /** 起跳:距离 = 蓄力比例 × 最大距离 */
387 jump(power) {
388 if (!this.gamePlaying || this.gameOver || this.jumping) return
389 const dist = (power / MAX_POWER) * MAX_JUMP
390 this.jumping = true
391 this.starWorldX += dist
392 if (this._jumpTimer) clearTimeout(this._jumpTimer)
393 this._jumpTimer = setTimeout(() => this.checkLanding(), JUMP_DURATION)
394 },
395 /** 落点判定 */
396 checkLanding() {
397 this.jumping = false
398 const target = this.platforms.find((p) => p.id === this.targetPlatformId)
399 if (!target) return
400 const land = this.starWorldX
401 const inRange = land >= target.x && land <= target.x + target.width
402 if (!inRange) {
403 this.fail()
404 return
405 }
406 const center = target.x + target.width / 2
407 const perfect = Math.abs(land - center) <= target.width * PERFECT_RATIO
408 this.score += perfect ? 2 : 1
409 // 轻微吸附到平台内,避免贴边时的视觉误差
410 this.starWorldX = Math.min(Math.max(land, target.x + 1.5), target.x + target.width - 1.5)
411 this.checkUnlock()
412 if (perfect) {
413 uni.showToast({ title: '完美居中 +2', icon: 'none', duration: 600 })
414 }
415 // 稍作停留再推进,让落地有视觉停顿;推进时镜头随 transition 平移
416 setTimeout(() => {
417 if (!this.gamePlaying) return
418 this.currentPlatform = target
419 this.spawnNextPlatform()
420 }, 200)
421 },
422 /** 掉出平台 */
423 fail() {
424 this.gamePlaying = false
425 this.gameOver = true
426 this.stopPress()
427 this.starFall = true
428 // #ifdef APP-PLUS
429 try {
430 uni.vibrateLong({ fail: () => {} })
431 } catch (e) {
432 // 部分机型不支持震动,忽略
433 }
434 // #endif
435 setTimeout(() => {
436 this.starFall = false
437 }, 900)
438 },
439 /** 按得分解锁寄语 */
440 checkUnlock() {
441 for (const item of MESSAGES) {
442 if (this.score >= item.at && this.unlocked.indexOf(item.text) < 0) {
443 this.unlocked.push(item.text)
444 }
445 }
446 },
447 },
448}
449</script>
450
451<style lang="scss" scoped>
452.page {
453 position: relative;
454 display: flex;
455 flex-direction: column;
456 height: 100vh;
457 overflow: hidden;
458 /* 墨黑配色:冷灰底,让金色星光成为唯一亮点 */
459 background: linear-gradient(180deg, #0a0c0f 0%, #131a1e 46%, #07090b 100%);
460}
461
462/* ============ 星空背景 ============ */
463.sky {
464 position: absolute;
465 top: 0;
466 right: 0;
467 bottom: 0;
468 left: 0;
469 z-index: 0;
470 overflow: hidden;
471 pointer-events: none;
472}
473
474.aura {
475 position: absolute;
476 top: 0;
477 right: 0;
478 bottom: 0;
479 left: 0;
480 background:
481 radial-gradient(circle at 24% 14%, rgba(253, 230, 138, 0.15), transparent 46%),
482 radial-gradient(circle at 80% 30%, rgba(49, 194, 124, 0.1), transparent 52%),
483 radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.05), transparent 56%);
484}
485
486.bg-star {
487 position: absolute;
488 width: 3rpx;
489 height: 3rpx;
490 border-radius: 50%;
491 background: #fffdf5;
492 animation: twinkle 3.6s ease-in-out infinite;
493}
494
495@keyframes twinkle {
496 0%,
497 100% {
498 opacity: 0.12;
499 transform: scale(0.8);
500 }
501 50% {
502 opacity: 0.85;
503 transform: scale(1.2);
504 }
505}
506
507/* ============ 返回 ============ */
508.nav-bar {
509 position: relative;
510 z-index: 2;
511 padding: calc(var(--status-bar-height, 0px) + 12rpx) 24rpx 0;
512}
513
514.back-btn {
515 width: 72rpx;
516 height: 72rpx;
517 border-radius: 50%;
518 display: flex;
519 align-items: center;
520 justify-content: center;
521 background: rgba(255, 255, 255, 0.09);
522 border: 1rpx solid rgba(253, 230, 138, 0.18);
523 backdrop-filter: blur(12px);
524 -webkit-backdrop-filter: blur(12px);
525 transform: rotate(180deg);
526}
527
528.about-scroll {
529 position: relative;
530 z-index: 1;
531 flex: 1;
532 min-height: 0;
533 padding: 0 36rpx calc(env(safe-area-inset-bottom) + 60rpx);
534}
535
536/* ============ 品牌区 ============ */
537.brand {
538 padding: 20rpx 0 40rpx;
539 display: flex;
540 flex-direction: column;
541 align-items: center;
542}
543
544.brand-logo {
545 width: 132rpx;
546 height: 132rpx;
547 border-radius: 38rpx;
548 display: flex;
549 align-items: center;
550 justify-content: center;
551 background: rgba(255, 255, 255, 0.07);
552 border: 1rpx solid rgba(253, 230, 138, 0.2);
553 backdrop-filter: blur(16px);
554 -webkit-backdrop-filter: blur(16px);
555 box-shadow:
556 inset 0 1rpx 0 rgba(255, 255, 255, 0.3),
557 0 12rpx 40rpx rgba(245, 158, 11, 0.18);
558}
559
560.brand-name {
561 margin-top: 26rpx;
562 font-size: 62rpx;
563 font-weight: 700;
564 letter-spacing: 6rpx;
565 background: linear-gradient(110deg, #ffffff 6%, #fde68a 44%, #f59e0b 72%, #ffffff 96%);
566 -webkit-background-clip: text;
567 background-clip: text;
568 color: transparent;
569 filter: drop-shadow(0 6rpx 26rpx rgba(245, 158, 11, 0.42));
570}
571
572.brand-sub {
573 margin-top: 16rpx;
574 font-size: 24rpx;
575 letter-spacing: 2rpx;
576 color: rgba(240, 236, 226, 0.58);
577}
578
579/* ============ 静态星空装饰 ============ */
580.deco-card {
581 border-radius: 32rpx;
582 padding: 20rpx 20rpx 24rpx;
583 background: rgba(255, 255, 255, 0.05);
584 border: 1rpx solid rgba(253, 230, 138, 0.14);
585 backdrop-filter: blur(20px) saturate(150%);
586 -webkit-backdrop-filter: blur(20px) saturate(150%);
587 box-shadow:
588 inset 0 1rpx 0 rgba(255, 255, 255, 0.18),
589 0 16rpx 48rpx rgba(0, 0, 0, 0.45);
590}
591
592.deco-sky {
593 position: relative;
594 height: 340rpx;
595 border-radius: 22rpx;
596 overflow: hidden;
597 /* isolation 让裁剪对 transform 子元素也可靠(部分 webview 下 overflow 裁不住动画元素) */
598 isolation: isolate;
599 background: radial-gradient(circle at 50% 45%, rgba(38, 33, 18, 0.5), rgba(7, 8, 10, 0.92));
600}
601
602.deco-star {
603 position: absolute;
604 width: 4rpx;
605 height: 4rpx;
606 border-radius: 50%;
607 background: #fffdf5;
608 animation: twinkle 4s ease-in-out infinite;
609}
610
611/* 满月:渐变球 + 双层光晕(比"两圆叠加的弯月"更干净,没有缺口色差) */
612.deco-moon {
613 position: absolute;
614 top: 48rpx;
615 right: 76rpx;
616 width: 68rpx;
617 height: 68rpx;
618 border-radius: 50%;
619 background: radial-gradient(circle at 36% 32%, #fffdf5 0%, #fde68a 46%, #f59e0b 100%);
620 box-shadow:
621 0 0 22rpx rgba(253, 230, 138, 0.75),
622 0 0 56rpx rgba(245, 158, 11, 0.45);
623}
624
625/*
626 * 流星:一条渐隐的光带周期性划过
627 * 起点与终点都留在卡片内(从 left:28rpx 平移到 +360rpx),
628 * 光带长 120rpx,最远处 28+360+120=508rpx < 卡片宽度,不会溢出
629 */
630.deco-shooting {
631 position: absolute;
632 top: 56rpx;
633 left: 28rpx;
634 width: 120rpx;
635 height: 2rpx;
636 border-radius: 2rpx;
637 background: linear-gradient(90deg, rgba(255, 253, 245, 0), rgba(255, 253, 245, 0.9));
638 opacity: 0;
639 animation: shooting 7s ease-in-out infinite;
640}
641
642@keyframes shooting {
643 0% {
644 opacity: 0;
645 transform: translate(0, 0) rotate(16deg);
646 }
647 6% {
648 opacity: 1;
649 }
650 30% {
651 opacity: 0;
652 transform: translate(360rpx, 118rpx) rotate(16deg);
653 }
654 100% {
655 opacity: 0;
656 transform: translate(360rpx, 118rpx) rotate(16deg);
657 }
658}
659
660.deco-text {
661 display: block;
662 margin-top: 20rpx;
663 text-align: center;
664 font-size: 23rpx;
665 letter-spacing: 2rpx;
666 color: rgba(240, 236, 226, 0.5);
667}
668
669/* ============ 寄语 ============ */
670.messages {
671 margin-top: 32rpx;
672 display: flex;
673 flex-direction: column;
674 align-items: center;
675}
676
677.message {
678 margin-bottom: 14rpx;
679 font-size: 25rpx;
680 line-height: 1.7;
681 letter-spacing: 1rpx;
682 text-align: center;
683 color: rgba(240, 236, 226, 0.8);
684 text-shadow: 0 0 20rpx rgba(245, 158, 11, 0.28);
685}
686
687/* ============ 底部(版本号即彩蛋入口) ============ */
688.footer {
689 margin-top: 44rpx;
690 display: flex;
691 flex-direction: column;
692 align-items: center;
693}
694
695.version {
696 font-size: 24rpx;
697 color: rgba(240, 236, 226, 0.42);
698}
699
700.copyright {
701 margin-top: 10rpx;
702 font-size: 22rpx;
703 color: rgba(240, 236, 226, 0.28);
704 letter-spacing: 1rpx;
705}
706
707/* ============ 彩蛋:跳一跳 ============ */
708.game-layer {
709 position: fixed;
710 top: 0;
711 right: 0;
712 bottom: 0;
713 left: 0;
714 z-index: 100;
715 display: flex;
716 align-items: center;
717 justify-content: center;
718 padding: 0 28rpx;
719 background: rgba(4, 5, 7, 0.82);
720 backdrop-filter: blur(14px);
721 -webkit-backdrop-filter: blur(14px);
722}
723
724.game-panel {
725 width: 100%;
726 border-radius: 32rpx;
727 padding: 26rpx 22rpx 20rpx;
728 background: linear-gradient(180deg, rgba(28, 32, 38, 0.96), rgba(12, 14, 17, 0.98));
729 border: 1rpx solid rgba(253, 230, 138, 0.18);
730 box-shadow:
731 inset 0 1rpx 0 rgba(255, 255, 255, 0.16),
732 0 24rpx 64rpx rgba(0, 0, 0, 0.6);
733}
734
735.game-head {
736 display: flex;
737 align-items: center;
738 padding: 0 6rpx 20rpx;
739}
740
741.game-title {
742 flex-shrink: 0;
743 font-size: 30rpx;
744 font-weight: 600;
745 color: #f7f3e8;
746 letter-spacing: 2rpx;
747}
748
749.game-score {
750 flex: 1;
751 min-width: 0;
752 margin-left: 20rpx;
753 text-align: right;
754 font-size: 24rpx;
755 color: #fde68a;
756}
757
758.game-close {
759 margin-left: 16rpx;
760 width: 56rpx;
761 height: 56rpx;
762 border-radius: 50%;
763 display: flex;
764 align-items: center;
765 justify-content: center;
766 background: rgba(255, 255, 255, 0.08);
767 flex-shrink: 0;
768}
769
770/* ---- 舞台 ---- */
771.stage {
772 position: relative;
773 height: 560rpx;
774 border-radius: 22rpx;
775 overflow: hidden;
776 /* 未对 touch 使用 preventDefault,这里避免长按选中文字 / 弹出系统菜单 */
777 user-select: none;
778 -webkit-user-select: none;
779 -webkit-touch-callout: none;
780 background: radial-gradient(circle at 50% 40%, rgba(38, 33, 18, 0.5), rgba(7, 8, 10, 0.95));
781}
782
783/* 地面参考线 */
784.ground {
785 position: absolute;
786 left: 0;
787 right: 0;
788 bottom: 104rpx;
789 height: 2rpx;
790 background: linear-gradient(90deg, rgba(253, 230, 138, 0), rgba(253, 230, 138, 0.28), rgba(253, 230, 138, 0));
791}
792
793/* ---- 平台(星球石台) ---- */
794.platform {
795 position: absolute;
796 bottom: 104rpx;
797 height: 30rpx;
798 border-radius: 6rpx 6rpx 4rpx 4rpx;
799 background: linear-gradient(180deg, #3a3f47, #22262b);
800 box-shadow:
801 inset 0 2rpx 0 rgba(255, 255, 255, 0.16),
802 0 8rpx 20rpx rgba(0, 0, 0, 0.5);
803 /* 镜头推进时平滑平移(时长与星星的水平过渡保持一致,避免两者错位) */
804 transition: left 0.46s linear, width 0.46s linear;
805}
806
807.platform-top {
808 position: absolute;
809 top: 0;
810 left: 0;
811 right: 0;
812 height: 4rpx;
813 border-radius: 6rpx 6rpx 0 0;
814 background: rgba(253, 230, 138, 0.35);
815}
816
817.platform.target .platform-top {
818 background: rgba(253, 230, 138, 0.7);
819 box-shadow: 0 0 14rpx rgba(253, 230, 138, 0.5);
820}
821
822.platform-hint {
823 position: absolute;
824 top: -36rpx;
825 left: 50%;
826 margin-left: -12rpx;
827 font-size: 20rpx;
828 color: rgba(253, 230, 138, 0.6);
829}
830
831/* ---- 星星 ---- */
832.star-wrap {
833 position: absolute;
834 bottom: 134rpx;
835 margin-left: -30rpx;
836 width: 60rpx;
837 height: 60rpx;
838 /* 水平匀速前进,与 jump 的时长保持一致 */
839 transition: left 0.46s linear;
840}
841
842.star-wrap.jumping {
843 animation: jumpArc 0.46s ease-out;
844}
845
846.star-wrap.falling {
847 animation: starFall 0.9s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
848}
849
850.star-core {
851 width: 100%;
852 height: 100%;
853 border-radius: 50%;
854 background: radial-gradient(circle, #fffdf5 0%, #fde68a 55%, #f59e0b 100%);
855 box-shadow:
856 0 0 16rpx rgba(253, 230, 138, 0.95),
857 0 0 40rpx rgba(245, 158, 11, 0.5);
858 transform-origin: bottom center;
859 transform: scale(var(--sx, 1), var(--sy, 1));
860 transition: transform 0.1s linear;
861}
862
863@keyframes jumpArc {
864 0% {
865 transform: translateY(0);
866 }
867 45% {
868 transform: translateY(-170rpx);
869 }
870 100% {
871 transform: translateY(0);
872 }
873}
874
875@keyframes starFall {
876 0% {
877 transform: translateY(0) rotate(0deg);
878 opacity: 1;
879 }
880 100% {
881 transform: translateY(420rpx) rotate(240deg);
882 opacity: 0;
883 }
884}
885
886/* ---- 蓄力条 ---- */
887.power-bar {
888 position: absolute;
889 left: 32rpx;
890 right: 32rpx;
891 bottom: 40rpx;
892 height: 8rpx;
893 border-radius: 4rpx;
894 background: rgba(255, 255, 255, 0.1);
895 overflow: hidden;
896}
897
898.power-fill {
899 height: 100%;
900 border-radius: 4rpx;
901 background: linear-gradient(90deg, #fde68a, #f59e0b);
902 box-shadow: 0 0 12rpx rgba(253, 230, 138, 0.8);
903}
904
905.power-fill.full {
906 background: linear-gradient(90deg, #fca5a5, #ef4444);
907 box-shadow: 0 0 14rpx rgba(239, 68, 68, 0.8);
908}
909
910/* ---- 开始 / 结束覆盖层 ---- */
911.stage-mask {
912 position: absolute;
913 top: 0;
914 right: 0;
915 bottom: 0;
916 left: 0;
917 display: flex;
918 flex-direction: column;
919 align-items: center;
920 justify-content: center;
921 background: rgba(6, 7, 9, 0.72);
922}
923
924.mask-title {
925 font-size: 34rpx;
926 font-weight: 600;
927 letter-spacing: 3rpx;
928 color: #f7f3e8;
929}
930
931.mask-score {
932 margin-top: 14rpx;
933 font-size: 26rpx;
934 color: #fde68a;
935}
936
937.mask-tip {
938 margin-top: 12rpx;
939 font-size: 23rpx;
940 color: rgba(240, 236, 226, 0.55);
941}
942
943.mask-btn {
944 margin-top: 32rpx;
945 padding: 16rpx 56rpx;
946 border-radius: 40rpx;
947 font-size: 28rpx;
948 color: #1a1405;
949 background: linear-gradient(135deg, #fde68a, #f59e0b);
950 box-shadow: 0 10rpx 30rpx rgba(245, 158, 11, 0.4);
951}
952
953.game-foot {
954 padding: 18rpx 8rpx 2rpx;
955 text-align: center;
956}
957
958.foot-tip {
959 font-size: 22rpx;
960 color: rgba(240, 236, 226, 0.45);
961}
962</style>