This commit is contained in:
Your Name
2026-06-02 18:33:25 +08:00
parent 62f74888f3
commit 15e9c486f9
11 changed files with 731 additions and 674 deletions
+136 -230
View File
@@ -93,11 +93,10 @@
}
.game-page .gg-hud-level-text {
font-size: 24rpx;
font-size: 30rpx;
font-weight: 800;
color: #64748b;
color: #475569;
line-height: 1.1;
text-transform: uppercase;
letter-spacing: 1rpx;
}
@@ -108,7 +107,7 @@
}
.game-page .gg-hud-score-val {
font-size: 30rpx;
font-size: 42rpx;
font-weight: 900;
color: #006c49;
font-variant-numeric: tabular-nums;
@@ -120,34 +119,9 @@
}
.game-page .gg-hud-score-unit {
font-size: 18rpx;
font-size: 26rpx;
font-weight: 700;
color: #94a3b8;
}
.game-page .gg-hud-mult {
font-size: 16rpx;
font-weight: 900;
color: #fff;
background: linear-gradient(135deg, #f59e0b, #ea580c);
padding: 1rpx 8rpx;
border-radius: 999rpx;
line-height: 1.2;
margin-left: 4rpx;
}
.game-page .gg-hud-streak {
display: flex;
align-items: center;
gap: 4rpx;
padding: 6rpx 14rpx;
border-radius: 999rpx;
background: rgba(254, 243, 199, 0.8);
border: 1rpx solid rgba(245, 158, 11, 0.15);
font-size: 20rpx;
font-weight: 800;
color: #ea580c;
transition: all 0.2s ease;
color: #64748b;
}
/* 核心三栏面板 */
@@ -194,7 +168,7 @@
}
.game-page .gg-glucose-value {
font-size: 28rpx;
font-size: 34rpx;
font-weight: 900;
color: #0f172a;
line-height: 1;
@@ -217,13 +191,13 @@
}
.game-page .gg-glucose-title {
font-size: 22rpx;
font-size: 28rpx;
font-weight: 800;
color: #475569;
color: #334155;
}
.game-page .gg-glucose-status {
font-size: 20rpx;
font-size: 26rpx;
font-weight: 800;
color: #006c49;
padding: 2rpx 12rpx;
@@ -322,7 +296,7 @@
}
.game-page .gg-meter-legend text {
font-size: 16rpx;
font-size: 22rpx;
font-weight: 700;
}
@@ -351,42 +325,21 @@
transition: all 0.3s ease;
}
.game-page .gg-dash-moves.is-warn {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(185, 28, 28, 0.15));
border-color: rgba(239, 68, 68, 0.3);
animation: gg-moves-pulse 1.2s ease-in-out infinite alternate;
}
.game-page .gg-moves-label {
font-size: 20rpx;
font-size: 26rpx;
font-weight: 800;
color: #64748b;
color: #475569;
margin-bottom: 2rpx;
}
.game-page .gg-moves-val {
font-size: 40rpx;
font-size: 48rpx;
font-weight: 900;
color: #006c49;
font-variant-numeric: tabular-nums;
line-height: 1.1;
}
.game-page .gg-dash-moves.is-warn .gg-moves-val {
color: #dc2626;
}
@keyframes gg-moves-pulse {
from {
transform: scale(1);
box-shadow: 0 0 8rpx rgba(239, 68, 68, 0.2);
}
to {
transform: scale(1.04);
box-shadow: 0 0 16rpx rgba(239, 68, 68, 0.45);
}
}
/* 右侧:关卡目标 */
.game-page .gg-dash-mission {
flex: 1.2;
@@ -410,13 +363,13 @@
}
.game-page .gg-mission-title {
font-size: 22rpx;
font-size: 28rpx;
font-weight: 800;
color: #475569;
color: #334155;
}
.game-page .gg-mission-pct {
font-size: 20rpx;
font-size: 26rpx;
font-weight: 800;
color: #006c49;
font-variant-numeric: tabular-nums;
@@ -459,8 +412,8 @@
}
.game-page .gg-goal-icon-wrap {
width: 32rpx;
height: 32rpx;
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
@@ -494,9 +447,9 @@
}
.game-page .gg-goal-chip-text {
font-size: 18rpx;
font-size: 26rpx;
font-weight: 800;
color: #475569;
color: #334155;
font-variant-numeric: tabular-nums;
line-height: 1;
}
@@ -534,51 +487,26 @@
}
.game-page .gg-hint-tag {
font-size: 16rpx;
font-size: 24rpx;
font-weight: 800;
color: #ffffff;
background: #006c49;
padding: 2rpx 8rpx;
border-radius: 6rpx;
padding: 4rpx 14rpx;
border-radius: 8rpx;
flex-shrink: 0;
line-height: 1.2;
line-height: 1.3;
}
.game-page .gg-board-hint-text {
font-size: 20rpx;
font-size: 28rpx;
font-weight: 700;
color: #475569;
line-height: 1.2;
color: #334155;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.game-page .gg-board-hint-bar .gg-digest-pill {
flex-shrink: 0;
background: linear-gradient(135deg, #ea580c, #c2410c);
border-radius: 999rpx;
padding: 6rpx 14rpx;
display: flex;
align-items: center;
gap: 6rpx;
box-shadow: 0 4rpx 10rpx rgba(234, 88, 12, 0.15);
}
.game-page .gg-board-hint-bar .gg-digest-num {
font-size: 24rpx;
font-weight: 900;
color: #ffffff;
line-height: 1;
}
.game-page .gg-board-hint-bar .gg-digest-label {
font-size: 16rpx;
font-weight: 700;
color: rgba(255, 255, 255, 0.9);
}
/* 棋盘上方升糖告急条 — 浮层,不占文档流 */
.game-page .gg-board-stack {
display: flex;
flex-direction: column;
@@ -591,47 +519,6 @@
width: 100%;
}
.game-page .gg-digest-urge-bar {
position: absolute;
left: 0;
right: 0;
top: 0;
z-index: 30;
display: flex;
align-items: center;
gap: 10rpx;
padding: 14rpx 20rpx;
border-radius: 24rpx;
background: linear-gradient(135deg, #ef4444, #b91c1c);
box-shadow: 0 6rpx 20rpx rgba(185, 28, 28, 0.35);
box-sizing: border-box;
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translateY(calc(-100% - 10rpx));
transition: opacity 0.22s ease, visibility 0.22s ease;
}
.game-page .gg-digest-urge-bar.is-show {
opacity: 1;
visibility: visible;
animation: gg-digest-urge-fade 1.1s ease-in-out infinite alternate;
}
.game-page .gg-digest-urge-text {
flex: 1;
min-width: 0;
font-size: 22rpx;
font-weight: 700;
color: #fff;
line-height: 1.35;
}
@keyframes gg-digest-urge-fade {
from { opacity: 0.82; }
to { opacity: 1; }
}
/* ===== Main / Board ===== */
.game-page .gg-main {
position: fixed;
@@ -666,9 +553,9 @@
}
.game-page .gg-no-move-tip-text {
font-size: 22rpx;
font-size: 28rpx;
font-weight: 600;
color: #ea580c;
color: #c2410c;
}
.game-page .gg-board-wrap {
@@ -959,6 +846,92 @@
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; }
/* ===== 点击食物的大字科普卡 ===== */
.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;
@@ -967,43 +940,10 @@
z-index: 100;
}
.game-page .food-tooltip {
position: absolute;
font-weight: 700;
font-size: 26rpx;
padding: 12rpx 24rpx;
border-radius: 24rpx;
background: #fff;
color: #161c28;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
border: 1rpx solid #f1f3ff;
display: flex;
align-items: center;
gap: 12rpx;
white-space: nowrap;
transform: translateX(-50%);
animation: gg-tooltip-in 1.5s ease-out forwards;
}
.game-page .gi-badge {
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 12rpx;
color: #fff;
font-weight: 800;
}
@keyframes gg-tooltip-in {
0% { transform: translate(-50%, 0) scale(0.8); opacity: 0; }
15% { transform: translate(-50%, -35px) scale(1.05); opacity: 1; }
85% { transform: translate(-50%, -40px) scale(1); opacity: 1; }
100% { transform: translate(-50%, -50px) scale(0.9); opacity: 0; }
}
.game-page .gg-floating-val {
position: absolute;
font-weight: 800;
font-size: 36rpx;
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;
@@ -1043,8 +983,8 @@
display: flex;
flex-direction: column;
align-items: center;
padding: 16rpx 0;
width: 152rpx;
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;
@@ -1067,11 +1007,11 @@
position: absolute;
top: -10rpx;
right: -10rpx;
width: 48rpx;
height: 48rpx;
width: 52rpx;
height: 52rpx;
border-radius: 50%;
color: #fff;
font-size: 24rpx;
font-size: 30rpx;
font-weight: 900;
display: flex;
align-items: center;
@@ -1095,9 +1035,9 @@
}
.game-page .gg-booster-label {
font-size: 24rpx;
font-size: 30rpx;
font-weight: 700;
color: #3c4a42;
color: #2b3a32;
}
/* ===== Result overlay ===== */
@@ -1135,10 +1075,10 @@
}
.game-page .gg-result-sub {
font-size: 30rpx;
color: #3c4a42;
font-size: 34rpx;
color: #2b3a32;
margin-bottom: 24rpx;
line-height: 1.5;
line-height: 1.6;
}
.game-page .gg-combo-banner {
@@ -1177,41 +1117,6 @@
100% { transform: translate(-50%, -60%) scale(0.85); opacity: 0; }
}
.game-page .gg-urge-toast {
position: fixed;
left: 50%;
bottom: 280rpx;
transform: translateX(-50%);
z-index: 90;
padding: 20rpx 36rpx;
border-radius: 999rpx;
font-size: 28rpx;
font-weight: 800;
color: #fff;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.15);
animation: gg-urge-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
pointer-events: none;
max-width: 86vw;
text-align: center;
}
.game-page .gg-urge-toast.is-warm {
background: linear-gradient(135deg, #10b981, #006c49);
}
.game-page .gg-urge-toast.is-hot {
background: linear-gradient(135deg, #f59e0b, #ea580c);
}
.game-page .gg-urge-toast.is-warn {
background: linear-gradient(135deg, #ef4444, #b91c1c);
}
@keyframes gg-urge-in {
from { transform: translateX(-50%) translateY(20rpx); opacity: 0; }
to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.game-page .gg-result-stars {
display: flex;
gap: 16rpx;
@@ -1244,12 +1149,12 @@
}
.game-page .gg-result-stat-label {
font-size: 26rpx;
color: #64748b;
font-size: 32rpx;
color: #475569;
}
.game-page .gg-result-stat-val {
font-size: 26rpx;
font-size: 32rpx;
font-weight: 800;
color: #161d19;
}
@@ -1263,14 +1168,14 @@
.game-page .gg-result-btn {
flex: 1 1 40%;
min-width: 160rpx;
padding: 28rpx 0;
min-width: 180rpx;
padding: 32rpx 0;
border-radius: 999rpx;
font-size: 30rpx;
font-size: 36rpx;
font-weight: 800;
text-align: center;
background: #eef6ee;
color: #3c4a42;
color: #2b3a32;
transition: all 0.2s;
}
@@ -1287,7 +1192,8 @@
@media (prefers-reduced-motion: reduce) {
.game-page.is-screen-shake,
.game-page .game-tile.is-hint,
.game-page .food-tooltip,
.game-page .gg-food-card,
.game-page .gg-combo-banner,
.game-page .gg-floating-val {
animation: none !important;
}
@@ -108,6 +108,12 @@
color: var(--on-primary);
}
/* ===== 居家训练(DEV 内嵌,与 user 页同源入口) ===== */
.weekly-page .st-training-module {
padding: 10rpx var(--st-container-margin);
margin: -10rpx -30rpx 10rpx -30rpx;
}
/* ===== Main ===== */
.weekly-page .st-main {
padding: 0 var(--st-container-margin) 32rpx;
@@ -196,23 +202,28 @@
/* ===== Chart card — rounded-3xl ===== */
.weekly-page .st-chart-card {
padding: 40rpx;
padding: 40rpx 10rpx 40rpx 10rpx;
border-radius: 48rpx;
background: var(--surface-container-lowest);
border: 1rpx solid rgba(221, 228, 221, 0.3);
box-shadow: var(--st-shadow-ambient);
display: flex;
flex-direction: column;
gap: 0;
overflow: hidden;
}
.weekly-page .st-chart-head {
display: flex;
align-items: flex-start;
align-items: center;
justify-content: space-between;
margin-bottom: 48rpx;
margin-bottom: 12rpx;
gap: 16rpx;
}
.weekly-page .st-chart-title {
display: block;
font-size: 40rpx;
font-size: 30rpx;
font-weight: 700;
color: var(--on-surface);
}
@@ -220,7 +231,7 @@
.weekly-page .st-chart-sub {
display: block;
margin-top: 4rpx;
font-size: 24rpx;
font-size: 22rpx;
font-weight: 600;
color: var(--on-surface-variant);
}
@@ -229,11 +240,11 @@
display: inline-flex;
align-items: center;
gap: 4rpx;
margin-top: 12rpx;
margin-top: 6rpx;
}
.weekly-page .st-chart-more-text {
font-size: 26rpx;
font-size: 22rpx;
font-weight: 600;
color: var(--primary);
}
@@ -315,10 +326,29 @@
color: var(--on-surface-variant);
}
.weekly-page .st-chart-foot {
padding: 20rpx 0 20rpx;
}
.weekly-page .st-chart-mock-hint {
display: block;
margin: 0;
font-size: 30rpx;
font-weight: 600;
color: var(--outline);
line-height: 1.35;
text-align: center;
}
.weekly-page .st-chart-area {
position: relative;
height: 360rpx;
border-bottom: 1rpx dashed var(--surface-container-highest);
overflow: hidden;
cursor: pointer;
}
.weekly-page .st-chart-area:active {
opacity: 0.92;
}
.weekly-page .st-chart-canvas {
@@ -327,6 +357,31 @@
display: block;
}
/* 识糖入口嵌在趋势卡内:轻量分隔,避免大块留白 */
.weekly-page .st-chart-card .st-game-entry--in-card {
margin-top: 12rpx;
padding: 16rpx 20rpx;
gap: 16rpx;
border-radius: 24rpx;
background: var(--surface-container-low);
border: 1rpx solid rgba(0, 108, 73, 0.08);
box-shadow: none;
}
.weekly-page .st-chart-card .st-game-entry--in-card .st-game-entry-icon {
width: 64rpx;
height: 64rpx;
border-radius: 16rpx;
}
.weekly-page .st-chart-card .st-game-entry--in-card .st-game-entry-title {
font-size: 28rpx;
}
.weekly-page .st-chart-card .st-game-entry--in-card .st-game-entry-sub {
font-size: 22rpx;
}
.weekly-page .st-chart-empty,
.weekly-page .st-chart-placeholder {
position: absolute;
@@ -790,6 +845,8 @@
justify-content: center;
flex-shrink: 0;
box-shadow: 0 4rpx 12rpx rgba(0, 108, 73, 0.2);
line-height: 0;
overflow: hidden;
}
.weekly-page .st-float-send.disabled {