* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root { --primary: #3B82F6; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f8f9fa; }

.van-icon { display: inline-flex; align-items: center; justify-content: center; }
.van-button { display: inline-block; padding: 8px 16px; border-radius: 4px; cursor: pointer; border: none; font-size: 14px; }
.van-button--primary { background: var(--primary); color: #fff; }
.van-button--default { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.van-button--danger { background: var(--primary); color: #fff; }
.van-button--mini { padding: 4px 8px; font-size: 12px; }
.van-tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 70px; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.08); z-index: 100; }
.van-tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: #999; gap: 4px; }
.van-tabbar-item--active { color: var(--primary); }
.van-popup { position: fixed; background: #fff; z-index: 200; }
.van-popup--round { border-radius: 16px 16px 0 0; }

/* 封面图轮播样式 */
.cover-carousel { width: 100%; position: relative; }
.carousel-wrapper { width: 100%; overflow: hidden; }
.carousel-content { display: flex; transition: transform 0.5s ease; }
.carousel-item { width: 100%; flex-shrink: 0; }
.cover-image { width: 100%; height: auto; display: block; object-fit: cover; }
.carousel-indicators { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.indicator { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.indicator.active { width: 20px; border-radius: 4px; background: #fff; }

/* 活动介绍和规则样式 */
.activity-intro, .activity-rule { margin: 15px; background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.intro-header, .rule-header { display: flex; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f5f5f5; }
.intro-header span, .rule-header span { font-size: 18px; margin-right: 8px; }
.intro-header h3, .rule-header h3 { font-size: 16px; font-weight: 600; color: #333; margin: 0; padding-left: 8px; border-left: 4px solid var(--primary); }
.activity-intro p, .activity-rule p { font-size: 14px; color: #555; line-height: 1.9; margin: 0; }
.activity-intro strong, .activity-rule strong { color: var(--primary); }

/* 排行榜入口样式 */
.ranking-bar { margin: 15px; background: white; border-radius: 12px; padding: 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 12px rgba(0,0,0,0.05); cursor: pointer; transition: background 0.2s; }
.ranking-bar:active { background: #f8f9fa; }
.ranking-left { display: flex; align-items: center; }
.ranking-left .icon { margin-right: 10px; font-size: 22px; }
.ranking-left span { font-size: 15px; color: #333; font-weight: 500; }
.ranking-bar .arrow { color: #ccc; font-size: 20px; }

/* 选手列表样式 */
.player-section { margin: 15px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-left: 12px; border-left: 4px solid var(--primary); }
.section-title { font-size: 16px; font-weight: 600; color: #333; }
.section-count { font-size: 14px; color: #999; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.player-card { background: white; border-radius: 12px; padding: 15px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.05); position: relative; transition: transform 0.2s; }
.player-card:active { transform: scale(0.98); }
.player-avatar { position: relative; margin-bottom: 10px; }
.avatar-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid #f0f0f0; }
.rank-badge { position: absolute; top: -5px; right: -5px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; color: white; }
.rank-badge.rank-1 { background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%); }
.rank-badge.rank-2 { background: linear-gradient(135deg, #c0c0c0 0%, #888 100%); }
.rank-badge.rank-3 { background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%); }
.player-info { margin-bottom: 10px; }
.player-name { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 5px; }
.player-votes { font-size: 12px; color: var(--primary); }
.vote-btn { width: 100%; padding: 8px; background: var(--primary); color: white; border: none; border-radius: 10px; font-size: 14px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.vote-btn:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(255,76,59,0.3); }

/* 加载提示 */
.loading { text-align: center; padding: 20px; color: #999; }

/* 头部有封面图的样式 */
.header.has-cover { padding-top: 20px; }

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    padding-bottom: 140px;
}

.page-home {
    padding-bottom: 140px;
}

/* 头部区域 */
.header {
    position: relative;
    padding: 60px 20px 30px;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
}

.header-content {
    position: relative;
    z-index: 1;
}

.header .title {
    font-size: 26px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header .search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 14px;
    color: white;
    backdrop-filter: blur(10px);
}

.header .search-box van-icon {
    margin-right: 10px;
}

/* 倒计时区域 */
.countdown-section {
    padding: 0 15px;
    margin-top: -20px;
}

.countdown {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.countdown.before .countdown-text {
    color: #3B82F6;
}

.countdown.during .countdown-text {
    color: #10B981;
}

.countdown.after .countdown-text {
    color: #9CA3AF;
}

.countdown-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.countdown-time {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.time-box {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.time-label {
    font-size: 12px;
    color: #999;
    margin: 0 5px;
}

/* 公告栏 */
.notice-bar {
    margin: 15px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 10px;
    padding: 12px 15px;
    color: #92400E;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.notice-bar van-icon {
    margin-right: 10px;
}

/* 活动信息 */
.activity-info {
    margin: 0 15px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #666;
    font-size: 14px;
}

.info-row van-icon {
    margin-right: 10px;
    color: #999;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item van-icon {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-item .num {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-item .label {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* 活动介绍 */
.activity-intro {
    margin: 15px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.intro-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #667eea;
    font-weight: 600;
}

.intro-header van-icon {
    margin-right: 8px;
}

.activity-intro p {
    color: #666;
    line-height: 1.8;
    font-size: 14px;
}

/* 排行榜入口 */
.ranking-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    margin: 15px;
    padding: 20px;
    border-radius: 15px;
    color: white;
    font-weight: 600;
}

.ranking-left {
    display: flex;
    align-items: center;
}

.ranking-bar .icon {
    font-size: 24px;
    margin-right: 10px;
}

/* 选手区域 */
.player-section {
    padding: 0 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.section-count {
    font-size: 14px;
    color: #999;
}

/* 选手网格布局 */
.player-grid {
    display: grid;
    gap: 12px;
}

.player-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.player-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.player-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.player-grid.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* 选手卡片 */
.player-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.player-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.player-avatar {
    position: relative;
    margin-bottom: 10px;
}

.avatar-img {
    width: 100%;
    padding-bottom: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: #f5f5f5;
}

.rank-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.player-info {
    text-align: center;
}

.player-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-votes {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #FF6B6B;
}

.player-votes van-icon {
    margin-right: 4px;
}

.vote-btn {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
}

/* 加载提示 */
.no-more {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* 底部操作栏 */
.bottom-action {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 30px;
    font-weight: 600;
}

.apply-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vote-btn-lg {
    flex: 2;
}

/* 投票弹窗 */
.vote-popup {
    padding: 30px 20px;
}

.vote-popup h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 600;
}

.vote-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.vote-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.vote-count {
    text-align: center;
    margin-bottom: 20px;
    color: #999;
}

/* 底部导航 */
.van-tabbar {
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
}

/* 选手详情页 */
.page-player-detail {
    padding-bottom: 140px;
}

.header-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.player-info {
    margin: -30px 15px 15px;
    background: white;
    border-radius: 20px;
    padding: 40px 20px 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.info-header {
    display: flex;
    margin-bottom: 20px;
}

.info-header .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-right: 15px;
}

.info-header .info {
    flex: 1;
}

.info-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.player-no {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.declaration {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item .num {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.stat-item .label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-buttons van-button {
    flex: 1;
}

.video-section {
    margin: 15px;
    background: white;
    border-radius: 15px;
    padding: 20px;
}

.video-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.video-section video {
    width: 100%;
    border-radius: 10px;
}

.detail-content {
    padding: 15px;
}

.detail-content p {
    color: #666;
    line-height: 1.8;
}

.custom-fields {
    margin-top: 20px;
}

.field-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.field-item .label {
    color: #999;
}

.field-item .value {
    color: #333;
    font-weight: 500;
}

/* 排行榜页面 */
.page-ranking {
    padding-bottom: 120px;
}

.ranking-list {
    padding: 15px;
}

.ranking-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
}

.ranking-item.top-three {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
    border: 2px solid #ffd93d;
}

.ranking-item .rank {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    margin-right: 15px;
}

.ranking-item.top-three .rank {
    background: linear-gradient(135deg, #ffd93d 0%, #ff9500 100%);
    color: white;
}

.ranking-item .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.ranking-item .info {
    flex: 1;
}

.ranking-item .name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ranking-item .vote-count {
    text-align: right;
}

.ranking-item .vote-count .num {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
}

.ranking-item .vote-count .label {
    font-size: 12px;
    color: #999;
}

/* 报名页面 */
.page-apply {
    padding-bottom: 120px;
}

.form {
    padding: 15px;
}

.form-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.tip {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.submit-btn {
    padding: 20px;
}

/* 投票记录 */
.vote-records {
    padding: 15px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* 小尺寸选手卡片样式 */
.avatar-small {
    padding-bottom: 85% !important;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    height: 55px;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7d7e80;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
}

.bottom-nav .nav-item:active {
    opacity: 0.8;
}

.bottom-nav .nav-item.active {
    color: #ee0a24;
}

.bottom-nav .nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* 弹窗遮罩 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.popup-overlay .vote-popup {
    background: white;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 20px;
}

.badge-small {
    width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
}

.name-small {
    font-size: 11px !important;
}

.votes-small {
    font-size: 10px !important;
}

.player-grid.grid-4 .player-card {
    padding: 10px;
}

.player-grid.grid-5 .player-card {
    padding: 8px;
}

.player-grid.grid-4 .vote-btn,
.player-grid.grid-5 .vote-btn {
    font-size: 10px;
    padding: 4px 0;
}

/* 响应式适配 */
@media screen and (max-width: 320px) {
    .header {
        padding: 50px 15px 25px;
    }
    
    .header .title {
        font-size: 22px;
    }
    
    .time-box {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .player-grid.grid-5 .player-card {
        padding: 6px;
    }
    
    .player-name {
        font-size: 12px;
    }
}

@media screen and (min-width: 480px) {
    .player-grid.grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .player-grid.grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .player-grid.grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .player-grid.grid-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}