/* 全局样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

main {
    min-height: calc(100vh - 200px);
}

/* 按钮与链接 */
a {
    color: #3498db;
    text-decoration: none;
}

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

/* 首页Hero区 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* 介绍区 */
.intro {
    background: white;
    padding: 2.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.intro h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.intro p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

/* 区块 */
.section {
    padding: 3rem 0;
}

.section-alt {
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.more-link {
    color: #3498db;
    font-size: 1rem;
    text-decoration: none;
}

.more-link:hover {
    text-decoration: underline;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.rank-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.video-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.video-card h3 a {
    color: inherit;
    text-decoration: none;
}

.video-card h3 a:hover {
    color: #3498db;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.video-meta .tag, .video-meta span {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.video-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* 专题卡片 */
.topic-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.topic-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s;
}

.topic-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
}

.topic-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.topic-card p {
    opacity: 0.9;
}

/* 列表页 */
.page-container {
    padding: 2rem 1rem;
    background: white;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-container h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

.page-intro {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.list-item {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    position: relative;
    transition: background 0.3s;
}

.list-item:hover {
    background: #f0f0f0;
}

.year-badge, .genre-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #95a5a6;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.list-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.list-item h3 a {
    color: inherit;
    text-decoration: none;
}

.list-item h3 a:hover {
    color: #3498db;
}

.list-item .desc {
    color: #666;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* 详情页 */
.detail-container {
    background: white;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-container > h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 1rem;
}

.detail-container section {
    margin-bottom: 2.5rem;
}

.detail-container h2 {
    font-size: 1.5rem;
    color: #34495e;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
    padding-left: 1rem;
}

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

.info-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-item strong {
    color: #2c3e50;
}

.oneline-text {
    font-size: 1.15rem;
    color: #e74c3c;
    font-weight: 500;
    line-height: 1.8;
    padding: 1rem;
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
}

.video-summary p, .video-review p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
    text-align: justify;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.related-item:hover {
    background: #ecf0f1;
}

.related-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.related-item h4 a {
    color: inherit;
    text-decoration: none;
}

.related-item h4 a:hover {
    color: #3498db;
}

.related-item p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .topic-links {
        grid-template-columns: 1fr;
    }

    .detail-container {
        padding: 1.5rem 1rem;
    }

    .detail-container > h1 {
        font-size: 1.8rem;
    }
}

/* 返回顶部按钮 */
#backToTop {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #3498db;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
    z-index: 999;
}

#backToTop:hover {
    background: #2980b9;
}