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

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #e0e0e0;
}

.btn-primary {
    background-color: #ff5a5f;
    color: #fff;
}

.btn-primary:hover {
    background-color: #ff3c42;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 28px;
    color: #ff5a5f;
    font-weight: bold;
}

.search-box {
    display: flex;
    width: 40%;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 0 15px;
    background-color: #ff5a5f;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 10px;
}

/* 导航样式 */
.main-nav {
    background-color: #333;
    padding: 10px 0;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav ul li a {
    color: #fff;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
}

.main-nav ul li a:hover {
    background-color: #ff5a5f;
}

/* 轮播图样式 */
.banner-section {
    padding: 20px 0;
}

.banner-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.banner-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.banner-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* 卡片样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 22px;
    color: #333;
    position: relative;
    padding-left: 15px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: #ff5a5f;
    border-radius: 2px;
}

.more {
    color: #ff5a5f;
    font-size: 14px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.card-img {
    position: relative;
}

.card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.score, .episode, .update, .tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff5a5f;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.card-info {
    padding: 15px;
}

.card-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 14px;
    color: #666;
}

/* 排行榜样式 */
.ranking-section {
    padding: 40px 0;
}

.ranking-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ranking-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ranking-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.ranking-list .num {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 14px;
}

.ranking-list li:nth-child(1) .num {
    background-color: #ff5a5f;
    color: #fff;
}

.ranking-list li:nth-child(2) .num {
    background-color: #ff9a9e;
    color: #fff;
}

.ranking-list li:nth-child(3) .num {
    background-color: #ffbec0;
    color: #fff;
}

.ranking-list a {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-list .hot {
    display: inline-block;
    padding: 2px 6px;
    background-color: #ff5a5f;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

/* 文章样式 */
.article-section {
    padding: 40px 0;
    background-color: #fff;
}

.article-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.article-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.article-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.article-content {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    color: #ff5a5f;
    font-size: 14px;
}

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

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo p {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ff5a5f;
}

.footer-logo .slogan {
    font-size: 14px;
    color: #ccc;
}

.footer-nav {
    display: flex;
    gap: 50px;
}

.footer-nav-group h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-nav-group ul li {
    margin-bottom: 10px;
}

.footer-nav-group ul li a {
    font-size: 14px;
    color: #ccc;
}

.footer-nav-group ul li a:hover {
    color: #ff5a5f;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.footer-bottom p {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ranking-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .card-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ranking-container {
        grid-template-columns: 1fr;
    }
    
    .banner-item img {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .banner-item img {
        height: 200px;
    }
    
    .banner-content h2 {
        font-size: 20px;
    }
    
    .banner-content p {
        font-size: 14px;
    }
}

/* 其他模块样式 */
.recommend-section,
.tvshow-section,
.variety-section,
.anime-section,
.documentary-section,
.newest-section {
    padding: 40px 0;
}

.tvshow-section,
.anime-section,
.newest-section {
    background-color: #fff;
}