/* {模板路径}/static/css/style.css */
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

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

/* 头部样式 */
header {
    background-color: #1a1a2e;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    color: #e94560;
    font-size: 24px;
    margin: 0;
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

nav ul li a:hover {
    color: #e94560;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e94560;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 横幅区域样式 */
.banner {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #e94560;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

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

.search-box button {
    background-color: #e94560;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #d13354;
}

/* 内容区域通用样式 */
.content-section {
    padding: 60px 0;
}

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

.section-header h2 {
    font-size: 28px;
    color: #1a1a2e;
    position: relative;
    padding-left: 15px;
}

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

.more {
    color: #e94560;
    font-weight: 500;
}

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

/* 电影卡片样式 */
.movie-grid, .tv-grid, .variety-grid, .animation-grid, .newest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.movie-card, .tv-card, .variety-card, .animation-card, .newest-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover, .tv-card:hover, .variety-card:hover, .animation-card:hover, .newest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.movie-poster, .tv-poster, .variety-poster, .animation-poster, .newest-poster {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-top: 150%; /* 2:3 宽高比 */
}

.movie-poster img, .tv-poster img, .variety-poster img, .animation-poster img, .newest-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img,
.tv-card:hover .tv-poster img,
.variety-card:hover .variety-poster img,
.animation-card:hover .animation-poster img,
.newest-card:hover .newest-poster img {
    transform: scale(1.05);
}

.movie-info, .tv-info, .variety-info, .animation-info, .newest-info {
    padding: 15px;
}

.movie-info h3, .tv-info h3, .variety-info h3, .animation-info h3, .newest-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating, .update, .category {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.rating {
    color: #e94560;
    font-weight: 500;
}

/* 排行榜样式 */
.ranking-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

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

.ranking-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1a1a2e;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

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

.rank {
    width: 25px;
    height: 25px;
    background-color: #f0f0f0;
    color: #666;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 15px;
}

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

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

.ranking-list li:nth-child(3) .rank {
    background-color: #4caf50;
    color: #fff;
}

.title {
    flex: 1;
    font-size: 15px;
}

.score {
    color: #e94560;
    font-weight: 500;
}

/* 文章样式 */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.article-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1a1a2e;
}

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

.article-content p {
    font-size: 15px;
    margin-bottom: 15px;
    text-align: justify;
}

/* 关于我们样式 */
.about-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text p {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: justify;
}

.about-text ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.about-text ul li {
    font-size: 16px;
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.about-text ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: #e94560;
    border-radius: 50%;
}

/* 页脚样式 */
footer {
    background-color: #1a1a2e;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h2 {
    font-size: 24px;
    color: #e94560;
    margin-bottom: 10px;
}

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

.footer-links h3, .footer-category h3, .footer-contact h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after, .footer-category h3::after, .footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #e94560;
}

.footer-links ul li, .footer-category ul li {
    margin-bottom: 10px;
}

.footer-links ul li a, .footer-category ul li a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover, .footer-category ul li a:hover {
    color: #e94560;
    padding-left: 5px;
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
    font-size: 14px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        text-align: center;
        margin-bottom: 15px;
    }
    
    nav {
        flex-direction: column;
    }
    
    nav ul {
        justify-content: center;
        margin-top: 10px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .banner {
        padding: 60px 0;
    }
    
    .banner-content h2 {
        font-size: 28px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .movie-grid, .tv-grid, .variety-grid, .animation-grid, .newest-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .ranking-container, .articles-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }
    
    nav ul li {
        margin: 0 5px;
    }
    
    .banner-content h2 {
        font-size: 24px;
    }
    
    .banner-content p {
        font-size: 14px;
    }
    
    .search-box input, .search-box button {
        padding: 10px;
        font-size: 14px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .movie-grid, .tv-grid, .variety-grid, .animation-grid, .newest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
