/* Cinema Template - 现代简洁大气的影视模板 */

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e50914;
    --primary-dark: #b20710;
    --secondary-color: #564d4d;
    --bg-dark: #141414;
    --bg-darker: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --border-color: #333333;
    --hover-color: #f40612;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.7);
}

body.cinema-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== 头部样式 ===== */
.cinema-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    background: var(--bg-darker);
    padding: 8px 0;
    font-size: 13px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-info .info-text {
    color: var(--text-secondary);
}

.header-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-link {
    color: var(--text-secondary);
    font-size: 13px;
}

.header-link:hover {
    color: var(--primary-color);
}

.divider {
    color: var(--text-muted);
}

.header-main {
    padding: 15px 0;
}

.header-main-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 32px;
}

.logo:hover {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.nav-item {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.header-search {
    flex-shrink: 0;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 15px;
    width: 250px;
    font-size: 14px;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-dark);
}

.search-btn {
    background: var(--primary-color);
    border: none;
    color: var(--text-primary);
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* ===== 主要内容区域 ===== */
.cinema-main {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* ===== 轮播横幅 ===== */
.hero-banner {
    margin-bottom: 50px;
    position: relative;
}

.hero-slider {
    position: relative;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    z-index: 2;
}

.hero-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 600px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-item {
    background: rgba(229, 9, 20, 0.8);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.hero-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 5px;
}

/* ===== 区块样式 ===== */
.section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
}

.section-more {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-more:hover {
    color: var(--primary-color);
}

/* ===== 视频网格 ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.video-item {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-link {
    display: block;
}

.video-poster {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: var(--bg-darker);
}

.video-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-item:hover .video-poster img {
    transform: scale(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 48px;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 42px;
}

.video-time {
    font-size: 12px;
    color: var(--text-muted);
}

.video-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.meta-tag {
    background: var(--bg-dark);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== 列表页 ===== */
.list-page {
    padding: 20px 0;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-text {
    color: var(--text-muted);
    font-size: 16px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn,
.page-num {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover,
.page-num:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.page-num.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 5px;
}

/* ===== 详情页 ===== */
.detail-page {
    padding: 30px 0;
}

.detail-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-poster {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.detail-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    padding: 20px 0;
}

.detail-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-item strong {
    color: var(--text-primary);
    margin-right: 8px;
}

.detail-desc {
    color: var(--text-secondary);
    line-height: 1.8;
}

.detail-desc h3 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 15px;
}

.detail-desc p {
    font-size: 15px;
}

/* ===== 播放器 ===== */
.player-section {
    margin: 40px 0;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.player-container {
    width: 100%;
}

#player-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.player-controls {
    margin-top: 20px;
}

.play-lines {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.line-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.line-btn:hover,
.line-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.play-episodes {
    margin-top: 15px;
}

.episode-list {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-list.active {
    display: flex;
}

.episode-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.episode-btn:hover,
.episode-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

/* ===== 相关推荐 ===== */
.related-section {
    margin-top: 50px;
}

/* ===== 页脚 ===== */
.cinema-footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.copyright {
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .header-main-content {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .main-nav.active {
        max-height: 500px;
        padding-top: 20px;
    }

    .nav-item {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .header-search {
        order: 2;
        flex: 1;
    }

    .search-input {
        width: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-slider {
        height: 350px;
    }

    .hero-content {
        padding: 20px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .section-title {
        font-size: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-slider {
        height: 280px;
    }

    .hero-title {
        font-size: 22px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .detail-title {
        font-size: 24px;
    }

    .pagination {
        gap: 5px;
    }

    .page-btn,
    .page-num {
        min-width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

