/* 竞赛页面样式 Competition Page Styles */

/* 竞赛英雄区域 Competition Hero Section */
.competitions-hero {
    background: linear-gradient(135deg, #2c3e50, #4a69bd);
    color: #fff;
    padding: 80px 0 40px;
    text-align: center;
}

.competitions-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.competitions-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* 搜索和过滤区域 Search and Filter Area */
.search-filter {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    max-width: 900px;
    margin: 30px auto 0;
}

.search-box {
    display: flex;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-box button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #2980b9;
}

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

.filter-options select {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: white;
    min-width: 150px;
}

/* 竞赛列表区域 Competition List Section */
.competitions-list {
    padding: 60px 0;
    background: #f8f9fa;
}

.competitions-list h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: #2c3e50;
}

.competition-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* 竞赛卡片 Competition Card */
.competition-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.competition-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.competition-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.competition-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.competition-status.upcoming {
    background: #3498db;
}

.competition-status.ongoing {
    background: #2ecc71;
}

.competition-status.past {
    background: #95a5a6;
}

.competition-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.competition-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.competition-content h3.en {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #34495e;
    font-weight: 500;
}

.competition-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.info-item i {
    margin-right: 5px;
    color: #3498db;
}

.competition-content p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.competition-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.competition-tags span {
    background: #f0f2f5;
    color: #2c3e50;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.competition-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* 分页 Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* 竞赛日历区域 Competition Calendar Section */
.competition-calendar {
    padding: 60px 0;
    background: white;
}

.competition-calendar h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.2rem;
    color: #2c3e50;
}

.competition-calendar > .container > p {
    text-align: center;
    margin-bottom: 40px;
    color: #7f8c8d;
}

.calendar-wrapper {
    max-width: 900px;
    margin: 0 auto 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #3498db;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.calendar-header button:hover {
    background: #e3f2fd;
}

.calendar-header h3 {
    font-size: 1.3rem;
    color: #2c3e50;
}

.calendar-grid {
    padding: 20px;
}

.calendar-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    height: 60px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-day:hover {
    background: #f0f2f5;
}

.calendar-day.today {
    background: #e3f2fd;
    font-weight: 600;
    color: #3498db;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3498db;
}

.calendar-day.other-month {
    color: #ccc;
}

.upcoming-events {
    max-width: 900px;
    margin: 0 auto;
}

.upcoming-events h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #2c3e50;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.event-item:hover {
    transform: translateY(-3px);
}

.event-date {
    width: 80px;
    background: #3498db;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.event-date .day {
    font-size: 1.8rem;
    font-weight: 700;
}

.event-date .month {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.event-details {
    padding: 15px;
    flex: 1;
}

.event-details h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #2c3e50;
}

.event-details p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.event-details .event-type {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f2f5;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #2c3e50;
}

/* 竞赛资源区域 Competition Resources Section */
.competition-resources {
    padding: 60px 0;
    background: #f8f9fa;
}

.competition-resources h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.2rem;
    color: #2c3e50;
}

.competition-resources > .container > p {
    text-align: center;
    margin-bottom: 40px;
    color: #7f8c8d;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.resource-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-icon {
    width: 70px;
    height: 70px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.resource-icon i {
    font-size: 2rem;
    color: #3498db;
}

.resource-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #2c3e50;
}

.resource-card p {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 响应式设计 Responsive Design */
@media (min-width: 768px) {
    .competition-card {
        flex-direction: row;
    }
    
    .competition-image {
        width: 300px;
        height: auto;
    }
    
    .competition-content {
        flex: 1;
    }
    
    .competition-actions {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .competitions-hero h1 {
        font-size: 2rem;
    }
    
    .competitions-hero p {
        font-size: 1rem;
    }
    
    .search-filter {
        padding: 15px;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .competition-image {
        height: 180px;
    }
    
    .competition-content {
        padding: 20px;
    }
    
    .competition-content h3 {
        font-size: 1.3rem;
    }
    
    .competition-actions {
        flex-direction: column;
    }
    
    .calendar-day {
        height: 45px;
    }
    
    .resource-card {
        padding: 20px;
    }
}

/* 英文版本样式 English Version Styles */
.en {
    display: none;
}

/* 当语言切换为英文时显示英文内容 Show English content when language is switched to English */
body.english .en {
    display: block;
}

body.english :not(.en):not(input):not(select):not(button):not(i):not(a):not([class^="fas"]):not([class^="fab"]):not([class^="far"]) {
    display: none;
}

body.english .competition-tags span,
body.english .info-item span,
body.english .competition-status,
body.english .event-type,
body.english .event-date .day,
body.english .event-date .month {
    display: inline-block;
}

body.english .search-box input,
body.english .filter-options select {
    display: block;
}

body.english .calendar-day,
body.english .pagination-btn {
    display: flex;
}

body.english .calendar-day-names div,
body.english .calendar-days {
    display: grid;
}

body.english .competition-info,
body.english .competition-tags,
body.english .competition-actions,
body.english .info-item,
body.english .pagination,
body.english .calendar-header,
body.english .event-item,
body.english .event-date,
body.english .social-icons,
body.english .footer-content,
body.english .footer-links,
body.english .resources-grid {
    display: flex;
}

body.english .competition-cards,
body.english .calendar-day-names,
body.english .calendar-days,
body.english .resources-grid {
    display: grid;
}