Files
2025-11-17 13:32:54 +08:00

817 lines
13 KiB
Plaintext

.coupon-center-container {
min-height: 100vh;
background: #f5f5f5;
}
/* 页面头部 */
.page-header {
background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 50%, #ffa8a8 100%);
padding: 20rpx 0 0;
position: sticky;
top: 0;
z-index: 100;
overflow: hidden;
position: relative;
}
/* 背景装饰 */
.header-bg-decoration {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
.decoration-circle {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
animation: float 6s ease-in-out infinite;
}
.circle-1 {
width: 120rpx;
height: 120rpx;
top: -60rpx;
right: 50rpx;
animation-delay: 0s;
}
.circle-2 {
width: 80rpx;
height: 80rpx;
top: 100rpx;
right: -40rpx;
animation-delay: 2s;
}
.circle-3 {
width: 60rpx;
height: 60rpx;
top: 50rpx;
left: 30rpx;
animation-delay: 4s;
}
@keyframes float {
0%, 100% { transform: translateY(0px) rotate(0deg); }
50% { transform: translateY(-20rpx) rotate(180deg); }
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
margin-top: 20rpx;
position: relative;
z-index: 2;
}
.header-title {
display: flex;
flex-direction: column;
align-items: center;
}
.title-main {
font-size: 36rpx;
font-weight: 700;
color: #fff;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}
.title-subtitle {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.8);
margin-top: 4rpx;
}
.header-placeholder {
width: 48rpx;
}
/* 统计信息 */
.header-stats {
display: flex;
align-items: center;
justify-content: center;
padding: 32rpx;
position: relative;
z-index: 2;
animation: slideInUp 0.8s ease-out 0.3s both;
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
transition: transform 0.3s ease;
}
.stat-item:hover {
transform: scale(1.1);
}
.stat-number {
font-size: 48rpx;
font-weight: 700;
color: #fff;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
animation: fadeIn 1s ease-out 0.5s both;
}
.stat-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.8);
margin-top: 8rpx;
animation: fadeIn 1s ease-out 0.7s both;
}
.stat-divider {
width: 2rpx;
height: 60rpx;
background: rgba(255, 255, 255, 0.3);
margin: 0 40rpx;
}
/* 优惠券列表容器 */
.coupon-list-container {
padding: 24rpx;
display: flex;
flex-direction: column;
gap: 16rpx;
}
/* 优惠券项 */
.coupon-item {
width: 100%;
margin-bottom: 0;
animation: slideInUp 0.6s ease-out;
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(30rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-30rpx);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(30rpx);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes glow {
0%, 100% {
box-shadow: 0 0 20rpx rgba(255, 107, 107, 0.3);
}
50% {
box-shadow: 0 0 40rpx rgba(255, 107, 107, 0.6);
}
}
.coupon-card {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
position: relative;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: 1rpx solid rgba(255, 255, 255, 0.8);
}
.coupon-card:active {
transform: scale(0.98);
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
}
/* 卡片状态样式 */
.coupon-card.received-card {
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
border-color: #0ea5e9;
}
.coupon-card.soldout-card {
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border-color: #cbd5e1;
opacity: 0.7;
}
/* 状态标签 */
.coupon-status-tag {
position: absolute;
top: 12rpx;
right: 12rpx;
background: linear-gradient(135deg, #10b981, #059669);
color: #fff;
padding: 6rpx 12rpx;
border-radius: 16rpx;
font-size: 18rpx;
font-weight: 600;
display: flex;
align-items: center;
z-index: 3;
box-shadow: 0 2rpx 8rpx rgba(16, 185, 129, 0.3);
}
.coupon-status-tag.soldout {
background: linear-gradient(135deg, #ef4444, #dc2626);
box-shadow: 0 2rpx 8rpx rgba(239, 68, 68, 0.3);
}
.coupon-status-tag.hot {
background: linear-gradient(135deg, #f59e0b, #d97706);
box-shadow: 0 2rpx 8rpx rgba(245, 158, 11, 0.3);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.05); }
}
.status-icon {
margin-right: 4rpx;
font-size: 16rpx;
}
.status-text {
font-size: 18rpx;
}
/* 优惠券主体 */
.coupon-main {
display: flex;
flex-direction: row;
padding: 20rpx;
position: relative;
}
.coupon-left {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
color: #fff;
border-radius: 12rpx;
padding: 20rpx 16rpx;
margin-right: 20rpx;
width: 160rpx;
position: relative;
overflow: hidden;
}
/* 不同类型的优惠券背景 */
.coupon-left.type-amount {
background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 50%, #ffa8a8 100%);
}
.coupon-left.type-discount {
background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
}
.coupon-left.type-shipping {
background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
}
/* 装饰元素 */
.value-decoration {
position: absolute;
top: -20rpx;
right: -20rpx;
width: 80rpx;
height: 80rpx;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
animation: rotate 10s linear infinite;
}
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.coupon-value {
display: flex;
align-items: baseline;
margin-bottom: 12rpx;
position: relative;
z-index: 2;
}
.value-symbol {
font-size: 22rpx;
font-weight: 600;
margin-right: 4rpx;
}
.value-number {
font-size: 44rpx;
font-weight: 800;
line-height: 1;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}
.value-unit {
font-size: 22rpx;
font-weight: 600;
margin-left: 6rpx;
}
.value-text {
font-size: 32rpx;
font-weight: 800;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}
.coupon-desc {
font-size: 22rpx;
opacity: 0.9;
text-align: center;
position: relative;
z-index: 2;
}
.coupon-right {
display: flex;
flex-direction: column;
gap: 12rpx;
flex: 1;
justify-content: space-between;
}
.coupon-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.coupon-name {
font-size: 28rpx;
font-weight: 700;
color: #1f2937;
flex: 1;
margin-right: 12rpx;
line-height: 1.3;
}
.coupon-type-badge {
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
color: #fff;
padding: 4rpx 8rpx;
border-radius: 8rpx;
font-size: 18rpx;
font-weight: 600;
}
.coupon-type-badge.discount {
background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.coupon-type-badge.shipping {
background: linear-gradient(135deg, #10b981, #34d399);
}
.coupon-details {
display: flex;
flex-direction: column;
gap: 6rpx;
}
.detail-item {
display: flex;
align-items: center;
font-size: 20rpx;
color: #6b7280;
}
.detail-icon {
margin-right: 6rpx;
font-size: 16rpx;
}
.detail-text {
flex: 1;
}
/* 领取按钮区域 */
.coupon-action {
padding: 16rpx 20rpx 20rpx;
background: linear-gradient(180deg, rgba(248, 249, 250, 0.5) 0%, rgba(248, 249, 250, 0.8) 100%);
border-top: 1rpx solid rgba(0, 0, 0, 0.05);
}
.receive-btn {
width: 100%;
height: 64rpx;
background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 50%, #ffa8a8 100%);
color: #fff;
border-radius: 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 700;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4rpx 16rpx rgba(255, 107, 107, 0.3);
position: relative;
overflow: hidden;
}
.receive-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
transition: left 0.6s ease;
}
.receive-btn:active::before {
left: 100%;
}
.receive-btn.disabled {
background: linear-gradient(135deg, #e5e7eb, #d1d5db);
color: #9ca3af;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.receive-btn.received {
background: linear-gradient(135deg, #10b981, #34d399);
color: #fff;
border: 2rpx solid #059669;
box-shadow: 0 4rpx 16rpx rgba(16, 185, 129, 0.3);
}
.receive-btn:not(.disabled):active {
transform: scale(0.96);
box-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.2);
}
.btn-content {
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
}
.btn-icon {
font-size: 24rpx;
animation: bounce 2s infinite;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
40% { transform: translateY(-4rpx); }
60% { transform: translateY(-2rpx); }
}
.btn-text {
font-size: 24rpx;
font-weight: 700;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 32rpx;
text-align: center;
}
.empty-animation {
position: relative;
margin-bottom: 40rpx;
}
.empty-icon {
font-size: 120rpx;
opacity: 0.8;
animation: float 3s ease-in-out infinite;
}
.empty-sparkles {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.sparkle {
position: absolute;
font-size: 32rpx;
animation: sparkle 2s ease-in-out infinite;
}
.sparkle-1 {
top: 20rpx;
right: 20rpx;
animation-delay: 0s;
}
.sparkle-2 {
bottom: 30rpx;
left: 10rpx;
animation-delay: 0.7s;
}
.sparkle-3 {
top: 60rpx;
left: -10rpx;
animation-delay: 1.4s;
}
@keyframes sparkle {
0%, 100% {
opacity: 0;
transform: scale(0.5) rotate(0deg);
}
50% {
opacity: 1;
transform: scale(1) rotate(180deg);
}
}
.empty-content {
display: flex;
flex-direction: column;
align-items: center;
}
.empty-text {
font-size: 32rpx;
color: #374151;
margin-bottom: 16rpx;
font-weight: 600;
}
.empty-desc {
font-size: 26rpx;
color: #6b7280;
margin-bottom: 32rpx;
}
.empty-action {
margin-top: 16rpx;
}
.refresh-btn {
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
color: #fff;
padding: 16rpx 32rpx;
border-radius: 32rpx;
display: flex;
align-items: center;
gap: 8rpx;
font-size: 26rpx;
font-weight: 600;
box-shadow: 0 4rpx 16rpx rgba(255, 107, 107, 0.3);
transition: all 0.3s ease;
}
.refresh-btn:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.2);
}
.refresh-icon {
font-size: 24rpx;
animation: rotate 2s linear infinite;
}
.refresh-text {
font-size: 26rpx;
}
/* 加载状态 */
.loading-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 32rpx;
}
.loading-animation {
position: relative;
margin-bottom: 32rpx;
}
.loading-dots {
display: flex;
gap: 8rpx;
margin-top: 16rpx;
justify-content: center;
}
.dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #ff6b6b;
animation: loadingDots 1.4s ease-in-out infinite both;
}
.dot-1 { animation-delay: -0.32s; }
.dot-2 { animation-delay: -0.16s; }
.dot-3 { animation-delay: 0s; }
@keyframes loadingDots {
0%, 80%, 100% {
transform: scale(0.8);
opacity: 0.5;
}
40% {
transform: scale(1.2);
opacity: 1;
}
}
.loading-text {
font-size: 28rpx;
color: #6b7280;
font-weight: 500;
text-align: center;
}
/* 响应式适配 */
@media (max-width: 750rpx) {
.header {
padding: 60rpx 24rpx 40rpx;
}
.header-title {
font-size: 40rpx;
}
.header-subtitle {
font-size: 24rpx;
}
.stats-section {
padding: 0 24rpx;
margin-top: 24rpx;
}
.stat-number {
font-size: 32rpx;
}
.stat-label {
font-size: 22rpx;
}
.coupon-list {
padding: 24rpx;
}
.coupon-card {
margin-bottom: 24rpx;
}
.coupon-value {
font-size: 48rpx;
}
.coupon-unit {
font-size: 20rpx;
}
.coupon-name {
font-size: 28rpx;
}
.coupon-desc {
font-size: 22rpx;
}
.action-btn {
font-size: 24rpx;
padding: 16rpx 24rpx;
}
.coupon-status-tag {
font-size: 20rpx;
padding: 6rpx 12rpx;
}
.coupon-type-badge {
font-size: 18rpx;
padding: 4rpx 8rpx;
}
}
/* 超小屏幕适配 */
@media (max-width: 600rpx) {
.header {
padding: 50rpx 20rpx 30rpx;
}
.header-title {
font-size: 36rpx;
}
.header-subtitle {
font-size: 22rpx;
}
.stats-section {
flex-direction: column;
gap: 16rpx;
align-items: center;
}
.stat-item {
flex-direction: row;
gap: 12rpx;
}
.coupon-list {
padding: 20rpx;
}
.coupon-card {
padding: 24rpx;
}
.coupon-left {
min-width: 120rpx;
}
.coupon-value {
font-size: 42rpx;
}
.coupon-right {
padding-left: 20rpx;
}
.coupon-name {
font-size: 26rpx;
}
.coupon-desc {
font-size: 20rpx;
}
.action-btn {
font-size: 22rpx;
padding: 14rpx 20rpx;
}
}
@media (max-width: 375px) {
.coupon-left {
flex: 0 0 160rpx;
padding: 20rpx 12rpx;
}
.value-number {
font-size: 40rpx;
}
.coupon-name {
font-size: 28rpx;
}
}