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

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

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

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

a:hover {
    color: #e74c3c;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #c0392b;
    color: #fff;
}

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

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.main-nav ul {
    display: flex;
}

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

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

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

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

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

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
}

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

/* 轮播图样式 */
.banner {
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.slider {
    position: relative;
    height: 500px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.slide-content h1, .slide-content h2 {
    margin-bottom: 15px;
    font-size: 36px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    margin-bottom: 20px;
    font-size: 18px;
    max-width: 600px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.slider-controls button {
    background-color: rgba(255, 255, 255, 0.5);
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #fff;
}

/* 区块通用样式 */
section {
    padding: 50px 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.section-title h2 {
    font-size: 24px;
    color: #333;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
}

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

/* 最新剧集样式 */
.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.episode-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;
}

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

.episode-thumb {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.episode-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.episode-card:hover .episode-thumb img {
    transform: scale(1.1);
}

.episode-number {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(231, 76, 60, 0.8);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.episode-info {
    padding: 15px;
}

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

.episode-info p {
    color: #666;
    font-size: 14px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 剧情简介样式 */
.plot-summary {
    background-color: #fff;
    padding: 50px 0;
}

.plot-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.plot-image {
    flex: 0 0 40%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.plot-text {
    flex: 1;
}

.plot-text p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 演员表样式 */
.cast-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.cast-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;
}

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

.cast-photo {
    height: 0;
    padding-bottom: 100%; /* 1:1 比例 */
    position: relative;
    overflow: hidden;
}

.cast-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cast-card:hover .cast-photo img {
    transform: scale(1.1);
}

.cast-info {
    padding: 15px;
    text-align: center;
}

.cast-info h3 {
    margin-bottom: 5px;
    font-size: 16px;
}

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

/* 文章样式 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
}

.article-thumb {
    flex: 0 0 200px;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumb img {
    transform: scale(1.1);
}

.article-info {
    flex: 1;
    padding: 20px;
}

.article-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

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

.article-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
}

/* 推荐剧集样式 */
.recommendation-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.recommendation-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;
}

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

.recommendation-thumb {
    position: relative;
    height: 0;
    padding-bottom: 140%; /* 海报比例 */
    overflow: hidden;
}

.recommendation-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommendation-card:hover .recommendation-thumb img {
    transform: scale(1.1);
}

.rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(231, 76, 60, 0.8);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.recommendation-info {
    padding: 15px;
    text-align: center;
}

.recommendation-info h3 {
    margin-bottom: 5px;
    font-size: 16px;
}

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

/* APP下载样式 */
.app-download {
    background-color: #2c3e50;
    color: #fff;
    padding: 70px 0;
}

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

.app-info {
    flex: 1;
}

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

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

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

.app-features li i {
    margin-right: 10px;
    color: #e74c3c;
}

.app-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-android, .btn-ios {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.btn-android i, .btn-ios i {
    margin-right: 8px;
}

.qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.app-preview {
    flex: 0 0 300px;
}

.app-preview img {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 页脚样式 */
footer {
    background-color: #222;
    color: #fff;
    padding-top: 50px;
}

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

.footer-logo {
    flex: 0 0 25%;
}

.footer-logo p {
    margin-top: 15px;
    color: #aaa;
}

.footer-links {
    flex: 0 0 70%;
    display: flex;
    justify-content: space-between;
}

.link-group h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e74c3c;
}

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

.link-group ul li a {
    color: #aaa;
    transition: color 0.3s ease;
}

.link-group ul li a:hover {
    color: #e74c3c;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 30px 0;
}

.friend-links {
    margin-bottom: 20px;
}

.friend-links h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #e74c3c;
}

.friend-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links ul li a, .friend-links ul a {
    color: #aaa;
    font-size: 14px;
}

.copyright {
    text-align: center;
    color: #777;
    font-size: 14px;
}

.copyright p {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .search-box {
        width: 100%;
        justify-content: center;
    }
    
    .search-box input {
        width: 70%;
    }
    
    .slider {
        height: 400px;
    }
    
    .slide-content {
        padding: 30px;
    }
    
    .slide-content h1, .slide-content h2 {
        font-size: 28px;
    }
    
    .plot-content {
        flex-direction: column;
    }
    
    .plot-image {
        margin-bottom: 20px;
        flex: 0 0 100%;
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .app-preview {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
        flex: 0 0 100%;
    }
    
    .footer-links {
        flex-wrap: wrap;
        flex: 0 0 100%;
    }
    
    .link-group {
        flex: 0 0 48%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .episode-list, .cast-list, .recommendation-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-thumb {
        flex: 0 0 180px;
    }
    
    .slider {
        height: 300px;
    }
    
    .slide-content h1, .slide-content h2 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .app-buttons {
        flex-direction: column;
    }
    
    .link-group {
        flex: 0 0 100%;
    }
}

/* 图标样式 */
.icon-check::before {
    content: "✓";
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 50%;
    margin-right: 8px;
}

.icon-android::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z'/%3E%3C/svg%3E");
    margin-right: 8px;
}

.icon-apple::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z'/%3E%3C/svg%3E");
    margin-right: 8px;
}
