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

553 lines
8.8 KiB
Plaintext

/* ==========================================
排位赛详情页 - 全新设计
========================================== */
.page-container {
min-height: 100vh;
background: linear-gradient(
180deg,
var(--primary-soft) 0%,
var(--bg-page) 30%,
var(--bg-soft) 100%
);
position: relative;
overflow: hidden;
}
/* 顶部背景 */
.hero-bg {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 380rpx;
background: transparent;
pointer-events: none;
overflow: hidden;
}
.hero-bg::before {
display: none;
}
.hero-bg::after {
display: none;
}
.hero-pattern {
position: absolute;
top: 60rpx;
left: 50%;
transform: translateX(-50%);
width: 120rpx;
height: 120rpx;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.2)' stroke-width='2' stroke-dasharray='8 4'/%3E%3C/svg%3E");
background-size: contain;
animation: spin 15s linear infinite;
}
@keyframes spin {
to {
transform: translateX(-50%) rotate(360deg);
}
}
/* 主要内容 */
.main-content {
position: relative;
z-index: 1;
padding: 24rpx;
}
/* 比赛头部 */
.match-header {
text-align: center;
padding: 48rpx 0 40rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
margin-bottom: 24rpx;
}
.match-badge {
width: 72rpx;
height: 72rpx;
margin: 0 auto;
margin-bottom: 16rpx;
}
.match-badge-img {
width: 72rpx;
height: 72rpx;
}
.match-title {
display: block;
font-size: 48rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 16rpx;
letter-spacing: 1rpx;
}
.match-status {
display: inline-flex;
align-items: center;
gap: 8rpx;
padding: 10rpx 24rpx;
background: var(--bg-soft);
border-radius: 50rpx;
font-size: 26rpx;
font-weight: 600;
color: var(--text-secondary);
}
.status-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: var(--primary);
}
.match-status.status-1 .status-dot {
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.5;
transform: scale(1.2);
}
}
/* 信息卡片 */
.info-card {
background: var(--bg-card);
border-radius: 28rpx;
padding: 28rpx;
margin-bottom: 20rpx;
box-shadow: var(--shadow-card);
}
.info-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16rpx;
}
.info-item {
text-align: center;
padding: 12rpx 0;
}
.info-value {
display: block;
font-size: 30rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 8rpx;
}
.info-value.accent {
color: var(--warning);
}
.info-label {
display: block;
font-size: 22rpx;
color: var(--text-muted);
}
.stage-tag {
display: inline-block;
padding: 6rpx 16rpx;
border-radius: 8rpx;
font-size: 24rpx;
font-weight: 600;
margin-bottom: 8rpx;
}
.stage-tag.stage-0 {
background: #e3f2fd;
color: #1565c0;
}
.stage-tag.stage-1 {
background: #e8f5e9;
color: #2e7d32;
}
.stage-tag.stage-2 {
background: #fff3e0;
color: #e65100;
}
.stage-tag.stage-3 {
background: #eceff1;
color: #546e7a;
}
/* 我的状态卡片 */
.my-status-card {
background: #fff;
border-radius: 28rpx;
margin-bottom: 20rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.06);
overflow: hidden;
}
.card-header {
display: flex;
align-items: center;
gap: 12rpx;
padding: 20rpx 24rpx;
background: linear-gradient(90deg, #fff8e1, #ffffff);
border-bottom: 1rpx solid rgba(255, 152, 0, 0.1);
}
.card-icon {
width: 28rpx;
height: 28rpx;
}
.card-title {
flex: 1;
font-size: 28rpx;
font-weight: 700;
color: var(--text-primary);
}
.player-count {
font-size: 24rpx;
color: var(--text-muted);
background: var(--bg-soft);
padding: 6rpx 16rpx;
border-radius: 20rpx;
}
.status-content {
padding: 24rpx;
}
.status-main {
display: flex;
align-items: center;
justify-content: space-between;
}
.status-badge {
padding: 12rpx 24rpx;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 700;
}
.status-badge.waiting {
background: linear-gradient(135deg, #e3f2fd, #bbdefb);
color: #1565c0;
}
.status-badge.playing {
background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
color: #2e7d32;
}
.status-badge.finished {
background: linear-gradient(135deg, #eceff1, #cfd8dc);
color: #546e7a;
}
.win-lose-stats {
display: flex;
gap: 24rpx;
}
.stat {
display: flex;
align-items: baseline;
gap: 4rpx;
}
.stat-num {
font-size: 40rpx;
font-weight: 800;
}
.stat.win .stat-num {
color: #2e7d32;
}
.stat.lose .stat-num {
color: #c62828;
}
.stat-text {
font-size: 24rpx;
color: var(--text-muted);
}
/* 当前对局 */
.current-game {
margin-top: 24rpx;
}
.game-divider {
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.game-divider::before,
.game-divider::after {
content: "";
flex: 1;
height: 1rpx;
background: linear-gradient(
90deg,
transparent,
rgba(0, 0, 0, 0.08),
transparent
);
}
.divider-text {
padding: 0 20rpx;
font-size: 22rpx;
color: var(--text-muted);
}
.opponent-card {
display: flex;
align-items: center;
gap: 16rpx;
padding: 18rpx;
background: linear-gradient(135deg, #fff8e1, #fffde7);
border-radius: 16rpx;
border: 2rpx solid rgba(255, 152, 0, 0.15);
}
.opponent-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
border: 3rpx solid #ffe082;
}
.opponent-info {
flex: 1;
}
.opponent-name {
display: block;
font-size: 30rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 8rpx;
}
.opponent-meta {
display: flex;
align-items: center;
gap: 12rpx;
}
.level-tag {
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-size: 20rpx;
font-weight: 600;
}
.level-tag.lv1 {
background: linear-gradient(135deg, #81c784, #66bb6a);
color: #fff;
}
.level-tag.lv2 {
background: linear-gradient(135deg, #64b5f6, #42a5f5);
color: #fff;
}
.level-tag.lv3 {
background: linear-gradient(135deg, #ffb74d, #ffa726);
color: #fff;
}
.level-tag.lv4 {
background: linear-gradient(135deg, #f06292, #ec407a);
color: #fff;
}
.level-tag.lv5 {
background: linear-gradient(135deg, #ba68c8, #ab47bc);
color: #fff;
}
.opponent-power {
font-size: 24rpx;
color: var(--text-secondary);
}
/* 参赛选手卡片 */
.players-card {
background: #fff;
border-radius: 28rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.06);
overflow: hidden;
}
.players-list {
padding: 16rpx;
}
.player-item {
display: flex;
align-items: center;
gap: 14rpx;
padding: 16rpx 18rpx;
background: linear-gradient(135deg, #fafafa, #f5f5f5);
border-radius: 16rpx;
margin-bottom: 12rpx;
transition: all 0.2s;
}
.player-item:last-child {
margin-bottom: 0;
}
.player-item.is-me {
background: linear-gradient(135deg, #fff8e1, #fffde7);
border: 2rpx solid rgba(255, 152, 0, 0.2);
}
.player-item:active {
transform: scale(0.98);
}
.player-rank {
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12rpx;
font-size: 24rpx;
font-weight: 700;
background: var(--bg-soft);
color: var(--text-muted);
}
.player-rank.rank-1 {
background: linear-gradient(135deg, #ffd54f, #ffb300);
color: #fff;
}
.player-rank.rank-2 {
background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
color: #fff;
}
.player-rank.rank-3 {
background: linear-gradient(135deg, #ffcc80, #ff9800);
color: #fff;
}
.player-main {
flex: 1;
min-width: 0;
}
.player-name {
display: block;
font-size: 28rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 6rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.player-tags {
display: flex;
align-items: center;
gap: 8rpx;
}
.player-me {
padding: 2rpx 10rpx;
background: linear-gradient(135deg, #ff8a65, #ff6b35);
color: #fff;
font-size: 18rpx;
font-weight: 600;
border-radius: 6rpx;
}
.player-record {
display: flex;
gap: 8rpx;
font-size: 24rpx;
}
.record-win {
color: #2e7d32;
font-weight: 600;
}
.record-lose {
color: #c62828;
font-weight: 600;
}
.player-status-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #bdbdbd;
}
.player-status-dot.waiting {
background: #1565c0;
}
.player-status-dot.playing {
background: #2e7d32;
animation: pulse 1.5s infinite;
}
.player-status-dot.finished {
background: #9e9e9e;
}
/* 空状态 */
.empty-players {
display: flex;
flex-direction: column;
align-items: center;
padding: 60rpx 40rpx;
}
.empty-icon {
width: 160rpx;
height: 160rpx;
margin-bottom: 16rpx;
opacity: 0.5;
}
.empty-text {
font-size: 28rpx;
color: var(--text-muted);
}
/* 动画 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fadeInUp {
animation: fadeInUp 0.5s ease-out forwards;
}