yingsa/miniprogram/pages/index/index.wxss
ethanfly 74ed19eee1 feat: 新增选手资料页面并优化界面设计
- 新增选手资料页面,支持查看选手信息及比赛记录
- 添加多个SVG图标替换原有emoji,提升视觉一致性
- 扩展CSS变量系统,增加信息、成功、警告、危险等状态颜色
- 优化多个页面的样式,统一使用CSS变量和现代设计语言
- 修复可选链操作符兼容性问题,改用传统条件判断
- 改进数据加载逻辑,使用Object.assign替代展开运算符
- 调整开发环境配置,使用本地服务器地址
2026-01-30 02:24:03 +08:00

364 lines
6.6 KiB
Plaintext

/* ==========================================
天梯排名页面 - 浅色高级感设计
========================================== */
.page-container {
min-height: 100vh;
background: var(--bg-page);
position: relative;
}
/* 顶部装饰背景 */
.hero-section {
position: relative;
padding: 48rpx 24rpx 32rpx;
background: transparent;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
}
.hero-pattern {
display: none;
}
.hero-pattern-2 {
display: none;
}
/* 门店信息头部 */
.store-header {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32rpx;
padding: 16rpx 20rpx;
background: var(--bg-white);
border-radius: 16rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.store-info {
display: flex;
align-items: center;
gap: 12rpx;
}
.store-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: var(--primary);
box-shadow: 0 0 8rpx rgba(255, 107, 53, 0.4);
animation: pulse 2s ease-in-out infinite;
}
.store-name {
font-size: 30rpx;
font-weight: 600;
color: var(--text-primary);
letter-spacing: 0.5rpx;
}
.change-store-btn {
display: flex;
align-items: center;
gap: 6rpx;
padding: 10rpx 18rpx;
background: var(--bg-soft);
border-radius: 20rpx;
transition: all 0.3s ease;
}
.change-store-btn:active {
transform: scale(0.96);
}
.change-store-text {
font-size: 24rpx;
color: var(--text-secondary);
font-weight: 500;
}
.change-store-arrow {
font-size: 22rpx;
color: var(--text-muted);
font-weight: 300;
}
/* 页面标题 */
.page-header {
position: relative;
z-index: 1;
text-align: center;
margin-bottom: 0;
padding: 24rpx 0;
}
.page-title {
display: block;
font-size: 52rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 8rpx;
letter-spacing: 1rpx;
}
.page-subtitle {
display: block;
font-size: 26rpx;
color: var(--text-muted);
font-weight: 400;
letter-spacing: 0.5rpx;
}
/* 主要内容区域 */
.main-content {
position: relative;
z-index: 1;
}
/* 筛选标签栏容器 - 用于吸附效果 */
.filter-bar-wrapper {
position: sticky;
top: 0;
z-index: 100;
background: var(--bg-page);
padding: 24rpx 24rpx;
/* margin-bottom: 24rpx; */
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
/* 筛选标签栏 */
.filter-bar {
display: flex;
gap: 16rpx;
}
.filter-item {
flex: 1;
padding: 20rpx;
background: var(--bg-white);
border-radius: var(--radius-full);
text-align: center;
font-size: 26rpx;
color: var(--text-secondary);
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
}
.filter-item.active {
background: var(--primary-gradient);
color: var(--text-white);
box-shadow: var(--shadow-primary);
font-weight: 600;
}
.filter-item:active {
transform: scale(0.96);
}
/* 排名列表 */
.ranking-list {
padding: 0 24rpx 40rpx;
}
.ranking-item {
display: flex;
align-items: center;
padding: 24rpx;
background: var(--bg-card);
border-radius: 20rpx;
margin-bottom: 16rpx;
box-shadow: var(--shadow-card);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: 1rpx solid var(--border-soft);
}
.ranking-item:last-child {
margin-bottom: 0;
}
.ranking-item:active {
transform: scale(0.98);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.12);
}
.ranking-item.top-rank {
background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg-white) 100%);
border: 2rpx solid var(--border-primary);
box-shadow: var(--shadow-primary);
}
/* 排名徽章 */
.rank-badge {
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 26rpx;
font-weight: 700;
margin-right: 20rpx;
flex-shrink: 0;
}
.rank-badge.top1 {
background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
color: #8B4513;
box-shadow: 0 6rpx 20rpx rgba(255, 215, 0, 0.5);
font-size: 32rpx;
width: 64rpx;
height: 64rpx;
}
.rank-badge.top2 {
background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
color: #4A4A4A;
box-shadow: 0 4rpx 16rpx rgba(192, 192, 192, 0.5);
font-size: 32rpx;
width: 64rpx;
height: 64rpx;
}
.rank-badge.top3 {
background: linear-gradient(135deg, #CD853F 0%, #B8860B 100%);
color: #fff;
box-shadow: 0 4rpx 16rpx rgba(205, 133, 63, 0.5);
font-size: 32rpx;
width: 64rpx;
height: 64rpx;
}
.rank-badge.normal {
background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-card-hover) 100%);
color: var(--text-secondary);
font-weight: 600;
}
/* 选手头像 */
.player-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 20rpx;
border: 3rpx solid var(--bg-white);
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
flex-shrink: 0;
background: var(--bg-soft);
}
/* 选手信息 */
.player-info {
flex: 1;
overflow: hidden;
}
.player-name {
display: block;
font-size: 30rpx;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.player-meta {
display: flex;
align-items: center;
gap: 16rpx;
flex-wrap: wrap;
}
.player-level {
display: inline-flex;
align-items: center;
padding: 4rpx 14rpx;
border-radius: 20rpx;
font-size: 22rpx;
font-weight: 600;
line-height: 1.2;
}
.player-level.lv1 { background: #E8F5E9; color: #2E7D32; }
.player-level.lv2 { background: #E3F2FD; color: #1565C0; }
.player-level.lv3 { background: #FFF3E0; color: #E65100; }
.player-level.lv4 { background: #FCE4EC; color: #C2185B; }
.player-level.lv5 { background: #F3E5F5; color: #7B1FA2; }
.player-stats {
font-size: 24rpx;
color: var(--text-secondary);
font-weight: 500;
}
/* 战力值 */
.player-power {
text-align: right;
flex-shrink: 0;
}
.power-value {
display: block;
font-size: 36rpx;
font-weight: 700;
color: var(--primary);
line-height: 1.2;
margin-bottom: 4rpx;
}
.power-label {
font-size: 22rpx;
color: var(--text-muted);
font-weight: 500;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
padding: 80rpx 48rpx;
}
.empty-icon {
width: 160rpx;
height: 160rpx;
margin-bottom: 24rpx;
opacity: 0.7;
}
.empty-title {
font-size: 28rpx;
color: var(--text-secondary);
margin-bottom: 8rpx;
}
.empty-desc {
font-size: 24rpx;
color: var(--text-muted);
}
/* 加载状态 */
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 48rpx;
color: var(--text-muted);
font-size: 26rpx;
}
/* 加载更多 */
.load-more {
text-align: center;
padding: 16rpx 32rpx 8rpx;
color: var(--text-muted);
font-size: 26rpx;
}