:root {
    --color-bg: #eeeeee;
    --color-accent: #0092ca;
    --color-mid: #393e46;
    --color-dark: #222831;
    --color-white: #ffffff;
    --color-text: #222831;
    --color-text-secondary: #393e46;
    --color-border: #dddddd;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1400px;
    --nav-height: 60px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: var(--nav-height);
}

/* ========== 顶部导航栏 ========== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--color-dark);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    gap: 16px;
}

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

.top-nav .nav-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 1px;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition);
}
.top-nav .nav-left h1:hover {
    color: var(--color-accent);
}
.top-nav .nav-left h1 span {
    color: var(--color-accent);
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}
.nav-center a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 20px;
    transition: all var(--transition);
    white-space: nowrap;
    font-weight: 500;
}
.nav-center a:hover,
.nav-center a.active {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}
.nav-center a.active {
    color: var(--color-accent);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.nav-right .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
    cursor: pointer;
    transition: transform var(--transition);
    background-color: #555;
}
.nav-right .user-avatar:hover {
    transform: scale(1.1);
}
.nav-right .login-text {
    color: #dddddd;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition);
    font-weight: 500;
}
.nav-right .login-text:hover {
    color: var(--color-accent);
}
.nav-right .vip-badge {
    background: linear-gradient(135deg, #f5a623, #e8961a);
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* ========== 主容器 ========== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    gap: 24px;
}

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

.sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== Hero Banner ========== */
.hero-banner {
    width: 100%;
    height: 340px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    margin-bottom: 28px;
    box-shadow: var(--shadow-lg);
    background-color: var(--color-mid);
}
.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-banner .banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 28px;
    background: linear-gradient(transparent, rgba(34, 40, 49, 0.9));
    color: #fff;
}
.hero-banner .banner-overlay h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.hero-banner .banner-overlay p {
    font-size: 0.9rem;
    opacity: 0.85;
}
.hero-banner .banner-btn {
    display: inline-block;
    margin-top: 10px;
    background-color: var(--color-accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.hero-banner .banner-btn:hover {
    background-color: #007ba5;
    transform: translateY(-1px);
}

/* ========== 区块标题 ========== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
}
.section-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: 0.5px;
}
.section-title .more-link {
    font-size: 0.85rem;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.section-title .more-link:hover {
    color: #007ba5;
    text-decoration: underline;
}

/* ========== 热门影视网格 6行x4列 ========== */
.hot-movies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.movie-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.movie-card .poster-wrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background-color: #d5d5d5;
    position: relative;
}
.movie-card .poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}
.movie-card .poster-wrap .quality-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.movie-card .poster-wrap .score-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(34, 40, 49, 0.85);
    color: #ffb800;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}
.movie-card .card-info {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.movie-card .card-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.movie-card .card-info .meta {
    font-size: 0.75rem;
    color: var(--color-mid);
    display: flex;
    gap: 8px;
    align-items: center;
}
.movie-card .card-info .meta .type-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #999;
}

/* ========== 周榜推荐（侧边栏） ========== */
.weekly-rank {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
}
.weekly-rank .rank-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
    letter-spacing: 0.5px;
}
.weekly-rank .rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.weekly-rank .rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    background: #fafafa;
}
.weekly-rank .rank-list li:hover {
    background: #eef9fd;
    transform: translateX(3px);
}
.weekly-rank .rank-num {
    font-size: 1.1rem;
    font-weight: 800;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    color: #fff;
    background: #999;
}
.weekly-rank .rank-list li:nth-child(1) .rank-num {
    background: #e74c3c;
}
.weekly-rank .rank-list li:nth-child(2) .rank-num {
    background: #f39c12;
}
.weekly-rank .rank-list li:nth-child(3) .rank-num {
    background: #e67e22;
}
.weekly-rank .rank-list li:nth-child(4) .rank-num,
.weekly-rank .rank-list li:nth-child(5) .rank-num,
.weekly-rank .rank-list li:nth-child(6) .rank-num,
.weekly-rank .rank-list li:nth-child(7) .rank-num,
.weekly-rank .rank-list li:nth-child(8) .rank-num,
.weekly-rank .rank-list li:nth-child(9) .rank-num,
.weekly-rank .rank-list li:nth-child(10) .rank-num {
    background: var(--color-mid);
}
.weekly-rank .rank-info {
    flex: 1;
    min-width: 0;
}
.weekly-rank .rank-info .rn-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.weekly-rank .rank-info .rn-hot {
    font-size: 0.7rem;
    color: var(--color-mid);
}
.weekly-rank .rank-thumb {
    width: 44px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #ddd;
}

/* ========== 热门明星推荐 ========== */
.stars-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.star-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding-bottom: 14px;
    transition: all var(--transition);
    cursor: pointer;
}
.star-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.star-card .star-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #d8d8d8;
}
.star-card .star-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.star-card:hover .star-img-wrap img {
    transform: scale(1.05);
}
.star-card h4 {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark);
}
.star-card .star-role {
    font-size: 0.75rem;
    color: var(--color-mid);
    margin-top: 2px;
}

/* ========== 剧情介绍 ========== */
.plot-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.plot-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 14px;
    padding: 14px;
    transition: all var(--transition);
    cursor: pointer;
}
.plot-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.plot-card .plot-img {
    width: 140px;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background-color: #d5d5d5;
}
.plot-card .plot-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 4px;
}
.plot-card .plot-content p {
    font-size: 0.78rem;
    color: var(--color-mid);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 电影详细介绍 ========== */
.detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}
.detail-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 16px;
    padding: 16px;
    transition: all var(--transition);
    cursor: pointer;
}
.detail-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.detail-card .detail-poster {
    width: 130px;
    height: 180px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background-color: #d5d5d5;
}
.detail-card .detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.detail-card .detail-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
}
.detail-card .detail-info .detail-meta {
    font-size: 0.75rem;
    color: var(--color-mid);
}
.detail-card .detail-info .detail-meta span {
    margin-right: 10px;
}
.detail-card .detail-info .detail-desc {
    font-size: 0.78rem;
    color: var(--color-mid);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail-card .detail-info .detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.detail-card .detail-info .detail-tags .tag {
    font-size: 0.68rem;
    background: #eef9fd;
    color: var(--color-accent);
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* ========== 侧边栏内的电影评论样式（紧凑适配） ========== */
.sidebar-comments {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
}
.sidebar-comments .comment-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
    letter-spacing: 0.5px;
}
.sidebar-comments .comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sidebar-comments .comment-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: #fafafa;
    transition: background var(--transition);
    align-items: flex-start;
}
.sidebar-comments .comment-item:hover {
    background: #f0f7fa;
}
.sidebar-comments .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #ddd;
}
.sidebar-comments .comment-body {
    flex: 1;
    min-width: 0;
}
.sidebar-comments .comment-body .comment-user {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-dark);
}
.sidebar-comments .comment-body .comment-time {
    font-size: 0.7rem;
    color: #999;
    margin-left: 6px;
}
.sidebar-comments .comment-body .comment-text {
    font-size: 0.78rem;
    color: var(--color-mid);
    margin-top: 4px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-comments .comment-rating {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.85rem;
    color: #f5a623;
    margin-top: 2px;
}

/* ========== 底部导航 ========== */
.footer-nav {
    width: 100%;
    background-color: var(--color-dark);
    color: #cccccc;
    padding: 28px 24px 20px;
    margin-top: 20px;
}
.footer-nav .footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}
.footer-nav .footer-col h5 {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 600;
}
.footer-nav .footer-col a {
    display: block;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 0.8rem;
    margin-bottom: 5px;
    transition: color var(--transition);
}
.footer-nav .footer-col a:hover {
    color: var(--color-accent);
}
.footer-nav .footer-bottom {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid #444;
    text-align: center;
    font-size: 0.75rem;
    color: #888;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    .sidebar>* {
        flex: 1;
        min-width: 260px;
    }
    .hot-movies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .hot-movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .stars-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .plot-cards {
        grid-template-columns: 1fr;
    }
    .detail-cards {
        grid-template-columns: 1fr;
    }
    .hero-banner {
        height: 220px;
    }
    .nav-center {
        display: none;
    }
}

@media (max-width: 600px) {
    .hot-movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stars-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .plot-card {
        flex-direction: column;
    }
    .plot-card .plot-img {
        width: 100%;
        height: 140px;
    }
    .detail-card {
        flex-direction: column;
    }
    .detail-card .detail-poster {
        width: 100%;
        height: 200px;
    }
    .sidebar {
        flex-direction: column;
    }
    .top-nav {
        padding: 0 12px;
    }
    .top-nav .nav-left h1 {
        font-size: 1.2rem;
    }
    .hero-banner {
        height: 180px;
    }
    .hero-banner .banner-overlay h2 {
        font-size: 1.2rem;
    }
}
