/**
 * 比赛页面样式 - 参考晋江/起点比赛专区设计
 */

/* ========== 比赛 Hero 区域 ========== */
.contest-hero {
    padding: 100px 20px 50px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contest-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,74,0.1) 0%, transparent 50%);
    animation: contestFloat 8s ease-in-out infinite;
}

@keyframes contestFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

.contest-hero h1 {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.contest-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

/* ========== 比赛统计概览 ========== */
.contest-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: -30px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

/* ========== 状态筛选标签 ========== */
.contest-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.contest-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    background: white;
    color: #334155;
    border: 1.5px solid #e2e8f0;
}

.contest-tab:hover {
    border-color: #ff6b4a;
    color: #ff6b4a;
    background: rgba(255,107,74,0.06);
}

.contest-tab.active {
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    color: white;
    box-shadow: 0 4px 20px rgba(255,107,74,0.4);
    border-color: transparent;
}

/* ========== 比赛卡片网格 ========== */
.contest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* ========== 比赛卡片 ========== */
.contest-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.contest-card:hover {
    transform: translateY(-8px);
    border-color: #ff6b4a;
    box-shadow: 0 20px 60px rgba(255,107,74,0.15);
}

.contest-card-banner {
    height: 160px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contest-card-banner .contest-icon {
    font-size: 4rem;
    opacity: 0.9;
}

.contest-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.contest-card-status.status-active {
    background: rgba(20,184,166,0.9);
    color: white;
}

.contest-card-status.status-pending {
    background: rgba(245,158,11,0.9);
    color: white;
}

.contest-card-status.status-ended {
    background: rgba(100,116,139,0.9);
    color: white;
}

.contest-card-body {
    padding: 24px;
}

.contest-card-title {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.contest-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.contest-card-title a:hover {
    color: #ff6b4a;
}

.contest-card-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contest-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #94a3b8;
}

.contest-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.contest-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contest-card-footer .entry-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.contest-card-footer .btn-view {
    padding: 8px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.contest-card-footer .btn-view:hover {
    box-shadow: 0 4px 16px rgba(255,107,74,0.4);
    transform: translateY(-2px);
}

/* ========== 比赛详情页 ========== */
.contest-detail-hero {
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    position: relative;
}

.contest-detail-hero .contest-detail-inner {
    max-width: 900px;
    margin: 0 auto;
}

.contest-detail-hero .contest-detail-status {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contest-detail-hero h1 {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.contest-detail-hero .contest-detail-dates {
    display: flex;
    gap: 24px;
    font-size: 0.95rem;
    opacity: 0.85;
    flex-wrap: wrap;
}

.contest-detail-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.contest-detail-section {
    margin-bottom: 48px;
}

.contest-detail-section h2 {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.contest-detail-section .prize-list {
    list-style: none;
    padding: 0;
}

.contest-detail-section .prize-list li {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #334155;
}

/* ========== 参赛作品列表 ========== */
.entry-list {
    display: grid;
    gap: 16px;
}

.entry-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.entry-card:hover {
    border-color: #ff6b4a;
    box-shadow: 0 4px 20px rgba(255,107,74,0.1);
}

.entry-rank {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
}

.entry-rank.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.entry-rank.rank-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); }
.entry-rank.rank-3 { background: linear-gradient(135deg, #CD7F32, #B8860B); }
.entry-rank.rank-other { background: #94a3b8; }

.entry-info {
    min-width: 0;
}

.entry-info .entry-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 4px;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry-info .entry-title:hover {
    color: #ff6b4a;
}

.entry-info .entry-author {
    font-size: 0.85rem;
    color: #0ea5e9;
    text-decoration: none;
}

.entry-info .entry-author:hover {
    text-decoration: underline;
}

.entry-votes {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ff6b4a;
    white-space: nowrap;
}

/* ========== 空状态 ========== */
.contest-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 0 auto 60px;
}

.contest-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.contest-empty h3 {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.contest-empty p {
    color: #64748b;
    font-size: 0.95rem;
}

/* ========== 分页 ========== */
.contest-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contest-pagination a,
.contest-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    background: white;
    color: #334155;
    border: 1.5px solid #e2e8f0;
    transition: all 0.3s;
}

.contest-pagination a:hover {
    color: #ff6b4a;
    border-color: #ff6b4a;
    background: rgba(255,107,74,0.06);
}

.contest-pagination .active {
    background: linear-gradient(135deg, #ff6b4a, #ff8c42) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 4px 16px rgba(255,107,74,0.35);
    font-weight: 600;
}

.contest-pagination .disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.5;
}

/* =========== 奖品展示 =========== */
.contest-card-prizes {
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 12px;
}

.prizes-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.prizes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prize-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: white;
    border-radius: 8px;
    font-size: 0.85rem;
}

.prize-rank {
    font-size: 1.1rem;
}

.prize-name {
    color: #475569;
    font-weight: 500;
}

/* =========== 比赛进度条 =========== */
.contest-progress {
    padding: 0 16px 16px;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
}

/* =========== 英雄区改进 =========== */
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 16px;
}

/* =========== 统计卡片改进 =========== */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #ff6b4a;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
}

/* =========== 标签改进 =========== */
.contest-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.contest-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    background: white;
    color: #334155;
    border: 1.5px solid #e2e8f0;
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-label {
    font-weight: 700;
}

.contest-tab:hover {
    border-color: #ff6b4a;
    color: #ff6b4a;
    background: rgba(255,107,74,0.06);
    transform: translateY(-2px);
}

.contest-tab.active {
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    color: white;
    box-shadow: 0 4px 20px rgba(255,107,74,0.4);
    border-color: transparent;
}
