huaanglimeng/pages/index/index.wxss

279 lines
4.8 KiB
Plaintext
Raw Normal View History

2026-01-31 22:02:01 +08:00
/* 让整个页面背景变黑,制造神秘感 */
page {
background-color: #1a1a2e; /*以此颜色为底 */
min-height: 100%; /* 使用 min-height 允许滚动 */
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
/* 去掉 justify-content: center防止内容过多时顶部被裁切 */
min-height: 100%;
padding: 15px; /* 减小内边距 */
padding-bottom: 40px; /* 底部预留空间,防止按钮太靠底 */
box-sizing: border-box;
}
/* 标题区域 */
.title-area {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px; /* 减小间距 */
margin-top: 10px;
}
.app-title {
font-size: 24px; /* 减小字号 */
color: #e94560;
font-weight: bold;
letter-spacing: 2px;
margin-bottom: 5px;
}
.app-subtitle {
display: block;
font-size: 16px; /* 减小字号 */
color: #fff;
margin-bottom: 5px;
font-weight: bold;
}
/* 引导区域 */
2026-01-31 22:02:01 +08:00
.intro {
text-align: center;
margin-bottom: 30px;
display: flex;
flex-direction: column;
align-items: center;
}
.deck-container {
position: relative;
width: 160px;
margin-bottom: 30px;
}
.card-deck {
width: 100%;
border-radius: 8px;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.tap-hint {
position: absolute;
bottom: -25px;
left: 0;
right: 0;
color: #e94560;
font-size: 12px;
opacity: 0.8;
letter-spacing: 1px;
}
.guide-text {
margin-top: 20px;
height: 40px;
2026-01-31 22:02:01 +08:00
}
.instruction {
display: block;
color: #fff;
font-size: 16px;
letter-spacing: 1px;
font-weight: 300;
2026-01-31 22:02:01 +08:00
}
/* 卡牌展示出的框框 */
.card-display {
display: flex;
flex-direction: column;
align-items: center;
background-color: #16213e;
padding: 15px; /* 减小内边距 */
border-radius: 12px;
box-shadow: 0 0 15px rgba(233, 69, 96, 0.3);
margin-bottom: 20px; /* 减小间距 */
}
/* --- 翻牌动画核心样式 --- */
/* 1. 场景容器:提供 3D 景深 */
.flip-scene {
width: 200px;
height: 333px;
2026-01-31 22:02:01 +08:00
perspective: 1000px;
margin-bottom: 20px;
position: relative;
2026-01-31 22:02:01 +08:00
}
/* 2. 翻转实体:包含正反两面,执行旋转 */
.flip-card {
width: 100%;
height: 100%;
position: relative;
transition: transform 0.5s ease-in-out;
2026-01-31 22:02:01 +08:00
transform-style: preserve-3d;
}
/* 翻转状态 */
2026-01-31 22:02:01 +08:00
.flip-card.flipped {
transform: rotateY(180deg);
2026-01-31 22:02:01 +08:00
}
/* 3. 正反面公共样式 */
.card-face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
2026-01-31 22:02:01 +08:00
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 12px;
overflow: hidden;
2026-01-31 22:02:01 +08:00
}
/* 背面 */
2026-01-31 22:02:01 +08:00
.face-back {
background-color: #16213e;
transform: rotateY(0deg);
z-index: 2;
}
/* 正面 */
2026-01-31 22:02:01 +08:00
.face-front {
background-color: #16213e;
transform: rotateY(180deg);
}
/* 图片填满容器 */
.card-image {
width: 100%;
height: 100%;
display: block;
2026-01-31 22:02:01 +08:00
}
/* 提示点击的文字 */
.hint-text {
position: absolute;
bottom: 20px;
color: #fff;
font-size: 14px;
background-color: rgba(0,0,0,0.5);
padding: 5px 10px;
border-radius: 15px;
z-index: 3;
}
/* --- 文字信息层级样式 --- */
2026-01-31 22:02:01 +08:00
.card-info {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 10px;
2026-01-31 22:02:01 +08:00
}
.info-header {
margin-bottom: 15px;
display: flex;
align-items: baseline;
2026-01-31 22:02:01 +08:00
}
.card-name {
color: #fff;
font-size: 22px;
font-weight: bold;
}
.card-pos {
2026-01-31 22:02:01 +08:00
color: #e94560;
font-size: 14px;
margin-left: 8px;
}
.keyword-area {
margin-bottom: 20px;
}
.keyword-tag {
background: rgba(233, 69, 96, 0.15);
color: #e94560;
padding: 6px 16px;
border-radius: 20px;
font-size: 18px;
2026-01-31 22:02:01 +08:00
font-weight: bold;
border: 1px solid rgba(233, 69, 96, 0.3);
2026-01-31 22:02:01 +08:00
}
.core-meaning {
2026-01-31 22:02:01 +08:00
color: #fff;
font-size: 16px;
font-weight: 500;
2026-01-31 22:02:01 +08:00
text-align: center;
margin-bottom: 15px;
line-height: 1.6;
padding: 0 20px;
2026-01-31 22:02:01 +08:00
}
.detail-explanation {
background: rgba(255, 255, 255, 0.05);
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
width: 100%;
}
.explanation-text {
color: #aaa;
font-size: 13px;
text-align: justify;
line-height: 1.5;
}
/* 按钮美化 */
2026-01-31 22:02:01 +08:00
.draw-btn {
margin-top: 40px;
width: 80% !important;
background-color: #e94560 !important;
border-radius: 25px !important;
font-weight: bold !important;
box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
2026-01-31 22:02:01 +08:00
font-size: 16px !important;
padding: 8px 0 !important;
}
/* 逆位时的图片样式 */
2026-01-31 22:02:01 +08:00
.card-image.reversed {
transform: rotate(180deg);
transition: transform 0.5s;
}
/* AI 加载状态 */
.loading-ai {
display: flex;
flex-direction: column;
align-items: center;
color: #666;
font-size: 12px;
padding: 10px 0;
}
@keyframes flash {
0%, 100% { opacity: 0.3; }
50% { opacity: 1; }
}
.loading-dot {
font-size: 24px;
color: #e94560;
margin-bottom: 5px;
animation: flash 1.5s infinite;
}