/* 全局样式 */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #888888;
    --background-color: #ffffff;
    --text-color: #000000;
    --border-color: #e0e0e0;
    --hover-color: #333333;
    --transition-speed: 0.3s;
    --douyin-color: #fe2c55;
}

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

body {
    font-family: 'Noto Serif SC', serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    font-weight: 300;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

ul {
    list-style: none;
}

/* 头部样式 */
header {
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container {
    margin-bottom: 20px;
}

.logo-container h1 {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.underline {
    height: 2px;
    width: 60px;
    background-color: var(--primary-color);
    margin-top: 8px;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
}

nav a:hover {
    color: var(--hover-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* 主要内容区域 */
main {
    padding: 20px 0;
}

.section {
    margin-bottom: 80px;
}

.section-header {
    margin-bottom: 40px;
    position: relative;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.section-underline {
    height: 1px;
    width: 40px;
    background-color: var(--primary-color);
}

.section-description {
    margin-top: 15px;
    color: var(--accent-color);
    font-size: 0.95rem;
}

/* 首页英雄区 */
.hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    background-color: #f9f9f9;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 文章卡片 */
.articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.article-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.article-card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.article-card p {
    margin-bottom: 20px;
    color: #333;
}

.read-more {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.read-more:hover::after {
    width: 100%;
}

/* 视频卡片 */
.videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    transition: all var(--transition-speed) ease;
}

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

.video-thumbnail {
    position: relative;
    height: 240px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.video-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.douyin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.video-thumbnail:hover .douyin-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

.play-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--douyin-color);
}

.video-thumbnail:hover .play-button {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 1);
}

.video-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.video-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* 文件和项目展示 */
.file-card {
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

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

.file-icon {
    font-size: 2rem;
    margin-right: 20px;
    color: var(--accent-color);
}

.file-info {
    flex: 1;
}

.file-info h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--accent-color);
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.file-info p {
    font-size: 0.95rem;
    color: #333;
}

.file-download {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    white-space: nowrap;
    margin-left: 15px;
}

.file-download:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: var(--background-color);
    margin: 5% auto;
    padding: 40px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    cursor: pointer;
}

.close-button:hover {
    color: var(--primary-color);
}

#article-content {
    line-height: 1.8;
}

#article-content h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 500;
}

#article-content h2 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    font-weight: 500;
}

#article-content h3 {
    font-size: 1.2rem;
    margin: 25px 0 10px;
    font-weight: 500;
}

#article-content p {
    margin-bottom: 20px;
}

#article-content ul, #article-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

#article-content li {
    margin-bottom: 8px;
}

#article-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
    margin-left: 0;
    color: #555;
    font-style: italic;
    margin-bottom: 20px;
}

/* 页脚 */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a:hover {
    color: var(--hover-color);
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .articles, .videos {
        grid-template-columns: 1fr;
    }
    
    .file-card {
        flex-direction: column;
        text-align: center;
    }
    
    .file-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .file-meta {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .file-download {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 50vh;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .article-card, .video-card {
        padding: 20px;
    }
}
