284 lines
4.7 KiB
Plaintext
284 lines
4.7 KiB
Plaintext
/* pages/game/index.wxss - 游戏页面样式 */
|
|
|
|
.container {
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: linear-gradient(to bottom, #e8f5e9, #c8e6c9);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 顶部信息栏 */
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
padding: 20rpx;
|
|
background: rgba(76, 175, 80, 0.9);
|
|
color: white;
|
|
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.info-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10rpx;
|
|
}
|
|
|
|
.label {
|
|
font-size: 28rpx;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.value {
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.combo {
|
|
color: #ffeb3b;
|
|
animation: pulse 0.5s ease-in-out infinite alternate;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
from { transform: scale(1); }
|
|
to { transform: scale(1.1); }
|
|
}
|
|
|
|
/* 预览区域 */
|
|
.preview-area {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20rpx;
|
|
background: rgba(255, 255, 255, 0.8);
|
|
border-radius: 20rpx;
|
|
margin: 20rpx;
|
|
}
|
|
|
|
.preview-label {
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.preview-canvas {
|
|
width: 60px;
|
|
height: 60px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
border: 2px solid #4CAF50;
|
|
}
|
|
|
|
/* 游戏画布 */
|
|
.game-canvas {
|
|
flex: 1;
|
|
width: 100%;
|
|
background: rgba(255, 255, 255, 0.5);
|
|
border-top: 4rpx solid #4CAF50;
|
|
border-bottom: 4rpx solid #4CAF50;
|
|
}
|
|
|
|
/* Boss 饱食度条 */
|
|
.boss-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 20rpx;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
margin: 20rpx;
|
|
border-radius: 20rpx;
|
|
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.boss-name {
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
color: #333;
|
|
min-width: 150rpx;
|
|
}
|
|
|
|
.progress-bar {
|
|
flex: 1;
|
|
height: 30rpx;
|
|
background: #e0e0e0;
|
|
border-radius: 15rpx;
|
|
overflow: hidden;
|
|
margin: 0 20rpx;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(to right, #4CAF50, #8BC34A);
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
.progress-text {
|
|
font-size: 28rpx;
|
|
color: #666;
|
|
min-width: 100rpx;
|
|
text-align: right;
|
|
}
|
|
|
|
/* 道具栏 */
|
|
.items-bar {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 30rpx;
|
|
padding: 20rpx;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
}
|
|
|
|
.item-btn {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 15rpx 25rpx;
|
|
background: white;
|
|
border-radius: 15rpx;
|
|
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.item-btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.item-icon {
|
|
font-size: 48rpx;
|
|
margin-bottom: 5rpx;
|
|
}
|
|
|
|
.item-count {
|
|
font-size: 24rpx;
|
|
color: #666;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.item-text {
|
|
font-size: 24rpx;
|
|
color: #4CAF50;
|
|
}
|
|
|
|
/* 暂停按钮 */
|
|
.pause-btn {
|
|
position: absolute;
|
|
top: 20rpx;
|
|
right: 20rpx;
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
border-radius: 50%;
|
|
font-size: 40rpx;
|
|
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.2);
|
|
z-index: 100;
|
|
}
|
|
|
|
/* 结算面板 */
|
|
.result-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 200;
|
|
}
|
|
|
|
.result-content {
|
|
width: 80%;
|
|
max-width: 600rpx;
|
|
background: white;
|
|
border-radius: 30rpx;
|
|
padding: 60rpx 40rpx;
|
|
text-align: center;
|
|
box-shadow: 0 8rpx 16rpx rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.result-title {
|
|
font-size: 48rpx;
|
|
font-weight: bold;
|
|
color: #333;
|
|
margin-bottom: 40rpx;
|
|
}
|
|
|
|
.result-stats {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20rpx;
|
|
margin-bottom: 40rpx;
|
|
}
|
|
|
|
.stat {
|
|
font-size: 32rpx;
|
|
color: #666;
|
|
}
|
|
|
|
.result-buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20rpx;
|
|
}
|
|
|
|
.btn {
|
|
padding: 25rpx;
|
|
border-radius: 15rpx;
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
border: none;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn.primary {
|
|
background: linear-gradient(to right, #4CAF50, #8BC34A);
|
|
color: white;
|
|
}
|
|
|
|
.btn.secondary {
|
|
background: #f5f5f5;
|
|
color: #333;
|
|
}
|
|
|
|
.btn:active {
|
|
transform: scale(0.98);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* 金色传说特效 */
|
|
.golden-effect {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: radial-gradient(circle, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.7));
|
|
padding: 60rpx 100rpx;
|
|
border-radius: 30rpx;
|
|
box-shadow: 0 0 50rpx rgba(255, 215, 0, 0.8);
|
|
z-index: 300;
|
|
animation: goldenGlow 2s ease-in-out infinite;
|
|
}
|
|
|
|
.golden-text {
|
|
font-size: 60rpx;
|
|
font-weight: bold;
|
|
color: white;
|
|
text-shadow: 0 0 20rpx rgba(255, 255, 255, 0.8);
|
|
}
|
|
|
|
@keyframes goldenGlow {
|
|
0%, 100% {
|
|
box-shadow: 0 0 50rpx rgba(255, 215, 0, 0.8);
|
|
transform: translate(-50%, -50%) scale(1);
|
|
}
|
|
50% {
|
|
box-shadow: 0 0 80rpx rgba(255, 215, 0, 1);
|
|
transform: translate(-50%, -50%) scale(1.05);
|
|
}
|
|
}
|