|
@@ -1,166 +1,254 @@
|
|
|
/* game.page.scss */
|
|
|
-/* card*/
|
|
|
-.card {
|
|
|
- position: relative;
|
|
|
- width: 190px;
|
|
|
- height: 254px;
|
|
|
- background-color: #000;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: end;
|
|
|
- padding: 12px;
|
|
|
- gap: 12px;
|
|
|
- border-radius: 8px;
|
|
|
- cursor: pointer;
|
|
|
-}
|
|
|
-
|
|
|
-.card::before {
|
|
|
- content: '';
|
|
|
- position: absolute;
|
|
|
- inset: 0;
|
|
|
- left: -5px;
|
|
|
- margin: auto;
|
|
|
- width: 200px;
|
|
|
- height: 264px;
|
|
|
- border-radius: 10px;
|
|
|
- background: linear-gradient(-45deg, #e81cff 0%, #40c9ff 100% );
|
|
|
- z-index: -10;
|
|
|
- pointer-events: none;
|
|
|
- transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
|
-}
|
|
|
-
|
|
|
-.card::after {
|
|
|
- content: "";
|
|
|
- z-index: -1;
|
|
|
- position: absolute;
|
|
|
- inset: 0;
|
|
|
- background: linear-gradient(-45deg, #fc00ff 0%, #00dbde 100% );
|
|
|
- transform: translate3d(0, 0, 0) scale(0.95);
|
|
|
- filter: blur(20px);
|
|
|
-}
|
|
|
-
|
|
|
-.heading {
|
|
|
- font-size: 20px;
|
|
|
- text-transform: capitalize;
|
|
|
- font-weight: 700;
|
|
|
-}
|
|
|
-
|
|
|
-.card p:not(.heading) {
|
|
|
- font-size: 14px;
|
|
|
-}
|
|
|
-
|
|
|
-.card p:last-child {
|
|
|
- color: #e81cff;
|
|
|
- font-weight: 600;
|
|
|
+.game-container {
|
|
|
+ --background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
|
|
|
+ padding-top: 12px;
|
|
|
}
|
|
|
|
|
|
-.card:hover::after {
|
|
|
- filter: blur(30px);
|
|
|
+/* 情绪状态卡片 */
|
|
|
+.mood-card {
|
|
|
+ display: flex;
|
|
|
+ background: white;
|
|
|
+ border-radius: 16px;
|
|
|
+ margin: 0 16px 20px;
|
|
|
+ box-shadow: 0 4px 12px rgba(192, 108, 132, 0.1);
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ .mood-visual {
|
|
|
+ width: 30%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
|
|
|
+
|
|
|
+ .mood-score {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: white;
|
|
|
+ text-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .mood-info {
|
|
|
+ width: 70%;
|
|
|
+ padding: 12px;
|
|
|
+
|
|
|
+ h3 {
|
|
|
+ margin: 0 0 8px;
|
|
|
+ color: #495057;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ p {
|
|
|
+ margin: 0 0 8px;
|
|
|
+ color: #6c757d;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ ion-chip {
|
|
|
+ height: 24px;
|
|
|
+ font-size: 12px;
|
|
|
+ margin: 4px 4px 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-.card:hover::before {
|
|
|
- transform: rotate(-90deg) scaleX(1.34) scaleY(0.77);
|
|
|
+/* 游戏卡片列表 */
|
|
|
+.game-cards {
|
|
|
+ padding: 0 16px;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-.game-container {
|
|
|
- --game-primary: #FF9A9E;
|
|
|
- --game-secondary: #A8EDEA;
|
|
|
- --game-accent: #6C5B7B;
|
|
|
+.game-card {
|
|
|
+ background: white;
|
|
|
+ border-radius: 12px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ overflow: hidden;
|
|
|
+ box-shadow: 0 2px 8px rgba(0,0,0,0.08);
|
|
|
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
|
|
|
|
- height: 100vh;
|
|
|
+ &:active {
|
|
|
+ transform: scale(0.98);
|
|
|
+ }
|
|
|
+
|
|
|
+ .game-preview {
|
|
|
+ height: 120px;
|
|
|
+ position: relative;
|
|
|
overflow: hidden;
|
|
|
+ }
|
|
|
|
|
|
- .game-mode-switch {
|
|
|
+ /* 捏泡泡预览效果 */
|
|
|
+ .bubble-preview {
|
|
|
+ background: linear-gradient(45deg, #f6f7f9 0%, #e9ecef 100%);
|
|
|
+
|
|
|
+ .bubble {
|
|
|
position: absolute;
|
|
|
- top: 16px;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- z-index: 10;
|
|
|
- width: 80%;
|
|
|
- max-width: 400px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: rgba(192, 108, 132, 0.6);
|
|
|
+ animation: float 4s infinite ease-in-out;
|
|
|
+
|
|
|
+ @for $i from 1 through 8 {
|
|
|
+ &:nth-child(#{$i}) {
|
|
|
+ width: 20px + random(30);
|
|
|
+ height: 20px + random(30);
|
|
|
+ left: random(80) + '%';
|
|
|
+ top: random(80) + '%';
|
|
|
+ animation-delay: $i * 0.5s;
|
|
|
+ background: rgba(192 - $i*10, 108 + $i*5, 132 - $i*3, 0.6);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- ion-segment {
|
|
|
- --background: #ff9a9e;
|
|
|
- backdrop-filter: blur(10px);
|
|
|
- height: 40px;
|
|
|
+ /* 沙画预览效果 */
|
|
|
+ .sand-preview {
|
|
|
+ background: #f8f9fa;
|
|
|
+
|
|
|
+ .sand-trail {
|
|
|
+ position: absolute;
|
|
|
+ width: 80%;
|
|
|
+ height: 3px;
|
|
|
+ background: #d4b483;
|
|
|
+ top: 50%;
|
|
|
+ left: 10%;
|
|
|
+ border-radius: 3px;
|
|
|
+
|
|
|
+ &::before, &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 60%;
|
|
|
+ height: 3px;
|
|
|
+ background: inherit;
|
|
|
+ border-radius: inherit;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ top: -20px;
|
|
|
+ left: 20%;
|
|
|
+ transform: rotate(20deg);
|
|
|
}
|
|
|
|
|
|
+ &::after {
|
|
|
+ top: 20px;
|
|
|
+ left: 10%;
|
|
|
+ transform: rotate(-15deg);
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .canvas-container {
|
|
|
- width: 100%;
|
|
|
- height: calc(100% - 60px);
|
|
|
- touch-action: none;
|
|
|
+ /* 雨滴预览效果 */
|
|
|
+ .raindrop-preview {
|
|
|
+ background: linear-gradient(180deg, #e0f7fa 0%, #b2ebf2 100%);
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .raindrop {
|
|
|
+ position: absolute;
|
|
|
+ width: 6px;
|
|
|
+ height: 12px;
|
|
|
+ background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(178,235,242,0.6) 100%);
|
|
|
+ border-radius: 50% 50% 60% 60%;
|
|
|
+ animation: fall 3s linear infinite;
|
|
|
+
|
|
|
+ @for $i from 1 through 6 {
|
|
|
+ &:nth-child(#{$i}) {
|
|
|
+ left: 15% + $i * 12%;
|
|
|
+ top: -20px;
|
|
|
+ animation-delay: $i * 0.3s;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- .game-panel {
|
|
|
+
|
|
|
+ .ripple {
|
|
|
position: absolute;
|
|
|
- bottom: 20px;
|
|
|
- left: 20px;
|
|
|
- right: 20px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- padding: 12px 20px;
|
|
|
- background: rgba(255,255,255,0.9);
|
|
|
- border-radius: 30px;
|
|
|
- backdrop-filter: blur(8px);
|
|
|
-
|
|
|
- .score-board {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- gap: 8px;
|
|
|
- color: var(--game-accent);
|
|
|
- font-weight: 500;
|
|
|
-
|
|
|
- ion-icon {
|
|
|
- color: #FFD700;
|
|
|
- font-size: 24px;
|
|
|
+ border: 1px solid rgba(255,255,255,0.6);
|
|
|
+ border-radius: 50%;
|
|
|
+ animation: spread 2s ease-out infinite;
|
|
|
+
|
|
|
+ @for $i from 1 through 3 {
|
|
|
+ &:nth-child(#{$i + 6}) {
|
|
|
+ width: 10px * $i;
|
|
|
+ height: 10px * $i;
|
|
|
+ left: 40%;
|
|
|
+ top: 70%;
|
|
|
+ animation-delay: $i * 0.5s;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .achievement-toast {
|
|
|
- position: fixed;
|
|
|
- top: -60px;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- background: rgba(0,0,0,0.8);
|
|
|
- color: white;
|
|
|
- padding: 12px 24px;
|
|
|
- border-radius: 30px;
|
|
|
+ @keyframes fall {
|
|
|
+ 0% { transform: translateY(-20px) scale(0.8); opacity: 0; }
|
|
|
+ 20% { opacity: 1; }
|
|
|
+ 80% { opacity: 0.8; }
|
|
|
+ 100% { transform: translateY(120px) scale(0.9); opacity: 0; }
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes spread {
|
|
|
+ 0% { transform: scale(0.5); opacity: 1; }
|
|
|
+ 100% { transform: scale(3); opacity: 0; }
|
|
|
+ }
|
|
|
+ .game-info {
|
|
|
+ padding: 12px;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ background: linear-gradient(
|
|
|
+ to top,
|
|
|
+ rgba(255, 255, 255, 0) 0%,
|
|
|
+ rgba(255, 255, 255, 0.85) 50%,
|
|
|
+ rgba(255, 255, 255, 0.9) 100%
|
|
|
+ );
|
|
|
+
|
|
|
+ h3 {
|
|
|
+ margin: 0 0 4px;
|
|
|
+ color: #343a40;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+
|
|
|
+ p {
|
|
|
+ margin: 0 0 8px;
|
|
|
+ color: #6c757d;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .game-meta {
|
|
|
display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- gap: 8px;
|
|
|
- transition: top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
|
-
|
|
|
- &.show {
|
|
|
- top: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- ion-icon {
|
|
|
- color: #FFD700;
|
|
|
+
|
|
|
+ .duration {
|
|
|
+ font-size: 12px;
|
|
|
+ //color: #adb5bd;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+/* 浮动推荐 */
|
|
|
+.floating-recommendation {
|
|
|
+ position: fixed;
|
|
|
+ bottom: 80px;
|
|
|
+ left: 16px;
|
|
|
+ right: 16px;
|
|
|
+ background: white;
|
|
|
+ border-radius: 12px;
|
|
|
+ padding: 12px 16px;
|
|
|
+ box-shadow: 0 4px 16px rgba(0,0,0,0.1);
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 10;
|
|
|
|
|
|
- /* 泡泡爆破动画 */
|
|
|
- @keyframes pop {
|
|
|
- 0% { transform: scale(1); opacity: 1; }
|
|
|
- 100% { transform: scale(1.5); opacity: 0; }
|
|
|
+ p {
|
|
|
+ margin: 0;
|
|
|
+ color: #495057;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ strong {
|
|
|
+ color: #c06c84;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-ion-icon[name^="volume"] {
|
|
|
-transition: transform 0.3s ease;
|
|
|
-
|
|
|
-&[name="volume-mute"] {
|
|
|
- animation: shake 0.5s ease;
|
|
|
-}
|
|
|
}
|
|
|
|
|
|
-@keyframes shake {
|
|
|
-0%, 100% { transform: translateX(0); }
|
|
|
-25% { transform: translateX(-3px); }
|
|
|
-75% { transform: translateX(3px); }
|
|
|
+/* 动画 */
|
|
|
+@keyframes float {
|
|
|
+ 0%, 100% { transform: translateY(0) scale(1); }
|
|
|
+ 50% { transform: translateY(-10px) scale(1.05); }
|
|
|
}
|