
:root {
    --primary: #7c73e6;
    --secondary: #c4c1e0;
    --accent: #ffe9e3;
    --bg-light: #fafafa;
    --text-dark: #2d2d3a;
    --text-muted: #6b6b7b;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(124, 115, 230, 0.08);
    --shadow-md: 0 4px 20px rgba(124, 115, 230, 0.12);
    --shadow-lg: 0 8px 32px rgba(124, 115, 230, 0.16);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /* 轮播图固定高度 */
    --banner-height: 400px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 顶部导航 100%宽度 ==================== */
.top-nav {
    width: 100%;
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(124, 115, 230, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-left .site-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-right: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.nav-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin: 0;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    list-style: none;
}

.nav-center li a {
    display: block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-center li a:hover,
.nav-center li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.nav-center li a.active {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.25);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    transition: var(--transition);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-status:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-status .login-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

/* ==================== Banner + 周榜 固定高度 ==================== */
.banner-row {
    display: flex;
    gap: 20px;
    margin-bottom: 36px;
    border-radius: var(--radius-lg);
    height: var(--banner-height); /* 固定高度 */
    overflow: hidden;
}

.banner-slider {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--secondary);
    height: 100%; /* 继承父级高度 */
    cursor: pointer;
}

.banner-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例裁剪 */
    display: block;
    transition: transform 0.5s ease;
}

.banner-slider:hover img {
    transform: scale(1.03);
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 28px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    pointer-events: none;
}

.banner-tag {
    display: inline-block;
    background: var(--primary);
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.banner-overlay h2 {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.banner-dots {
    position: absolute;
    bottom: 16px;
    right: 28px;
    display: flex;
    gap: 8px;
    pointer-events: none;
}

.banner-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.banner-dots span.active {
    background: #fff;
    width: 28px;
    border-radius: 10px;
}

/* 周榜侧边栏高度自动跟随父级 */
.weekly-rank {
    width: 320px;
    flex-shrink: 0;
    background: var(--accent);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weekly-rank-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.weekly-rank-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.rank-badge {
    font-size: 0.75rem;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.weekly-rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weekly-rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.45);
}

.weekly-rank-list li:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

.rank-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    flex-shrink: 0;
    font-size: 0.85rem;
}

.weekly-rank-list li:nth-child(1) .rank-number {
    background: #e85d75;
}

.weekly-rank-list li:nth-child(2) .rank-number {
    background: #f0985c;
}

.weekly-rank-list li:nth-child(3) .rank-number {
    background: #f0b85c;
}

.weekly-rank-list li img {
    width: 44px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--secondary);
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-info .rank-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.rank-info .rank-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==================== 区块标题 ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    padding-left: 16px;
    position: relative;
    margin: 0;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 24px;
    background: var(--primary);
    border-radius: 3px;
}

.more-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    transition: var(--transition);
}

.more-link:hover {
    background: rgba(124, 115, 230, 0.08);
    color: #5a4fd4;
}

/* ==================== 热门影视 Grid ==================== */
.hot-movies-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.movie-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--secondary);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.movie-card:hover .card-poster img {
    transform: scale(1.07);
}

.card-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.card-info {
    padding: 10px 12px;
}

.card-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==================== 热门明星推荐 ==================== */
.stars-reel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    margin-bottom: 40px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.stars-reel::-webkit-scrollbar {
    height: 6px;
}

.stars-reel::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.star-card-wide {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 20px 18px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.star-card-wide:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.star-card-wide img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--accent);
    transition: var(--transition);
    background: var(--secondary);
}

.star-card-wide:hover img {
    border-color: var(--primary);
    box-shadow: 0 0 22px rgba(124, 115, 230, 0.3);
}

.star-card-wide .star-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.star-card-wide .star-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0;
}

.star-card-wide .star-works {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* ==================== 剧情介绍 ==================== */
.plot-showcase {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.plot-item {
    display: flex;
    gap: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    align-items: center;
}

.plot-item:nth-child(even) {
    flex-direction: row-reverse;
}

.plot-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.plot-item img {
    width: 280px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--secondary);
    transition: transform 0.4s ease;
}

.plot-item:hover img {
    transform: scale(1.04);
}

.plot-content {
    padding: 20px 24px;
    flex: 1;
    min-width: 0;
}

.plot-content .plot-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.plot-content .plot-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==================== 电影详细介绍 ==================== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.detail-vertical-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.detail-vertical-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.detail-vertical-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--secondary);
}

.detail-vertical-card .detail-body {
    padding: 18px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-vertical-card .detail-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.detail-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 14px;
    background: var(--accent);
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
}

.detail-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.detail-extra {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* ==================== 电影详解评论 ==================== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}

.review-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid transparent;
    display: flex;
    gap: 14px;
}

.review-card:hover {
    border-left-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.review-card img.review-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--secondary);
}

.review-content {
    flex: 1;
    min-width: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.review-user {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.review-score {
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.review-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.review-time {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 8px;
}

/* ==================== 底部导航 100%宽度 ==================== */
.bottom-nav {
    width: 100%;
    background: #3d3580;
    color: rgba(255, 255, 255, 0.8);
    padding: 32px 28px 20px;
    margin-top: auto;
}

.bottom-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.bottom-col h4 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.bottom-col ul {
    list-style: none;
}

.bottom-col ul li {
    margin-bottom: 6px;
}

.bottom-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.82rem;
    transition: var(--transition);
}

.bottom-col ul li a:hover {
    color: #fff;
    padding-left: 4px;
}

.bottom-copyright {
    max-width: 1400px;
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== 响应式：轮播图自动调整高度 ==================== */
@media (max-width: 1200px) {
    :root {
        --banner-height: 350px;
    }
    .hot-movies-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .banner-row {
        flex-direction: column;
        height: auto; /* 移动端变回自动高度，周榜不限制 */
    }
    .banner-slider {
        height: var(--banner-height);
    }
    .weekly-rank {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px;
        overflow-x: auto;
        max-height: 280px;
    }
    .weekly-rank-list {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
    }
    .weekly-rank-list li {
        flex-shrink: 0;
        width: 200px;
    }
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --banner-height: 280px;
    }
    .hot-movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .plot-item,
    .plot-item:nth-child(even) {
        flex-direction: column;
    }
    .plot-item img {
        width: 100%;
        height: 200px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .nav-center {
        display: none;
    }
    .bottom-nav-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    :root {
        --banner-height: 220px;
    }
    .hot-movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .star-card-wide {
        flex: 0 0 200px;
    }
    .top-nav-inner {
        padding: 0 12px;
        height: 56px;
        gap: 8px;
    }
    .nav-left h1 {
        font-size: 1.2rem;
    }
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    .weekly-rank {
        max-height: 240px;
    }
}
