1312 lines
31 KiB
SCSS
1312 lines
31 KiB
SCSS
/**
|
||
* game.vue — 血糖消和乐 v2 (stitch_sugar_balance_blast code.html)
|
||
*/
|
||
|
||
.game-page {
|
||
height: 100vh;
|
||
height: 100dvh;
|
||
background: #f4fbf4; /* VitalMint background */
|
||
color: #161d19; /* VitalMint text color */
|
||
overflow: hidden;
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.game-page.is-screen-shake {
|
||
animation: gg-screen-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
||
}
|
||
|
||
@keyframes gg-screen-shake {
|
||
0%, 100% { transform: translate3d(0, 0, 0); }
|
||
10%, 30%, 50%, 70%, 90% { transform: translate3d(-8px, -8px, 0); }
|
||
20%, 40%, 60%, 80% { transform: translate3d(8px, 8px, 0); }
|
||
}
|
||
|
||
.game-page .gg-glass {
|
||
background: rgba(255, 255, 255, 0.75);
|
||
backdrop-filter: blur(16px);
|
||
-webkit-backdrop-filter: blur(16px);
|
||
border: 1.5rpx solid rgba(255, 255, 255, 0.6);
|
||
}
|
||
|
||
/* ===== Header HUD ===== */
|
||
.game-page .gg-header {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
z-index: 50;
|
||
border-radius: 0 0 24rpx 24rpx;
|
||
box-shadow: 0 4rpx 20rpx rgba(0, 108, 73, 0.04);
|
||
background: rgba(255, 255, 255, 0.88);
|
||
backdrop-filter: blur(16px);
|
||
-webkit-backdrop-filter: blur(16px);
|
||
border-bottom: 1rpx solid rgba(0, 108, 73, 0.06);
|
||
}
|
||
|
||
.game-page .gg-hud-nav {
|
||
display: flex;
|
||
align-items: center;
|
||
position: relative;
|
||
height: var(--menu-height, 64rpx);
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.game-page .gg-hud-control-group {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-btn {
|
||
width: var(--menu-height, 64rpx);
|
||
height: var(--menu-height, 64rpx);
|
||
border-radius: 50%;
|
||
background: rgba(255, 255, 255, 0.85);
|
||
border: 1rpx solid rgba(0, 108, 73, 0.08);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex-shrink: 0;
|
||
box-shadow: 0 4rpx 12rpx rgba(0, 108, 73, 0.03);
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.game-page .gg-hud-btn--pressed {
|
||
opacity: 0.75;
|
||
transform: scale(0.94);
|
||
}
|
||
|
||
.game-page .gg-hud-btn.is-muted {
|
||
opacity: 0.45;
|
||
}
|
||
|
||
.game-page .gg-hud-level-center {
|
||
position: absolute;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
z-index: 5;
|
||
}
|
||
|
||
.game-page .gg-hud-level-text {
|
||
font-size: 30rpx;
|
||
font-weight: 800;
|
||
color: #475569;
|
||
line-height: 1.1;
|
||
letter-spacing: 1rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-score {
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: 4rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-score-val {
|
||
font-size: 44rpx;
|
||
font-weight: 900;
|
||
color: #006c49;
|
||
font-variant-numeric: tabular-nums;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.game-page .gg-hud-score.is-pop .gg-hud-score-val {
|
||
animation: gg-pop-score 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||
}
|
||
|
||
.game-page .gg-hud-score-unit {
|
||
font-size: 26rpx;
|
||
font-weight: 700;
|
||
color: #64748b;
|
||
}
|
||
|
||
/* ===== 次:上次消除(名称 + 含糖量) ===== */
|
||
.game-page .gg-hud-last-food {
|
||
flex-shrink: 0;
|
||
width: 100%;
|
||
max-width: 750rpx;
|
||
margin: 0 auto 14rpx;
|
||
padding: 16rpx 18rpx;
|
||
border-radius: 22rpx;
|
||
background: rgba(255, 255, 255, 0.88);
|
||
border: 1rpx solid rgba(0, 108, 73, 0.1);
|
||
box-sizing: border-box;
|
||
box-shadow: 0 4rpx 16rpx rgba(0, 108, 73, 0.06);
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-kicker {
|
||
display: block;
|
||
font-size: 24rpx;
|
||
font-weight: 700;
|
||
color: #475569;
|
||
letter-spacing: 0.04em;
|
||
margin-bottom: 12rpx;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-card {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 16rpx;
|
||
padding: 14rpx 16rpx;
|
||
border-radius: 18rpx;
|
||
background: #f8fafc;
|
||
border: 1rpx solid rgba(0, 108, 73, 0.08);
|
||
animation: gg-last-food-in 0.22s ease-out;
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.game-page .gg-hud-last-food-card {
|
||
animation: none;
|
||
}
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-card.is-high {
|
||
background: rgba(254, 242, 242, 0.9);
|
||
border-color: rgba(220, 38, 38, 0.2);
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-card.is-mid {
|
||
background: rgba(255, 251, 235, 0.95);
|
||
border-color: rgba(234, 88, 12, 0.18);
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-card.is-low {
|
||
background: rgba(240, 253, 244, 0.95);
|
||
border-color: rgba(22, 163, 74, 0.15);
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-icon {
|
||
width: 72rpx;
|
||
height: 72rpx;
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 16rpx;
|
||
background: #fff;
|
||
box-shadow: 0 2rpx 8rpx rgba(15, 23, 42, 0.06);
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-icon .food-tile-icon--goal {
|
||
width: 56rpx;
|
||
height: 56rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-body {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-name {
|
||
font-size: 34rpx;
|
||
font-weight: 800;
|
||
color: #0f172a;
|
||
line-height: 1.25;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-sugar-row {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: 8rpx 12rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-sugar-label {
|
||
font-size: 26rpx;
|
||
font-weight: 700;
|
||
color: #475569;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-gi {
|
||
font-size: 26rpx;
|
||
font-weight: 800;
|
||
color: #fff;
|
||
padding: 4rpx 14rpx;
|
||
border-radius: 8rpx;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-sugar-hint {
|
||
font-size: 26rpx;
|
||
font-weight: 700;
|
||
color: #334155;
|
||
line-height: 1.35;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-card.is-high .gg-hud-last-food-sugar-hint {
|
||
color: #991b1b;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-placeholder {
|
||
padding: 12rpx 4rpx;
|
||
}
|
||
|
||
.game-page .gg-hud-last-food-placeholder text {
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
color: #94a3b8;
|
||
line-height: 1.45;
|
||
}
|
||
|
||
@keyframes gg-last-food-in {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(6rpx);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
/* 血糖圆环(主区摘要用 mini) */
|
||
.game-page .gg-glucose-ring {
|
||
width: 88rpx;
|
||
height: 88rpx;
|
||
border-radius: 50%;
|
||
padding: 6rpx;
|
||
flex-shrink: 0;
|
||
box-sizing: border-box;
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.game-page .gg-glucose-ring-inner {
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: 50%;
|
||
background: #fff;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 0;
|
||
box-shadow: inset 0 0 0 1rpx rgba(0, 108, 73, 0.05), 0 2rpx 6rpx rgba(0, 108, 73, 0.04);
|
||
}
|
||
|
||
.game-page .gg-glucose-value {
|
||
font-size: 30rpx;
|
||
font-weight: 900;
|
||
color: #0f172a;
|
||
line-height: 1;
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
.game-page .gg-glucose-brief {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
gap: 10rpx;
|
||
min-width: 0;
|
||
}
|
||
|
||
.game-page .gg-glucose-title {
|
||
font-size: 30rpx;
|
||
font-weight: 800;
|
||
color: #334155;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.game-page .gg-glucose-status {
|
||
font-size: 28rpx;
|
||
font-weight: 800;
|
||
color: #ea580c;
|
||
padding: 6rpx 18rpx;
|
||
border-radius: 999rpx;
|
||
background: rgba(234, 88, 12, 0.1);
|
||
white-space: nowrap;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.game-page .gg-glucose-status.is-warn-low {
|
||
color: #2563eb;
|
||
background: rgba(59, 130, 246, 0.1);
|
||
}
|
||
|
||
.game-page .gg-glucose-status.is-warn-high {
|
||
color: #dc2626;
|
||
background: rgba(239, 68, 68, 0.1);
|
||
animation: gg-alert-pulse 1.5s infinite;
|
||
}
|
||
|
||
.game-page .gg-glucose-ring--mini {
|
||
width: 56rpx;
|
||
height: 56rpx;
|
||
padding: 4rpx;
|
||
}
|
||
|
||
.game-page .gg-glucose-ring--mini .gg-glucose-value {
|
||
font-size: 22rpx;
|
||
}
|
||
|
||
.game-page .gg-glucose-status--mini {
|
||
font-size: 22rpx;
|
||
padding: 2rpx 10rpx;
|
||
}
|
||
|
||
@keyframes gg-alert-pulse {
|
||
0% { opacity: 0.8; }
|
||
50% { opacity: 1; box-shadow: 0 0 8rpx rgba(239, 68, 68, 0.3); }
|
||
100% { opacity: 0.8; }
|
||
}
|
||
|
||
@keyframes gg-pop-score {
|
||
0% { transform: scale(1); }
|
||
50% { transform: scale(1.12); color: #ea580c; }
|
||
100% { transform: scale(1); }
|
||
}
|
||
|
||
/* ===== 主:棋盘区 ===== */
|
||
.game-page .gg-board-hero {
|
||
flex: 1;
|
||
width: 100%;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.game-page .gg-board-hint-inline {
|
||
flex-shrink: 0;
|
||
width: 100%;
|
||
max-width: 750rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 10rpx;
|
||
margin-bottom: 12rpx;
|
||
padding: 0 8rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.game-page .gg-hint-tag {
|
||
font-size: 22rpx;
|
||
font-weight: 800;
|
||
color: #ffffff;
|
||
background: #006c49;
|
||
padding: 4rpx 12rpx;
|
||
border-radius: 8rpx;
|
||
flex-shrink: 0;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.game-page .gg-board-hint-text {
|
||
font-size: 26rpx;
|
||
font-weight: 600;
|
||
color: #475569;
|
||
line-height: 1.35;
|
||
text-align: center;
|
||
}
|
||
|
||
.game-page .gg-board-stack {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.game-page .gg-board-zone {
|
||
position: relative;
|
||
width: 100%;
|
||
}
|
||
|
||
/* ===== Main / Board ===== */
|
||
.game-page .gg-main {
|
||
position: fixed;
|
||
left: 0;
|
||
right: 0;
|
||
top: var(--board-area-top, 120px);
|
||
bottom: var(--board-area-bottom, 180px);
|
||
z-index: 10;
|
||
width: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
padding: 8rpx 16rpx 0;
|
||
}
|
||
|
||
/* gg-hint-banner 已移除,提示直接显示在棋盘食物上 */
|
||
|
||
/* 无可用移动时的小型提示条 */
|
||
.game-page .gg-no-move-tip {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10rpx;
|
||
padding: 12rpx 24rpx;
|
||
margin-bottom: 12rpx;
|
||
border-radius: 999rpx;
|
||
background: rgba(234, 88, 12, 0.1);
|
||
border: 1rpx solid rgba(234, 88, 12, 0.3);
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.game-page .gg-no-move-tip-text {
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
color: #c2410c;
|
||
}
|
||
|
||
.game-page .gg-board-wrap {
|
||
/* 5 行 × 4 列棋盘宽高由 JS boardWrapStyle 注入 */
|
||
flex-shrink: 0;
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.game-page .game-grid {
|
||
display: flex;
|
||
flex-direction: column;
|
||
border-radius: 36rpx;
|
||
background: rgba(255, 255, 255, 0.92);
|
||
backdrop-filter: blur(24px);
|
||
-webkit-backdrop-filter: blur(24px);
|
||
box-shadow:
|
||
0 20rpx 56rpx rgba(0, 108, 73, 0.14),
|
||
0 4rpx 16rpx rgba(15, 23, 42, 0.06),
|
||
inset 0 2rpx 12rpx rgba(255, 255, 255, 0.85);
|
||
border: 2rpx solid rgba(0, 108, 73, 0.12);
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.game-page .game-row {
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.game-page .game-cell {
|
||
position: relative;
|
||
flex-shrink: 0;
|
||
overflow: visible;
|
||
background: transparent;
|
||
border-radius: 0;
|
||
box-shadow: none;
|
||
}
|
||
|
||
.game-page .game-tile {
|
||
position: absolute;
|
||
inset: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: 0;
|
||
display: flex;
|
||
align-items: stretch;
|
||
justify-content: stretch;
|
||
background: transparent;
|
||
box-shadow: none;
|
||
border: none;
|
||
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
|
||
z-index: 1;
|
||
box-sizing: border-box;
|
||
overflow: visible;
|
||
}
|
||
|
||
.game-page .game-tile.is-dragging {
|
||
z-index: 20;
|
||
will-change: transform;
|
||
}
|
||
|
||
.game-page .game-tile.is-drag-neighbor {
|
||
z-index: 15;
|
||
will-change: transform;
|
||
}
|
||
|
||
.game-page .game-tile.is-dragging.game-tile--pressed {
|
||
transform: none;
|
||
}
|
||
|
||
.game-page .game-tile.is-drop-start {
|
||
opacity: 0;
|
||
transform: translateY(-30%);
|
||
transition: none;
|
||
}
|
||
|
||
.game-page .game-tile.is-drop-animate {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
|
||
}
|
||
|
||
.game-page .game-tile.is-selected {
|
||
transform: scale(1.12);
|
||
z-index: 20;
|
||
border: none;
|
||
box-shadow: none;
|
||
outline: 4rpx solid #006c49;
|
||
outline-offset: -2rpx;
|
||
border-radius: 8rpx;
|
||
}
|
||
|
||
.game-page .game-tile--pressed {
|
||
transform: scale(0.92);
|
||
}
|
||
|
||
.game-page .game-tile.is-selected.game-tile--pressed {
|
||
transform: scale(1.06);
|
||
}
|
||
|
||
/* 3 连:糖果弹跳消除(先弹大再缩没,带高光) */
|
||
.game-page .game-tile.is-matched.is-match-fx-3,
|
||
.game-page .game-tile.is-matched:not(.is-match-fx-4):not(.is-match-fx-5) {
|
||
animation: gg-candy-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
||
z-index: 6;
|
||
}
|
||
|
||
@keyframes gg-candy-pop {
|
||
0% { transform: scale(1); opacity: 1; filter: brightness(1); }
|
||
35% { transform: scale(1.35); opacity: 1; filter: brightness(1.7) saturate(1.4); }
|
||
60% { transform: scale(1.12); opacity: 0.9; }
|
||
100% { transform: scale(0); opacity: 0; filter: brightness(2); }
|
||
}
|
||
|
||
/* 4 连:弹性旋转 + 金色高光 */
|
||
.game-page .game-tile.is-matched.is-match-fx-4 {
|
||
animation: gg-candy-pop-4 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
||
z-index: 7;
|
||
box-shadow:
|
||
0 0 0 6rpx rgba(255, 213, 74, 0.6),
|
||
0 0 28px rgba(255, 200, 40, 0.95),
|
||
0 0 56px rgba(255, 170, 20, 0.5);
|
||
}
|
||
|
||
@keyframes gg-candy-pop-4 {
|
||
0% { transform: scale(1) rotate(0deg); opacity: 1; filter: brightness(1) saturate(1); }
|
||
25% { transform: scale(1.6) rotate(-10deg); opacity: 1; filter: brightness(1.9) saturate(1.8); }
|
||
50% { transform: scale(1.32) rotate(8deg); opacity: 0.95; filter: brightness(1.5) saturate(1.5); }
|
||
100% { transform: scale(0) rotate(20deg); opacity: 0; filter: brightness(2.4); }
|
||
}
|
||
|
||
/* 5 连+:彩虹爆闪 + 强光晕 */
|
||
.game-page .game-tile.is-matched.is-match-fx-5 {
|
||
animation: gg-candy-pop-5 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
||
z-index: 8;
|
||
box-shadow:
|
||
0 0 0 8rpx rgba(255, 255, 255, 0.7),
|
||
0 0 44px rgba(255, 215, 0, 1),
|
||
0 0 90px rgba(255, 90, 156, 0.6);
|
||
}
|
||
|
||
@keyframes gg-candy-pop-5 {
|
||
0% { transform: scale(1) rotate(0deg); opacity: 1; filter: brightness(1) saturate(1) hue-rotate(0deg); }
|
||
20% { transform: scale(2) rotate(-14deg); opacity: 1; filter: brightness(2.6) saturate(2.4) hue-rotate(30deg); }
|
||
45% { transform: scale(1.7) rotate(12deg); opacity: 0.9; filter: brightness(2) saturate(2) hue-rotate(-20deg); }
|
||
100% { transform: scale(0) rotate(26deg); opacity: 0; filter: brightness(3); }
|
||
}
|
||
|
||
/* ===== 提示高亮:方块增强发光 ===== */
|
||
.game-page .game-tile.is-hint {
|
||
border: 4rpx solid #10b981;
|
||
z-index: 10;
|
||
animation: gg-hint-glow 0.9s ease-in-out infinite alternate;
|
||
box-shadow: 0 0 0 4rpx rgba(16, 185, 129, 0.3), 0 0 20rpx rgba(16, 185, 129, 0.4);
|
||
}
|
||
|
||
/* 提示标记角标 */
|
||
.game-page .game-tile.is-hint::after {
|
||
content: '✦';
|
||
position: absolute;
|
||
top: 4rpx;
|
||
right: 6rpx;
|
||
font-size: 18rpx;
|
||
color: #006c49;
|
||
line-height: 1;
|
||
pointer-events: none;
|
||
animation: gg-hint-badge-spin 1.8s linear infinite;
|
||
}
|
||
|
||
@keyframes gg-hint-badge-spin {
|
||
from { transform: rotate(0deg) scale(1); opacity: 1; }
|
||
50% { transform: rotate(180deg) scale(1.3); opacity: 0.8; }
|
||
to { transform: rotate(360deg) scale(1); opacity: 1; }
|
||
}
|
||
|
||
/* ===== 提示交换箭头(覆盖在两食物正中间) ===== */
|
||
.game-page .gg-hint-arrow {
|
||
position: absolute;
|
||
width: 48rpx;
|
||
height: 48rpx;
|
||
background: linear-gradient(135deg, #006c49, #10b981);
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 26rpx;
|
||
color: #fff;
|
||
font-weight: 900;
|
||
pointer-events: none;
|
||
z-index: 30;
|
||
transform: translate(-50%, -50%);
|
||
box-shadow: 0 4rpx 16rpx rgba(0, 108, 73, 0.45);
|
||
animation: gg-hint-arrow-pulse 0.7s ease-in-out infinite alternate;
|
||
}
|
||
|
||
@keyframes gg-hint-arrow-pulse {
|
||
from {
|
||
transform: translate(-50%, -50%) scale(1);
|
||
box-shadow: 0 4rpx 16rpx rgba(0, 108, 73, 0.4);
|
||
}
|
||
to {
|
||
transform: translate(-50%, -50%) scale(1.25);
|
||
box-shadow: 0 4rpx 28rpx rgba(0, 108, 73, 0.7), 0 0 0 8rpx rgba(16, 185, 129, 0.15);
|
||
}
|
||
}
|
||
|
||
/* 扩散发光光环(颜色/粗细/光晕由 JS 内联,弹性扩散) */
|
||
.game-page .gg-match-ripple {
|
||
position: absolute;
|
||
border-radius: 50%;
|
||
border-style: solid;
|
||
border-color: rgba(255, 255, 255, 0.9);
|
||
border-width: 4px;
|
||
transform: translate(-50%, -50%) scale(0.2);
|
||
animation: gg-ripple-burst 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
|
||
pointer-events: none;
|
||
will-change: transform, opacity;
|
||
}
|
||
|
||
@keyframes gg-ripple-burst {
|
||
0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.95; }
|
||
55% { opacity: 0.55; }
|
||
100% { transform: translate(-50%, -50%) scale(2.9); opacity: 0; }
|
||
}
|
||
|
||
/* 糖果粒子:圆点用背景色,星屑用字形 + 发光 */
|
||
.game-page .gg-particle {
|
||
position: absolute;
|
||
border-radius: 50%;
|
||
pointer-events: none;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
line-height: 1;
|
||
will-change: transform, opacity, left, top;
|
||
}
|
||
|
||
.game-page .gg-particle.is-star {
|
||
border-radius: 0;
|
||
background-color: transparent !important;
|
||
text-shadow: 0 0 6px currentColor, 0 0 12px currentColor;
|
||
}
|
||
|
||
.game-page .gg-particle text {
|
||
color: inherit;
|
||
line-height: 1;
|
||
}
|
||
|
||
/* 大消除全屏闪光 */
|
||
.game-page .gg-screen-flash {
|
||
position: fixed;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
transition: opacity 0.28s ease-out;
|
||
}
|
||
|
||
@keyframes gg-pop-out {
|
||
0% { transform: scale(1); opacity: 1; }
|
||
50% { transform: scale(1.3); opacity: 0.8; }
|
||
100% { transform: scale(0); opacity: 0; }
|
||
}
|
||
|
||
@keyframes gg-hint-glow {
|
||
from { transform: scale(1); filter: brightness(1.05); }
|
||
to { transform: scale(1.1); filter: brightness(1.25) saturate(1.3); }
|
||
}
|
||
|
||
/* 棋盘内食材图标 — 撑满格子,避免 flex 居中导致小程序 image 贴顶 */
|
||
.game-page .game-tile .food-tile-icon {
|
||
pointer-events: none;
|
||
z-index: 2;
|
||
flex: 1;
|
||
align-self: stretch;
|
||
width: 100%;
|
||
height: 100%;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
}
|
||
|
||
.game-page .game-tile .food-tile-icon--tile .food-tile-icon__emoji {
|
||
font-size: inherit;
|
||
}
|
||
|
||
.game-page .tile-icon {
|
||
font-size: 48rpx;
|
||
line-height: 1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* ===== 棋子含糖等级常驻角标(认知核心:一眼看出高/中/低糖) ===== */
|
||
.game-page .gg-tile-gi {
|
||
position: absolute;
|
||
top: 2rpx;
|
||
left: 2rpx;
|
||
z-index: 3;
|
||
min-width: 30rpx;
|
||
height: 30rpx;
|
||
padding: 0 6rpx;
|
||
border-radius: 999rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 22rpx;
|
||
font-weight: 900;
|
||
color: #ffffff;
|
||
line-height: 1;
|
||
pointer-events: none;
|
||
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.25);
|
||
border: 2rpx solid rgba(255, 255, 255, 0.9);
|
||
}
|
||
|
||
.game-page .gg-tile-gi.is-low { background: #16a34a; }
|
||
.game-page .gg-tile-gi.is-mid { background: #ea580c; }
|
||
.game-page .gg-tile-gi.is-high {
|
||
background: #dc2626;
|
||
box-shadow: 0 2rpx 10rpx rgba(220, 38, 38, 0.45);
|
||
font-size: 22rpx;
|
||
}
|
||
|
||
/* ===== 点击食物的大字科普卡 ===== */
|
||
.game-page .gg-food-card {
|
||
position: fixed;
|
||
left: 50%;
|
||
top: 30%;
|
||
transform: translateX(-50%);
|
||
z-index: 150;
|
||
width: 560rpx;
|
||
max-width: 86vw;
|
||
padding: 32rpx 36rpx;
|
||
border-radius: 32rpx;
|
||
background: #ffffff;
|
||
border: 6rpx solid #16a34a;
|
||
box-shadow: 0 20rpx 60rpx rgba(22, 29, 25, 0.22);
|
||
pointer-events: none;
|
||
animation: gg-food-card-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||
}
|
||
|
||
.game-page .gg-food-card.is-mid { border-color: #ea580c; }
|
||
.game-page .gg-food-card.is-high { border-color: #dc2626; }
|
||
|
||
.game-page .gg-food-card-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 20rpx;
|
||
margin-bottom: 16rpx;
|
||
}
|
||
|
||
.game-page .gg-food-card-name {
|
||
flex: 1;
|
||
min-width: 0;
|
||
font-size: 46rpx;
|
||
font-weight: 900;
|
||
color: #161d19;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.game-page .gg-food-card-gi {
|
||
flex-shrink: 0;
|
||
font-size: 32rpx;
|
||
font-weight: 900;
|
||
color: #ffffff;
|
||
padding: 8rpx 24rpx;
|
||
border-radius: 999rpx;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.game-page .gg-food-card-tip {
|
||
display: block;
|
||
font-size: 34rpx;
|
||
font-weight: 600;
|
||
color: #3c4a42;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
@keyframes gg-food-card-in {
|
||
from { transform: translateX(-50%) scale(0.86); opacity: 0; }
|
||
to { transform: translateX(-50%) scale(1); opacity: 1; }
|
||
}
|
||
|
||
/* ===== FX Layer ===== */
|
||
.game-page .gg-fx-layer {
|
||
position: fixed;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
z-index: 100;
|
||
}
|
||
|
||
.game-page .gg-floating-val {
|
||
position: absolute;
|
||
font-weight: 900;
|
||
font-size: 44rpx;
|
||
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
||
transform: translateX(-50%);
|
||
animation: gg-float-up 1s ease-out forwards;
|
||
}
|
||
|
||
@keyframes gg-float-up {
|
||
0% { transform: translate(-50%, 0) scale(0.5); opacity: 0; }
|
||
20% { transform: translate(-50%, -20px) scale(1.2); opacity: 1; }
|
||
100% { transform: translate(-50%, -60px) scale(1); opacity: 0; }
|
||
}
|
||
|
||
/* ===== Footer boosters(辅,弱化) ===== */
|
||
.game-page .gg-footer {
|
||
position: fixed;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
z-index: 40;
|
||
border-radius: 48rpx 48rpx 0 0;
|
||
border-top: 1rpx solid rgba(0, 108, 73, 0.06);
|
||
box-shadow: 0 -4rpx 24rpx rgba(0, 108, 73, 0.04);
|
||
padding-top: 12rpx;
|
||
padding-left: 24rpx;
|
||
padding-right: 24rpx;
|
||
background: rgba(255, 255, 255, 0.78);
|
||
}
|
||
|
||
.game-page .gg-footer--sub .gg-booster-btn {
|
||
padding: 16rpx 0;
|
||
width: 152rpx;
|
||
border-radius: 32rpx;
|
||
background: rgba(255, 255, 255, 0.75);
|
||
border-color: rgba(0, 108, 73, 0.08);
|
||
box-shadow: 0 4rpx 12rpx rgba(0, 108, 73, 0.04);
|
||
}
|
||
|
||
.game-page .gg-footer--sub .gg-booster-label {
|
||
font-size: 24rpx;
|
||
color: #64748b;
|
||
}
|
||
|
||
.game-page .gg-boosters {
|
||
display: flex;
|
||
justify-content: space-around;
|
||
align-items: center;
|
||
max-width: 750rpx;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.game-page .gg-booster-btn {
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 22rpx 0;
|
||
width: 176rpx;
|
||
background: rgba(255, 255, 255, 0.85);
|
||
border: 1.5rpx solid rgba(0, 108, 73, 0.12);
|
||
border-radius: 40rpx;
|
||
box-shadow: 0 8rpx 20rpx rgba(0, 108, 73, 0.03), inset 0 2rpx 4rpx rgba(255, 255, 255, 0.8);
|
||
transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||
}
|
||
|
||
.game-page .gg-booster-btn--pressed {
|
||
transform: scale(0.92);
|
||
background: rgba(255, 255, 255, 0.65);
|
||
}
|
||
|
||
.game-page .gg-booster-btn.is-disabled {
|
||
opacity: 0.35;
|
||
filter: grayscale(100%);
|
||
pointer-events: none !important;
|
||
}
|
||
|
||
.game-page .gg-booster-count {
|
||
position: absolute;
|
||
top: -10rpx;
|
||
right: -10rpx;
|
||
width: 52rpx;
|
||
height: 52rpx;
|
||
border-radius: 50%;
|
||
color: #fff;
|
||
font-size: 30rpx;
|
||
font-weight: 900;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: 4rpx solid #fff;
|
||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.12);
|
||
z-index: 2;
|
||
}
|
||
|
||
.game-page .gg-booster-count.is-green { background: #10b981; }
|
||
.game-page .gg-booster-count.is-orange { background: #f97316; }
|
||
.game-page .gg-booster-count.is-rose { background: #f43f5e; }
|
||
|
||
.game-page .gg-booster-icon {
|
||
margin-bottom: 8rpx;
|
||
transition: transform 0.25s ease;
|
||
}
|
||
|
||
.game-page .gg-booster-btn--pressed .gg-booster-icon {
|
||
transform: scale(0.85);
|
||
}
|
||
|
||
.game-page .gg-booster-label {
|
||
font-size: 30rpx;
|
||
font-weight: 700;
|
||
color: #2b3a32;
|
||
}
|
||
|
||
/* ===== 高糖消除红色警示弹窗 ===== */
|
||
.game-page .gg-high-alert-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 210;
|
||
background: rgba(127, 29, 29, 0.45);
|
||
backdrop-filter: blur(16rpx);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 48rpx;
|
||
animation: gg-high-alert-fade-in 0.28s ease-out;
|
||
}
|
||
|
||
.game-page .gg-high-alert-card {
|
||
width: 100%;
|
||
max-width: 560rpx;
|
||
padding: 48rpx 40rpx 44rpx;
|
||
border-radius: 40rpx;
|
||
background: linear-gradient(165deg, #fff5f5 0%, #ffffff 42%);
|
||
border: 4rpx solid #dc2626;
|
||
box-shadow:
|
||
0 0 0 8rpx rgba(220, 38, 38, 0.12),
|
||
0 24rpx 64rpx rgba(185, 28, 28, 0.35);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
text-align: center;
|
||
animation: gg-high-alert-pop 0.42s cubic-bezier(0.34, 1.45, 0.64, 1);
|
||
}
|
||
|
||
.game-page .gg-high-alert-icon-wrap {
|
||
width: 96rpx;
|
||
height: 96rpx;
|
||
border-radius: 50%;
|
||
background: linear-gradient(145deg, #ef4444, #b91c1c);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-bottom: 24rpx;
|
||
box-shadow: 0 12rpx 32rpx rgba(220, 38, 38, 0.45);
|
||
animation: gg-high-badge-pulse 1.2s ease-in-out infinite;
|
||
}
|
||
|
||
.game-page .gg-high-alert-badge-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12rpx;
|
||
margin-bottom: 16rpx;
|
||
flex-wrap: wrap;
|
||
justify-content: center;
|
||
}
|
||
|
||
.game-page .gg-high-alert-badge {
|
||
font-size: 32rpx;
|
||
font-weight: 900;
|
||
color: #ffffff;
|
||
background: #dc2626;
|
||
padding: 8rpx 24rpx;
|
||
border-radius: 12rpx;
|
||
letter-spacing: 4rpx;
|
||
box-shadow: 0 6rpx 16rpx rgba(220, 38, 38, 0.4);
|
||
}
|
||
|
||
.game-page .gg-high-alert-badge-sub {
|
||
font-size: 24rpx;
|
||
font-weight: 700;
|
||
color: #b91c1c;
|
||
}
|
||
|
||
.game-page .gg-high-alert-title {
|
||
font-size: 40rpx;
|
||
font-weight: 900;
|
||
color: #991b1b;
|
||
line-height: 1.25;
|
||
margin-bottom: 12rpx;
|
||
}
|
||
|
||
.game-page .gg-high-alert-name {
|
||
font-size: 44rpx;
|
||
font-weight: 900;
|
||
color: #dc2626;
|
||
line-height: 1.2;
|
||
margin-bottom: 16rpx;
|
||
}
|
||
|
||
.game-page .gg-high-alert-tip {
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #7f1d1d;
|
||
line-height: 1.45;
|
||
opacity: 0.9;
|
||
}
|
||
|
||
@keyframes gg-high-alert-fade-in {
|
||
from { opacity: 0; }
|
||
to { opacity: 1; }
|
||
}
|
||
|
||
@keyframes gg-high-alert-pop {
|
||
from {
|
||
opacity: 0;
|
||
transform: scale(0.82) translateY(24rpx);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: scale(1) translateY(0);
|
||
}
|
||
}
|
||
|
||
@keyframes gg-high-badge-pulse {
|
||
0%, 100% { transform: scale(1); box-shadow: 0 12rpx 32rpx rgba(220, 38, 38, 0.45); }
|
||
50% { transform: scale(1.06); box-shadow: 0 16rpx 40rpx rgba(220, 38, 38, 0.55); }
|
||
}
|
||
|
||
/* ===== Result overlay ===== */
|
||
.game-page .gg-result-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 200;
|
||
background: rgba(22, 29, 25, 0.35);
|
||
backdrop-filter: blur(20rpx);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 48rpx;
|
||
}
|
||
|
||
.game-page .gg-result-card {
|
||
width: 100%;
|
||
max-width: 600rpx;
|
||
border-radius: 48rpx;
|
||
padding: 64rpx 48rpx;
|
||
background: #ffffff;
|
||
border: 1.5rpx solid rgba(255, 255, 255, 0.8);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
text-align: center;
|
||
box-shadow: 0 30rpx 80rpx rgba(22, 29, 25, 0.18);
|
||
}
|
||
|
||
.game-page .gg-result-card.is-high-clear {
|
||
border: 4rpx solid #dc2626;
|
||
background: linear-gradient(180deg, #fff5f5 0%, #ffffff 36%);
|
||
box-shadow:
|
||
0 0 0 6rpx rgba(220, 38, 38, 0.1),
|
||
0 30rpx 80rpx rgba(185, 28, 28, 0.22);
|
||
}
|
||
|
||
.game-page .gg-result-high-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12rpx;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.game-page .gg-result-high-badge {
|
||
font-size: 30rpx;
|
||
font-weight: 900;
|
||
color: #fff;
|
||
background: #dc2626;
|
||
padding: 6rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
letter-spacing: 3rpx;
|
||
box-shadow: 0 4rpx 14rpx rgba(220, 38, 38, 0.35);
|
||
}
|
||
|
||
.game-page .gg-result-high-tag {
|
||
font-size: 28rpx;
|
||
font-weight: 800;
|
||
color: #b91c1c;
|
||
padding: 6rpx 16rpx;
|
||
border-radius: 999rpx;
|
||
background: rgba(254, 226, 226, 0.9);
|
||
border: 2rpx solid rgba(220, 38, 38, 0.35);
|
||
}
|
||
|
||
.game-page .gg-result-card.is-high-clear .gg-result-title {
|
||
color: #991b1b;
|
||
}
|
||
|
||
.game-page .gg-result-card.is-high-clear .gg-result-sub {
|
||
color: #7f1d1d;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.game-page .gg-result-stats.is-high-clear {
|
||
background: #fef2f2;
|
||
border: 2rpx solid rgba(220, 38, 38, 0.2);
|
||
}
|
||
|
||
.game-page .gg-result-stat-val.is-high-val {
|
||
color: #dc2626;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
gap: 8rpx;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.game-page .gg-result-inline-badge {
|
||
font-size: 22rpx;
|
||
font-weight: 900;
|
||
color: #fff;
|
||
background: #dc2626;
|
||
padding: 2rpx 10rpx;
|
||
border-radius: 6rpx;
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.game-page .gg-result-btn.is-high-primary {
|
||
background: linear-gradient(135deg, #ef4444, #b91c1c);
|
||
box-shadow: 0 10rpx 28rpx rgba(220, 38, 38, 0.35);
|
||
}
|
||
|
||
.game-page .gg-result-title {
|
||
font-size: 44rpx;
|
||
font-weight: 900;
|
||
color: #161d19;
|
||
margin-bottom: 24rpx;
|
||
}
|
||
|
||
.game-page .gg-result-sub {
|
||
font-size: 34rpx;
|
||
color: #2b3a32;
|
||
margin-bottom: 24rpx;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.game-page .gg-combo-banner {
|
||
position: fixed;
|
||
left: 50%;
|
||
top: 38%;
|
||
transform: translate(-50%, -50%) scale(0.6);
|
||
z-index: 120;
|
||
padding: 20rpx 48rpx;
|
||
border-radius: 999rpx;
|
||
background: linear-gradient(135deg, #fbbf24, #f59e0b);
|
||
color: #fff;
|
||
font-size: 40rpx;
|
||
font-weight: 900;
|
||
text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
|
||
box-shadow: 0 12rpx 40rpx rgba(245, 158, 11, 0.45);
|
||
animation: gg-combo-pop 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.game-page .gg-combo-banner.is-tier-2 {
|
||
background: linear-gradient(135deg, #fb923c, #ea580c);
|
||
font-size: 44rpx;
|
||
}
|
||
|
||
.game-page .gg-combo-banner.is-tier-3 {
|
||
background: linear-gradient(135deg, #f472b6, #db2777);
|
||
font-size: 48rpx;
|
||
box-shadow: 0 16rpx 48rpx rgba(219, 39, 119, 0.5);
|
||
}
|
||
|
||
@keyframes gg-combo-pop {
|
||
0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
|
||
20% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
|
||
70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
|
||
100% { transform: translate(-50%, -60%) scale(0.85); opacity: 0; }
|
||
}
|
||
|
||
.game-page .gg-result-stars {
|
||
display: flex;
|
||
gap: 16rpx;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.game-page .gg-result-star {
|
||
font-size: 56rpx;
|
||
color: #e2e8f0;
|
||
line-height: 1;
|
||
}
|
||
|
||
.game-page .gg-result-star.is-lit {
|
||
color: #fbbf24;
|
||
text-shadow: 0 4rpx 12rpx rgba(251, 191, 36, 0.5);
|
||
}
|
||
|
||
.game-page .gg-result-stats {
|
||
width: 100%;
|
||
margin-bottom: 32rpx;
|
||
padding: 24rpx 32rpx;
|
||
background: #f8faf9;
|
||
border-radius: 24rpx;
|
||
}
|
||
|
||
.game-page .gg-result-stat {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
padding: 10rpx 0;
|
||
}
|
||
|
||
.game-page .gg-result-stat-label {
|
||
font-size: 32rpx;
|
||
color: #475569;
|
||
}
|
||
|
||
.game-page .gg-result-stat-val {
|
||
font-size: 32rpx;
|
||
font-weight: 800;
|
||
color: #161d19;
|
||
}
|
||
|
||
.game-page .gg-result-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 16rpx;
|
||
width: 100%;
|
||
}
|
||
|
||
.game-page .gg-result-btn {
|
||
flex: 1 1 40%;
|
||
min-width: 180rpx;
|
||
padding: 32rpx 0;
|
||
border-radius: 999rpx;
|
||
font-size: 36rpx;
|
||
font-weight: 800;
|
||
text-align: center;
|
||
background: #eef6ee;
|
||
color: #2b3a32;
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.game-page .gg-result-btn.is-primary {
|
||
background: linear-gradient(135deg, #10b981, #006c49);
|
||
color: #fff;
|
||
box-shadow: 0 10rpx 24rpx rgba(0, 108, 73, 0.2);
|
||
}
|
||
|
||
.game-page .gg-result-btn:active {
|
||
transform: scale(0.97);
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.game-page.is-screen-shake,
|
||
.game-page .game-tile.is-hint,
|
||
.game-page .gg-food-card,
|
||
.game-page .gg-combo-banner,
|
||
.game-page .gg-floating-val {
|
||
animation: none !important;
|
||
}
|
||
}
|