:root {
    --primary: #15336e;
    --secondary: #866a2d;
    --accent: #c9a145;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body {
    background: linear-gradient(135deg, #f5f6f7 0%, #eef1f5 100%);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 搜索和筛选区域 */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.search-bar {
    display: flex;
    margin-bottom: 25px;
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--secondary);
}

.search-bar button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 0 50px 50px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--accent);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: var(--light);
    border: 1px solid var(--light-gray);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* 竞赛统计 */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px auto;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--gray);
    font-size: 1rem;
}

/* 竞赛列表 */
.competition-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.competition-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.competition-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.competition-card:hover .card-header img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.card-title {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.95rem;
    color: var(--gray);
}

.card-meta div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-description {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participants {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.participants i {
    color: var(--secondary);
}

.view-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--secondary);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 60px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--light-gray);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}


/* 响应式设计 */
@media (max-width: 992px) {
    .competition-header h1 {
        font-size: 2.5rem;
    }

    .competition-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .competition-header {
        padding: 60px 0 30px;
    }

    .competition-header h1 {
        font-size: 2rem;
    }

    .competition-header p {
        font-size: 1rem;
    }

    .filter-options {
        flex-direction: column;
    }

    .competition-list {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-bar {
        flex-direction: column;
        gap: 10px;
    }

    .search-bar input {
        border-radius: 50px;
    }

    .search-bar button {
        border-radius: 50px;
        padding: 12px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.space {
    height: 30px;
}

/* 1. 动画基础类（不影响内容默认显示） */
.animate-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 2. 导航栏滚动效果 */
header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* 3. Banner区域（确保背景图和文字显示） */
.page-banner {
    position: relative;
    overflow: hidden;
    height: 400px; /* 固定高度，避免背景图不显示 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    animation: bannerFade 1.2s ease forwards 0.5s;
}

@keyframes bannerFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* 4. 统计卡片（确保数据显示，避免被隐藏） */
.stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
}

.stat-card i.layui-icon {
    font-size: 28px;
    color: #15336e;
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 24px;
    color: #15336e;
    margin-bottom: 5px;
}

.stat-card p {
    color: #6c757d;
    font-size: 14px;
}

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

/* 5. 筛选区域（确保按钮和文字显示） */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #15336e;
    font-size: 16px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-block;
    padding: 6px 16px;
    margin: 0 8px 8px 0;
    border-radius: 20px;
    background: white;
    border: 1px solid #e9ecef;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: rgba(247, 183, 51, 0.1);
    color: #15336e;
    border-color: #f7b733;
}

/* 6. 活动列表（确保卡片和图片显示） */
.competition-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.competition-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.card-header {
    position: relative;
    height: 200px; /* 固定图片容器高度 */
}

.card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保图片填充容器 */
    transition: transform 0.8s ease;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #15336e;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    color: #15336e;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.card-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.participants {
    color: #6c757d;
    font-size: 14px;
}

.view-btn {
    background-color: #15336e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: #1f4eb2;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(26, 42, 108, 0.2);
}

/* 7. 分页（确保分页控件显示） */
.pagination {
    margin: 30px 0;
    text-align: center;
}

/* 响应式适配（避免小屏幕内容溢出） */
@media (max-width: 768px) {
    .page-banner {
        height: 300px;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .stats-bar {
        flex-direction: column;
    }

    .competition-list {
        grid-template-columns: 1fr;
    }
}
