/* {模板路径}/static/css/style.css */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a:hover {
    color: #2980b9;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    /* 优化图片SEO */
    alt-text: attr(alt);
    title: attr(title);
    loading: "lazy";
}

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

/* 头部样式 */
#header {
    background-color: #1a1a2e;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    flex: 0 0 200px;
}

.logo a {
    display: block;
}

.main-nav {
    flex: 1;
}

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

.main-nav ul li {
    margin: 0 15px;
}

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

.main-nav ul li a:hover {
    color: #3498db;
}

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

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

.search-box {
    flex: 0 0 250px;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    height: 36px;
    padding: 0 15px;
    border: none;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box button {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    margin-left: -36px;
}

.search-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: #fff;
    bottom: -6px;
    right: -2px;
    transform: rotate(45deg);
}

/* 横幅区域 */
.banner {
    height: 500px;
    position: relative;
    margin-top: 70px;
    overflow: hidden;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 80%;
}

.banner h1 {
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.btn.secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid #fff;
}

.btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.banner-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gradient-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: slide-animation 15s infinite;
}

.gradient-slide:nth-child(1) {
    animation-delay: 0s;
}

.gradient-slide:nth-child(2) {
    animation-delay: 5s;
}

.gradient-slide:nth-child(3) {
    animation-delay: 10s;
}

@keyframes slide-animation {
    0%, 26.66%, 100% { opacity: 0; }
    3.33%, 23.33% { opacity: 1; }
}

/* 通用部分样式 */
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: #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: #3498db;
    border-radius: 2.5px;
}

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

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

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

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

.movie-poster, .tv-poster, .animation-poster, .variety-poster, .newest-poster {
    height: 250px;
    position: relative;
}

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

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

.movie-meta, .tv-meta, .animation-meta, .variety-meta, .newest-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.movie-desc, .tv-desc, .animation-desc, .variety-desc {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 排行榜样式 */
.ranking-section {
    background-color: #fff;
}

.ranking-tabs {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-header {
    display: flex;
    background-color: #f5f5f5;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-item.active {
    background-color: #3498db;
    color: #fff;
}

.tab-content {
    padding: 20px;
}

/* {模板路径}/static/css/style.css (续) */

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

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

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

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

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

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

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

.rank-poster {
    width: 60px;
    height: 80px;
    border-radius: 4px;
    margin-right: 15px;
}

.rank-info {
    flex: 1;
}

.rank-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.rank-info p {
    font-size: 12px;
    color: #999;
}

.play-count {
    font-size: 12px;
    color: #999;
}

/* APP下载区域样式 */
.app-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #fff;
}

.app-content {
    display: flex;
    align-items: center;
}

.app-info {
    flex: 1;
    padding-right: 50px;
}

.app-info h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.app-info p {
    font-size: 16px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.app-features {
    margin-bottom: 30px;
}

.app-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #3498db;
    margin-right: 10px;
    position: relative;
}

.feature-icon::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
}

.app-download-btns {
    display: flex;
    gap: 20px;
}

.download-btn {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.download-btn i {
    margin-right: 10px;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 50%;
    position: relative;
}

.android-icon::before {
    content: 'A';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3498db;
    font-weight: bold;
}

.ios-icon::before {
    content: 'i';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3498db;
    font-weight: bold;
}

.app-qrcode {
    flex: 0 0 200px;
    height: 200px;
    border-radius: 10px;
    position: relative;
}

.app-qrcode::after {
    content: '扫码下载APP';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 文章区域样式 */
.article-section {
    background-color: #f9f9f9;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

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

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

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

.article-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

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

.footer-top {
    display: flex;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 0 0 200px;
    margin-right: 50px;
}

.footer-nav {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.footer-nav-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-nav-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #3498db;
}

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

.footer-nav-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-nav-col ul li a:hover {
    color: #3498db;
}

.footer-middle {
    margin-bottom: 40px;
}

.footer-middle h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-middle h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #3498db;
}

.footer-middle ul {
    display: flex;
    flex-wrap: wrap;
}

.footer-middle ul li {
    margin-right: 15px;
    margin-bottom: 10px;
}

.footer-middle ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-middle ul a:hover {
    color: #3498db;
}

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

.footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-nav ul li {
        margin: 0 10px;
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .app-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    #header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }
    
    .logo {
        flex: 0 0 100%;
        margin-bottom: 15px;
    }
    
    .main-nav {
        order: 3;
        flex: 0 0 100%;
        margin-top: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav ul li {
        margin: 5px 10px;
    }
    
    .search-box {
        flex: 0 0 100%;
    }
    
    .banner {
        height: 400px;
        margin-top: 120px;
    }
    
    .banner h1 {
        font-size: 32px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .movie-grid, .tv-grid, .animation-grid, .variety-grid, .newest-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-nav {
        flex-wrap: wrap;
    }
    
    .footer-nav-col {
        flex: 0 0 50%;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 300px;
    }
    
    .banner h1 {
        font-size: 24px;
    }
    
    .banner p {
        font-size: 14px;
    }
    
    .banner-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .movie-grid, .tv-grid, .animation-grid, .variety-grid, .newest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-nav-col {
        flex: 0 0 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card, .tv-card, .animation-card, .variety-card, .newest-card, .article-item {
    animation: fadeIn 0.5s ease forwards;
}

.movie-card:nth-child(2), .tv-card:nth-child(2), .animation-card:nth-child(2), .variety-card:nth-child(2), .newest-card:nth-child(2), .article-item:nth-child(2) {
    animation-delay: 0.1s;
}

.movie-card:nth-child(3), .tv-card:nth-child(3), .animation-card:nth-child(3), .variety-card:nth-child(3), .newest-card:nth-child(3), .article-item:nth-child(3) {
    animation-delay: 0.2s;
}

.movie-card:nth-child(4), .tv-card:nth-child(4), .animation-card:nth-child(4), .variety-card:nth-child(4), .newest-card:nth-child(4), .article-item:nth-child(4) {
    animation-delay: 0.3s;
}

.movie-card:nth-child(5), .tv-card:nth-child(5), .animation-card:nth-child(5), .variety-card:nth-child(5), .newest-card:nth-child(5), .article-item:nth-child(5) {
    animation-delay: 0.4s;
}

.movie-card:nth-child(6), .tv-card:nth-child(6), .animation-card:nth-child(6), .variety-card:nth-child(6), .newest-card:nth-child(6), .article-item:nth-child(6) {
    animation-delay: 0.5s;
}
