/* ==========================================================================
   花都影视 - 沉浸式流媒体平台核心样式表
   主题：高端黑金、沉浸式、移动优先
   ========================================================================== */

:root {
    --color-primary: #E50914; /* 经典影视红 */
    --color-primary-hover: #F40612;
    --color-bg-dark: #000000; /* 纯黑 */
    --color-bg-panel: #141414; /* 深渊黑 */
    --color-bg-card: #181818;
    --color-text-main: #FFFFFF; /* 纯白 */
    --color-text-muted: #E5E5E5; /* 次级灰 */
    --color-text-dim: #808080;
    --color-gold: #D4AF37; /* 黑金辅助色 */
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    
    --z-header: 1000;
    --z-modal: 2000;
    --z-tooltip: 3000;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text-muted);
}

ul {
    list-style: none;
}

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

/* ================== 按钮与通用组件 ================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

.btn-gold {
    background: linear-gradient(135deg, #D4AF37, #F3E5AB);
    color: #000;
}

.btn-gold:hover {
    filter: brightness(1.1);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ================== 顶部导航栏 ================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: var(--z-header);
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transition: background-color var(--transition-normal);
}

.site-header.scrolled {
    background-color: var(--color-bg-panel);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 4%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 40px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.logo img {
    height: 32px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-text-main);
    font-weight: 600;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-btn, .user-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

/* 移动端菜单开关 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-panel);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    }
    .main-nav.active {
        display: flex;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

/* ================== 沉浸式Hero区 ================== */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%),
                linear-gradient(to top, var(--color-bg-dark) 0%, rgba(0,0,0,0) 20%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 70px; /* offset header */
    width: 50%;
    min-width: 320px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.meta-badge {
    border: 1px solid rgba(255,255,255,0.4);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.meta-match {
    color: #46d369;
    font-weight: 600;
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .hero-content {
        width: 100%;
        padding-bottom: 40px;
        justify-content: flex-end;
    }
    .hero-title { font-size: 2.5rem; }
    .hero-desc { font-size: 1rem; }
    .hero-overlay {
        background: linear-gradient(to top, var(--color-bg-dark) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.3) 100%);
    }
}

/* ================== 横向滑动海报流 ================== */
.carousel-section {
    padding: 2vw 0;
    position: relative;
    z-index: 5;
    margin-top: -5vw;
}

.carousel-section:not(:first-of-type) {
    margin-top: 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 0 4%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title a {
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 600;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

.section-title:hover a {
    opacity: 1;
    transform: translateX(0);
}

.carousel-container {
    position: relative;
    padding: 0 4%;
}

.carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 20px 0;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.poster-card {
    flex: 0 0 calc(16.666% - 10px);
    position: relative;
    border-radius: 4px;
    transition: transform var(--transition-slow);
    cursor: pointer;
}

.poster-card:hover {
    transform: scale(1.05) translateY(-5px);
    z-index: 10;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.landscape-card {
    flex: 0 0 calc(25% - 10px);
}

.landscape-card img {
    aspect-ratio: 16/9;
}

/* 进度条样式（继续观看） */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
}

/* 悬浮信息卡（简易版） */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: 0 0 4px 4px;
}

.poster-card:hover .card-info {
    opacity: 1;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 100%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast);
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

@media (max-width: 1200px) {
    .poster-card { flex: 0 0 calc(20% - 10px); }
    .landscape-card { flex: 0 0 calc(33.333% - 10px); }
}
@media (max-width: 900px) {
    .poster-card { flex: 0 0 calc(25% - 10px); }
    .landscape-card { flex: 0 0 calc(50% - 10px); }
}
@media (max-width: 600px) {
    .poster-card { flex: 0 0 calc(33.333% - 10px); }
    .landscape-card { flex: 0 0 calc(80% - 10px); }
    .carousel-btn { display: none; }
}

/* ================== VIP权益横幅 ================== */
.vip-banner {
    margin: 40px 4%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.vip-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    z-index: 0;
}

.vip-content {
    position: relative;
    z-index: 1;
}

.vip-title {
    font-size: 1.8rem;
    color: var(--color-gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vip-desc {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.vip-action {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .vip-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* ================== 底部区域 ================== */
.site-footer {
    background-color: #000;
    padding: 60px 4% 30px;
    margin-top: 50px;
    border-top: 1px solid #222;
}

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

.footer-col h4 {
    color: var(--color-text-main);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--color-text-muted);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #222;
    color: var(--color-text-dim);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--color-text-dim);
    font-size: 1.2rem;
}

.social-links a:hover {
    color: var(--color-text-main);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ================== 内页通用样式 ================== */
.page-header {
    padding: 120px 4% 40px;
    background: linear-gradient(to bottom, #141414, #000);
    border-bottom: 1px solid #222;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-desc {
    color: var(--color-text-muted);
    max-width: 800px;
    font-size: 1.1rem;
}

.content-section {
    padding: 40px 4%;
}

.rich-text {
    color: var(--color-text-muted);
    line-height: 1.8;
}

.rich-text h2 {
    color: #fff;
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

.rich-text h3 {
    color: #fff;
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.rich-text p {
    margin-bottom: 1.5rem;
}

.rich-text ul, .rich-text ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.rich-text li {
    margin-bottom: 0.5rem;
}

/* 详情页特有样式 */
.detail-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
}

.detail-content {
    display: flex;
    gap: 40px;
    position: relative;
    z-index: 3;
    padding: 0 4%;
    width: 100%;
}

.detail-poster {
    width: 250px;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    transform: translateY(20px);
}

.detail-info {
    flex-grow: 1;
}

.detail-info .hero-title {
    font-size: 3rem;
}

.cast-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.cast-item {
    text-align: center;
    width: 100px;
}

.cast-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #333;
    margin: 0 auto 10px;
    object-fit: cover;
}

.cast-name {
    font-size: 0.9rem;
    color: #fff;
}

.cast-role {
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-poster {
        width: 180px;
        transform: translateY(0);
    }
    .detail-info .hero-actions {
        justify-content: center;
    }
}
