
:root {
    --color-dark: #474744;
    --color-blue: #2994b2;
    --color-light: #fffbe0;
    --color-gold: #ffb400;
    --color-white: #ffffff;
    --color-gray-50: #f9f9f9;
    --color-gray-100: #f0f0f0;
    --color-gray-200: #e0e0e0;
    --color-gray-300: #cccccc;
    --color-gray-500: #888888;
    --color-gray-700: #555555;
    --color-gray-900: #222222;
    --color-red: #d94a4a;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.16);
    --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-light);
    color: var(--color-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%;
    height: var(--nav-height);
    background-color: var(--color-dark);
    color: var(--color-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.top-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-gold);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-logo h1:hover {
    color: #ffc940;
    text-shadow: 0 0 20px rgba(255, 180, 0, 0.4);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}
.nav-links li a {
    color: #ddd;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
.nav-links li a:hover {
    color: var(--color-gold);
    background-color: rgba(255, 255, 255, 0.06);
}
.nav-links li a.active {
    color: var(--color-gold);
    font-weight: 600;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.08);
    transition: var(--transition);
    white-space: nowrap;
}
.nav-user:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-gold);
    flex-shrink: 0;
}
.nav-user-name {
    font-size: 0.9rem;
    color: #eee;
    font-weight: 500;
}
.nav-user-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4caf50;
    flex-shrink: 0;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-light);
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: var(--color-light);
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== 主布局 ========== */
.main-wrapper {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
}

/* ========== Hero横幅区 ========== */
.hero-section {
    margin-top: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    height: 360px;
    background-color: var(--color-dark);
    box-shadow: var(--shadow-lg);
}
.hero-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.6s ease;
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 32px 28px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
}
.hero-overlay h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}
.hero-tag {
    display: inline-block;
    background-color: var(--color-gold);
    color: #1a1a1a;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.hero-dots {
    position: absolute;
    bottom: 16px;
    right: 32px;
    display: flex;
    gap: 8px;
    z-index: 2;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.hero-dot.active {
    background-color: var(--color-gold);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 180, 0, 0.6);
}

/* ========== 双栏布局 ========== */
.content-layout {
    display: flex;
    gap: 28px;
    margin-top: 28px;
    margin-bottom: 32px;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 340px;
    flex-shrink: 0;
}

/* ========== 区块标题 ========== */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--color-gold);
    position: relative;
}
.section-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: 0.5px;
}
.section-title .title-icon {
    width: 6px;
    height: 26px;
    background-color: var(--color-gold);
    border-radius: 3px;
}
.section-title .more-link {
    margin-left: auto;
    color: var(--color-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.section-title .more-link:hover {
    color: #1a7a96;
    text-decoration: underline;
}

/* ========== 热门影视6x4网格 ========== */
.film-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}
.film-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}
.film-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.film-card-img-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background-color: #e8e8e8;
}
.film-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.film-card:hover .film-card-img-wrap img {
    transform: scale(1.06);
}
.film-card-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--color-gold);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    z-index: 2;
}
.film-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--color-blue);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.5px;
}
.film-card-info {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.film-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.film-card-meta {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-top: auto;
}
.film-card-type {
    font-size: 0.7rem;
    color: var(--color-blue);
    font-weight: 500;
}

/* ========== 剧情介绍区 ========== */
.plot-section {
    margin-bottom: 36px;
}
.plot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.plot-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}
.plot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.plot-card-img-wrap {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #e8e8e8;
}
.plot-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.plot-card:hover .plot-card-img-wrap img {
    transform: scale(1.05);
}
.plot-card-body {
    padding: 14px 16px;
}
.plot-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-dark);
}
.plot-card-body p {
    font-size: 0.85rem;
    color: var(--color-gray-700);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ========== 电影详细介绍区 ========== */
.detail-section {
    margin-bottom: 36px;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.detail-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    gap: 16px;
    padding: 16px;
    cursor: pointer;
}
.detail-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.detail-card-poster {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: #e8e8e8;
}
.detail-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.detail-card-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--color-dark);
}
.detail-card-content .detail-meta {
    font-size: 0.8rem;
    color: var(--color-gray-500);
    margin-bottom: 6px;
    line-height: 1.4;
}
.detail-card-content .detail-meta span {
    margin-right: 12px;
    white-space: nowrap;
}
.detail-card-content .detail-desc {
    font-size: 0.83rem;
    color: var(--color-gray-700);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}
.detail-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.detail-card-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    background-color: #f0f7fa;
    color: var(--color-blue);
    font-weight: 500;
}

/* ========== 评论区 (通用样式) ========== */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 14px;
    transition: var(--transition);
}
.comment-item:hover {
    box-shadow: var(--shadow-md);
}
.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #e8e8e8;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.comment-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-dark);
}
.comment-score {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--color-gold);
    background-color: #fffdf0;
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid #ffe9a0;
}
.comment-time {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-left: auto;
}
.comment-text {
    font-size: 0.88rem;
    color: var(--color-gray-700);
    line-height: 1.6;
}
.comment-movie {
    font-size: 0.78rem;
    color: var(--color-blue);
    font-weight: 500;
}

/* 侧边栏内的评论紧凑样式 (宽屏) */
@media (min-width: 901px) {
    .sidebar .comment-item {
        padding: 12px 14px;
        gap: 10px;
    }
    .sidebar .comment-avatar {
        width: 36px;
        height: 36px;
    }
    .sidebar .comment-username {
        font-size: 0.82rem;
    }
    .sidebar .comment-score {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    .sidebar .comment-time {
        font-size: 0.7rem;
    }
    .sidebar .comment-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    .sidebar .comment-movie {
        font-size: 0.72rem;
    }
}

/* ========== 侧边栏通用卡片 ========== */
.sidebar-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
}
.sidebar-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-gold);
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card h3 .side-icon {
    width: 5px;
    height: 20px;
    background-color: var(--color-gold);
    border-radius: 2px;
    display: inline-block;
}
/* 周榜推荐 */
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}
.rank-item:hover {
    background-color: #fdfaf0;
}
.rank-num {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    background-color: #e8e8e8;
    color: var(--color-gray-700);
}
.rank-item.top1 .rank-num {
    background-color: #ffb400;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 180, 0, 0.35);
}
.rank-item.top2 .rank-num {
    background-color: #c0c0c0;
    color: #fff;
    font-weight: 700;
}
.rank-item.top3 .rank-num {
    background-color: #cd9a5b;
    color: #fff;
    font-weight: 700;
}
.rank-poster {
    width: 40px;
    height: 54px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #e8e8e8;
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-meta {
    font-size: 0.7rem;
    color: var(--color-gray-500);
}
.rank-hot {
    font-size: 0.7rem;
    color: #e07040;
    font-weight: 600;
}

/* 明星推荐 */
.star-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.star-card {
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    border-radius: var(--radius-sm);
}
.star-card:hover {
    background-color: #fdfaf0;
    transform: translateY(-3px);
}
.star-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
    transition: var(--transition);
    background-color: #e8e8e8;
}
.star-card:hover img {
    border-color: var(--color-gold);
    box-shadow: 0 4px 16px rgba(255, 180, 0, 0.3);
}
.star-card .star-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 6px;
    color: var(--color-dark);
}
.star-card .star-works {
    font-size: 0.7rem;
    color: var(--color-gray-500);
}

/* ========== 底部导航 100%宽度 ========== */
.footer-nav {
    width: 100%;
    background-color: var(--color-dark);
    color: #ccc;
    padding: 32px 24px 20px;
    margin-top: auto;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.footer-col h4 {
    color: var(--color-gold);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.footer-col ul li a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.footer-col ul li a:hover {
    color: var(--color-gold);
    padding-left: 4px;
}
.footer-bottom {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .film-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .plot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar {
        width: 280px;
    }
    .hero-section {
        height: 280px;
    }
    .hero-overlay h2 {
        font-size: 1.5rem;
    }
}
@media (max-width: 900px) {
    .content-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .film-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .plot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .star-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-section {
        height: 220px;
    }
    .hero-overlay {
        padding: 20px 16px 16px;
    }
    .hero-overlay h2 {
        font-size: 1.2rem;
    }
    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 移动端侧边栏内评论恢复原尺寸 */
    .sidebar .comment-item {
        padding: 18px 20px;
        gap: 14px;
    }
    .sidebar .comment-avatar {
        width: 48px;
        height: 48px;
    }
    .sidebar .comment-username {
        font-size: 0.9rem;
    }
    .sidebar .comment-score {
        font-size: 0.8rem;
    }
    .sidebar .comment-time {
        font-size: 0.75rem;
    }
    .sidebar .comment-text {
        font-size: 0.88rem;
    }
    .sidebar .comment-movie {
        font-size: 0.78rem;
    }
}
@media (max-width: 600px) {
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .plot-grid {
        grid-template-columns: 1fr;
    }
    .detail-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-card-poster {
        width: 100px;
    }
    .star-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .hero-section {
        height: 180px;
    }
    .hero-overlay h2 {
        font-size: 1rem;
    }
    .hero-overlay p {
        font-size: 0.8rem;
        display: none;
    }
    .comment-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .main-wrapper {
        padding: 0 12px;
    }
    .top-nav-inner {
        padding: 0 12px;
    }
    .nav-logo h1 {
        font-size: 1.2rem;
    }
    .nav-user-name {
        display: none;
    }
    .section-title h2 {
        font-size: 1.1rem;
    }
}
@media (max-width: 380px) {
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .film-card-info {
        padding: 6px 8px;
    }
    .film-card-title {
        font-size: 0.78rem;
    }
    .hero-section {
        height: 150px;
    }
}

/* 导航移动端菜单展开 */
.nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--color-dark);
    padding: 16px 24px;
    gap: 12px;
    z-index: 999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
