/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
}

/* 导航栏样式 */
nav {
    background: linear-gradient(135deg, #3498db, #2980b9);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.nav-logo span {
    margin-right: 8px;
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 学科卡片区域 */
.subjects-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    display: inline-block;
    padding-bottom: 15px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    border-radius: 2px;
}

/* 学科卡片容器 */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* 学科卡片 */
.subject-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border-top: 4px solid #667eea;
}

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

.subject-card:nth-child(2) {
    border-top-color: #f093fb;
}

.subject-card:nth-child(3) {
    border-top-color: #f5576c;
}

.subject-card:nth-child(4) {
    border-top-color: #4facfe;
}

.subject-card:nth-child(5) {
    border-top-color: #43e97b;
}

.subject-header {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.subject-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.subject-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subject-card p {
    color: #666;
    font-size: 0.95rem;
}

.subject-content {
    padding: 25px;
}

.subject-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.subject-link:hover {
    background: #e3f2fd;
    border-left-color: #3498db;
    transform: translateX(5px);
}

.subject-link i {
    margin-right: 12px;
    font-size: 1.1rem;
}

/* 通知区域 */
.notice-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    scroll-margin-top: 100px;
    margin-bottom: 60px;
}

.notice-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.notice-section h3 i {
    margin-right: 10px;
    color: #e74c3c;
}

.notice-content {
    line-height: 1.8;
    color: #555;
}

.notice-link {
    display: inline-block;
    margin-left: 15px;
    padding: 5px 12px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.notice-link:hover {
    background: #2980b9;
}

/* 视频讲解区域 */
.videos-section {
    margin-bottom: 60px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

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

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    height: 180px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    cursor: pointer;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: '\f04b';
}

.video-info {
    padding: 20px;
}

.video-info h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.video-subject {
    display: inline-block;
    padding: 4px 12px;
    background: #e3f2fd;
    color: #2196f3;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.8;
}

.footer p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 视频播放模态框 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-modal-video {
    width: 100%;
    height: 600px;
    max-height: 70vh;
    object-fit: contain;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-title {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-modal-video {
        height: 400px;
    }
    
    .container {
        padding: 20px 15px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 成绩查询区域 */
.search-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.result-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.result-item h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.result-item p {
    color: #666;
    margin-bottom: 5px;
}

/* 倒计时区域 */
.countdown-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
}

#countdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.countdown-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid #667eea;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.countdown-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.countdown-card h4 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.countdown-timer {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin: 12px 0;
    line-height: 1.2;
}

.competition-name {
    color: #e74c3c;
    font-weight: bold;
}

.countdown-days {
    color: #e74c3c;
    font-weight: bold;
    font-size: 2rem;
}

.countdown-time {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.5rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.competition-list {
    margin-top: 12px;
    text-align: left;
}

.competition-item {
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #555;
    border-left: 2px solid #667eea;
}

.competition-item:last-child {
    margin-bottom: 0;
}

.countdown-label {
    font-size: 1rem;
    color: #666;
    margin-top: 8px;
}

.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.view-all-link {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.view-all-link:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 快速入口样式 */
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.quick-link i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea;
}

.quick-link span {
    font-weight: 500;
    font-size: 1rem;
}

/* 状态卡片样式 */
.status-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid #667eea;
}

.status-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.status-card h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.status-card p {
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9rem;
}