Files
JianSu-Naming/miniprogram/pages/index/index.wxss

620 lines
10 KiB
Plaintext
Raw Normal View History

/* 容器 */
.container {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #FAFAFA;
position: relative;
overflow: hidden;
2026-04-16 11:25:29 +08:00
}
/* 意境感加载页 */
.loading-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
2026-04-16 11:25:29 +08:00
height: 100%;
background: linear-gradient(135deg, #FAFAFA 0%, #F5F5F5 100%);
z-index: 100;
2026-04-16 11:25:29 +08:00
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: all 0.4s ease;
2026-04-16 11:25:29 +08:00
}
.loading-container.visible {
opacity: 1;
visibility: visible;
}
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 40rpx;
}
.loading-circle {
width: 80rpx;
height: 80rpx;
border: 4rpx solid #E8E8E8;
border-top-color: #2D2D2D;
border-radius: 50%;
animation: rotate 1s linear infinite;
}
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.loading-text {
font-family: "Noto Serif SC", serif;
font-size: 32rpx;
color: #4A4A4A;
letter-spacing: 8rpx;
animation: fadeInOut 2s ease-in-out infinite;
}
.loading-subtext {
font-size: 24rpx;
color: #A0A0A0;
letter-spacing: 4rpx;
}
@keyframes fadeInOut {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
/* 顶部标题 */
.header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 40rpx;
z-index: 10;
}
.back-btn {
font-size: 36rpx;
color: #A0A0A0;
padding: 20rpx;
margin-left: -20rpx;
}
.header-title {
font-family: "Noto Serif SC", serif;
font-size: 28rpx;
color: #2D2D2D;
letter-spacing: 4rpx;
}
.header-spacer {
width: 76rpx;
}
/* 卡片堆叠区域 */
2026-04-16 11:25:29 +08:00
.card-stack {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 0 40rpx;
2026-04-16 11:25:29 +08:00
position: relative;
}
.card-container {
width: 100%;
max-width: 600rpx;
aspect-ratio: 3/4;
perspective: 1000px;
2026-04-16 11:25:29 +08:00
}
.card {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.card.flipped {
transform: rotateY(180deg);
}
2026-04-16 11:25:29 +08:00
.card-face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
background: #FFFFFF;
border-radius: 24rpx;
box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.08);
2026-04-16 11:25:29 +08:00
display: flex;
flex-direction: column;
padding: 60rpx;
box-sizing: border-box;
}
.card-face.front {
align-items: center;
justify-content: center;
2026-04-16 11:25:29 +08:00
}
.card-face.back {
2026-04-16 11:25:29 +08:00
transform: rotateY(180deg);
justify-content: space-between;
2026-04-16 11:25:29 +08:00
}
.name {
font-family: "Noto Serif SC", serif;
font-size: 96rpx;
2026-04-16 11:25:29 +08:00
color: #2D2D2D;
letter-spacing: 16rpx;
margin-bottom: 40rpx;
2026-04-16 11:25:29 +08:00
}
.poem-container {
text-align: center;
}
.poem {
font-family: "Noto Serif SC", serif;
font-size: 28rpx;
color: #666666;
line-height: 2;
letter-spacing: 4rpx;
2026-04-16 11:25:29 +08:00
}
.desc-container {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
2026-04-16 11:25:29 +08:00
}
.desc {
2026-04-16 11:25:29 +08:00
font-size: 28rpx;
color: #4A4A4A;
line-height: 2;
2026-04-16 11:25:29 +08:00
text-align: justify;
letter-spacing: 2rpx;
}
.analysis-container {
display: flex;
flex-direction: column;
gap: 20rpx;
align-items: center;
2026-04-16 11:25:29 +08:00
}
.tone-tag, .score-tag {
font-size: 22rpx;
color: #888888;
2026-04-16 11:25:29 +08:00
letter-spacing: 2rpx;
}
.save-btn {
margin-top: 20rpx;
padding: 16rpx 40rpx;
background: #F5F5F5;
border-radius: 30rpx;
2026-04-16 11:25:29 +08:00
display: flex;
align-items: center;
gap: 8rpx;
font-size: 24rpx;
color: #666666;
2026-04-16 11:25:29 +08:00
transition: all 0.2s;
}
.save-btn:active {
background: #E8E8E8;
2026-04-16 11:25:29 +08:00
}
.save-icon {
font-size: 28rpx;
2026-04-16 11:25:29 +08:00
}
/* 底部操作栏 */
.action-bar {
display: flex;
justify-content: center;
gap: 80rpx;
padding: 60rpx 40rpx;
z-index: 10;
2026-04-16 11:25:29 +08:00
}
.action-btn {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 48rpx;
transition: all 0.2s;
box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.1);
2026-04-16 11:25:29 +08:00
}
.action-btn.dislike-btn {
background: #FFFFFF;
color: #888888;
2026-04-16 11:25:29 +08:00
}
.action-btn.like-btn {
background: #2D2D2D;
color: #FFFFFF;
}
.action-btn:active {
transform: scale(0.9);
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 60vh;
}
.empty-state text {
font-size: 28rpx;
color: #A0A0A0;
2026-04-16 11:25:29 +08:00
letter-spacing: 4rpx;
margin-bottom: 40rpx;
}
.empty-state button {
background: none !important;
color: #2D2D2D !important;
font-size: 24rpx !important;
border: 1rpx solid #E0E0E0 !important;
padding: 16rpx 40rpx !important;
letter-spacing: 4rpx !important;
}
.empty-state button::after {
border: none !important;
2026-04-16 11:25:29 +08:00
}
/* 收藏锦囊 */
.collection-bag {
position: fixed;
right: 40rpx;
bottom: 200rpx;
2026-04-16 11:25:29 +08:00
width: 100rpx;
height: 100rpx;
background: #FFFFFF;
2026-04-16 11:25:29 +08:00
border-radius: 50%;
box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.1);
2026-04-16 11:25:29 +08:00
display: flex;
align-items: center;
justify-content: center;
2026-04-16 11:25:29 +08:00
z-index: 10;
transition: transform 0.2s;
}
.collection-bag:active {
transform: scale(0.9);
}
.bag-icon {
font-family: "Noto Serif SC", serif;
font-size: 40rpx;
color: #4A4A4A;
}
.collection-count {
position: absolute;
top: 0;
right: 0;
background-color: #B22222;
color: white;
font-size: 18rpx;
border-radius: 50%;
padding: 4rpx 10rpx;
min-width: 18rpx;
text-align: center;
}
/* 收藏列表 */
.collection-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(20px);
z-index: 20;
opacity: 0;
visibility: hidden;
transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.collection-overlay.visible {
opacity: 1;
visibility: visible;
}
.collection-content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: #FFFFFF;
border-radius: 40rpx 40rpx 0 0;
padding: 60rpx 40rpx;
max-height: 70vh;
2026-04-16 11:25:29 +08:00
transform: translateY(100%);
transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.collection-overlay.visible .collection-content {
transform: translateY(0);
}
.collection-title {
font-family: "Noto Serif SC", serif;
font-size: 32rpx;
color: #2D2D2D;
2026-04-16 11:25:29 +08:00
text-align: center;
margin-bottom: 40rpx;
letter-spacing: 8rpx;
2026-04-16 11:25:29 +08:00
}
.collection-scroll {
max-height: 50vh;
2026-04-16 11:25:29 +08:00
}
.collection-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 0;
2026-04-16 11:25:29 +08:00
border-bottom: 1rpx solid #F0F0F0;
}
.item-name {
font-family: "Noto Serif SC", serif;
font-size: 36rpx;
2026-04-16 11:25:29 +08:00
color: #2D2D2D;
margin-bottom: 8rpx;
letter-spacing: 8rpx;
2026-04-16 11:25:29 +08:00
}
.item-origin {
font-size: 22rpx;
color: #888888;
line-height: 1.6;
2026-04-16 11:25:29 +08:00
}
.delete-btn {
font-size: 40rpx;
color: #E0E0E0;
font-weight: 200;
padding: 10rpx 20rpx;
border-radius: 50%;
transition: all 0.2s;
}
.delete-btn:active {
color: #B22222;
background: #FAFAFA;
2026-04-16 11:25:29 +08:00
}
.collection-empty {
text-align: center;
padding: 100rpx 60rpx;
2026-04-16 11:25:29 +08:00
font-size: 24rpx;
color: #D0D0D0;
letter-spacing: 4rpx;
}
/* 海报弹窗 */
.poster-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
z-index: 100;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}
.poster-modal.visible {
opacity: 1;
visibility: visible;
}
.poster-content {
width: 80%;
max-width: 600rpx;
position: relative;
}
.poster-close {
position: absolute;
top: -80rpx;
right: 0;
font-size: 48rpx;
color: #FFFFFF;
padding: 20rpx;
z-index: 10;
}
/* 海报内容区域 */
.poster-capture-area {
background: #FFFFFF;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3);
}
.poster-bg {
width: 100%;
aspect-ratio: 3/4;
background: linear-gradient(135deg, #FAFAFA 0%, #F0F0F0 100%);
position: relative;
padding: 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
/* 大字竖排 */
.poster-name-vertical {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
gap: 20rpx;
}
.poster-name-vertical text {
font-family: "Noto Serif SC", serif;
font-size: 120rpx;
color: #2D2D2D;
writing-mode: vertical-rl;
text-orientation: upright;
letter-spacing: 20rpx;
font-weight: 400;
}
/* 出处 */
.poster-origin {
position: absolute;
top: 60rpx;
right: 60rpx;
font-family: "Noto Serif SC", serif;
font-size: 22rpx;
color: #888888;
writing-mode: vertical-rl;
text-orientation: mixed;
letter-spacing: 4rpx;
line-height: 2;
max-height: 300rpx;
}
/* 印章 */
.poster-seal {
position: absolute;
bottom: 180rpx;
right: 60rpx;
width: 100rpx;
height: 100rpx;
border: 4rpx solid #B22222;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
font-family: "Noto Serif SC", serif;
font-size: 36rpx;
color: #B22222;
writing-mode: vertical-rl;
text-orientation: upright;
letter-spacing: 8rpx;
transform: rotate(-5deg);
opacity: 0.9;
}
/* 底部信息 */
.poster-footer {
position: absolute;
bottom: 60rpx;
left: 60rpx;
right: 60rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.poster-desc {
font-size: 20rpx;
color: #A0A0A0;
line-height: 1.8;
max-width: 60%;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.poster-qrcode {
width: 100rpx;
height: 100rpx;
background: #F5F5F5;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.qrcode-text {
font-size: 16rpx;
color: #C0C0C0;
writing-mode: vertical-rl;
text-orientation: upright;
letter-spacing: 2rpx;
}
/* 海报操作按钮 */
.poster-actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 40rpx;
margin-top: 40rpx;
}
.poster-btn {
width: 240rpx;
height: 80rpx;
border-radius: 40rpx;
font-size: 26rpx;
letter-spacing: 4rpx;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
margin: 0;
padding: 0;
}
.poster-btn.save-btn {
background: #FFFFFF;
color: #2D2D2D;
}
.poster-btn.save-btn:active {
background: #F0F0F0;
}
.poster-btn.share-btn {
background: transparent;
color: #FFFFFF;
border: 2rpx solid rgba(255, 255, 255, 0.5);
}
.poster-btn.share-btn:active {
background: rgba(255, 255, 255, 0.1);
}