/* ==================== 全局重置与暗黑背景 ==================== */
body { 
    background-color: #0d1117; 
    color: #c9d1d9; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    line-height: 1.6; 
}
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; border-radius: 8px; object-fit: cover; display: block; }

/* ==================== 核心容器：解决左右留白 ==================== */
.container {
    max-width: 1600px; /* 限制最大宽度，两侧就有大片黑边了 */
    margin: 0 auto;    /* 居中 */
    padding: 0 20px;
}
@media (max-width: 768px) {
    .container { padding: 0 15px; } /* 手机端减小内边距，让内容更宽 */
}

/* ==================== 头部导航 ==================== */
.header { 
    background: #161b22; 
    padding: 15px 0; 
    border-bottom: 1px solid #30363d; 
    position: sticky; top: 0; z-index: 100;
}
.header-inner { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px; 
}
.logo { color: #e50914; font-size: 24px; font-weight: bold; }
.nav-menu { display: flex; gap: 25px; font-size: 16px; color: #c9d1d9; }
.nav-menu a:hover { color: #e50914; }
.search-box { background: #0d1117; border: 1px solid #30363d; padding: 6px 12px; border-radius: 20px; color: #8b949e; font-size: 14px; }

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; gap: 15px; justify-content: center; }
    .nav-menu { flex-wrap: wrap; justify-content: center; font-size: 14px; gap: 15px; }
}

/* ==================== 顶部大图推荐位 ==================== */
.hero-section {
    background: linear-gradient(to right, rgba(13,17,23,0.9), rgba(22,27,34,0.2)), url('https://image.tmdb.org/t/p/original/hpKj5M5s7r6s8d9f.jpg') center/cover;
    border-radius: 16px;
    padding: 60px 40px;
    margin-top: 30px;
    margin-bottom: 40px;
    border: 1px solid #30363d;
    position: relative;
}
.hero-tag { background: #e50914; color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 15px; }
.hero-title { font-size: 36px; color: #fff; margin: 0 0 15px 0; font-weight: bold; }
.hero-desc { font-size: 16px; color: #c9d1d9; max-width: 600px; margin-bottom: 25px; }
.hero-btns { display: flex; gap: 15px; }
.btn-red { background: #e50914; color: #fff; padding: 10px 24px; border-radius: 6px; font-size: 15px; font-weight: bold; border: none; cursor: pointer; }
.btn-blue { background: rgba(255,255,255,0.1); color: #fff; padding: 10px 24px; border-radius: 6px; font-size: 15px; border: 1px solid #4a5568; cursor: pointer; }

@media (max-width: 768px) {
    .hero-section { padding: 40px 20px; }
    .hero-title { font-size: 28px; }
    .hero-desc { font-size: 14px; }
    .hero-btns { flex-direction: column; }
    .btn-red, .btn-blue { width: 100%; text-align: center; }
}

/* ==================== 模块标题 ==================== */
.section-title { 
    font-size: 22px; 
    color: #fff; 
    margin: 40px 0 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    border-left: 4px solid #e50914; 
    padding-left: 12px; 
}
.more-btn { font-size: 14px; color: #8b949e; font-weight: normal; }
.more-btn:hover { color: #e50914; }

/* ==================== 网格系统 (全端自适应) ==================== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-bottom: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }

@media (max-width: 1200px) {
    .grid-6 { grid-template-columns: repeat(4, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

/* ==================== 卡片样式 ==================== */
.card { background: #161a22; border: 1px solid #2a2e38; border-radius: 12px; padding: 20px; transition: transform 0.3s, border-color 0.3s; }
.card:hover { transform: translateY(-5px); border-color: #e50914; }
.card-title { color: #fff; font-size: 18px; font-weight: bold; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { color: #8b949e; font-size: 14px; line-height: 1.5; }
.movie-img { width: 100%; height: 240px; object-fit: cover; border-radius: 12px 12px 0 0; }
.tag-emoji { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 12px; margin-top: 15px; background: rgba(255,255,255,0.05); color: #8b949e; }

/* 吃瓜情报局 */
.gossip-card { display: flex; gap: 15px; align-items: center; }
.gossip-date { background: #e50914; color: #fff; font-size: 20px; font-weight: bold; padding: 10px; border-radius: 8px; text-align: center; line-height: 1; }
.gossip-date span { display: block; font-size: 12px; font-weight: normal; margin-top: 5px; }

/* 神评吐槽墙 */
.comment-wall { background: #161a22; border: 1px solid #2a2e38; border-radius: 12px; padding: 25px; }
.comment-item { display: flex; gap: 15px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #2a2e38; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e50914; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.comment-content { flex: 1; }
.comment-author { color: #8b949e; font-size: 13px; margin-bottom: 5px; }
.comment-text { color: #fff; font-size: 15px; }



/* ==================== 左右混合布局 (今日必看 & 深度专题) ==================== */
.mix-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

/* 左侧列表区 */
.mix-left {
    flex: 2; /* 占2份宽度 */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 左侧单个大卡片 */
.mix-list-card {
    display: flex;
    background: #161a22;
    border: 1px solid #2a2e38;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.3s;
}
.mix-list-card:hover {
    border-color: #e50914;
}
.mix-list-poster {
    width: 140px;
    height: 190px;
    flex-shrink: 0;
    position: relative;
}
.mix-list-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mix-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: #f39c12;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}
.mix-list-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1; /* 防止内容溢出 */
}
.mix-list-title {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mix-list-meta {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.mix-tag-red {
    background: rgba(229, 9, 20, 0.1);
    color: #e50914;
    padding: 2px 6px;
    border-radius: 4px;
}
.mix-list-desc {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mix-heat {
    color: #f39c12;
    font-size: 13px;
    margin-top: 10px;
    font-weight: bold;
}

/* 右侧专题区 */
.mix-right {
    flex: 1; /* 占1份宽度 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.mix-topic-card {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    background: #161a22;
    border: 1px solid #2a2e38;
    min-height: 180px;
}
.mix-topic-card:hover {
    border-color: #e50914;
}
.mix-topic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}
.mix-topic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    box-sizing: border-box;
}
.mix-topic-title {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}
.mix-topic-desc {
    color: #c9d1d9;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 📱 核心自适应调整区 📱 */
@media (max-width: 992px) {
    /* 在平板和手机上，强行把左右并排变成上下堆叠 */
    .mix-layout { 
        flex-direction: column; 
    }
    
    /* 右侧专题在手机端也变成横向并排2个 */
    .mix-right { 
        flex-direction: row; 
        margin-top: 10px;
    }
    .mix-topic-card { 
        height: 180px; 
        flex: 1; 
    }
}

@media (max-width: 768px) {
    /* 手机端：左侧海报变小，适应屏幕 */
    .mix-list-poster { 
        width: 100px; 
        height: 140px; 
    }
    .mix-list-title { 
        font-size: 16px; 
    }
    /* 手机端隐藏年份和地区，防止太长换行太难看 */
    .hide-on-mobile {
        display: none; 
    }
    /* 右侧专题在超小屏幕变成上下排列 */
    .mix-right { 
        flex-direction: column; 
    }
    .mix-topic-card { 
        height: 160px; 
    }
}

/* ==================== 影视吃瓜情报局 (图文左右布局) ==================== */
.gossip-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* 适配小屏幕自动换行 */
}

/* 左侧头条大图 */
.gossip-main {
    flex: 1 1 65%;
    min-width: 300px;
    background: #161a22;
    border: 1px solid #2a2e38;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    box-sizing: border-box;
    text-decoration: none;
}

.gossip-main-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(13,17,23,0.95), rgba(22,27,34,0.2)), url('https://image.tmdb.org/t/p/original/hpKj5M5s7r6s8d9f.jpg') center/cover;
    z-index: 1;
    transition: transform 0.4s ease;
}

.gossip-main:hover .gossip-main-bg {
    transform: scale(1.05); /* 鼠标悬停背景微微放大 */
}

.gossip-main-content {
    position: relative;
    z-index: 2;
}

.gossip-main-tag {
    color: #e50914;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

.gossip-main-title {
    font-size: 24px;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

/* 右侧新闻列表 */
.gossip-list-box {
    flex: 1 1 30%;
    min-width: 300px;
    background: #161a22;
    border: 1px solid #2a2e38;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

.gossip-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
}

.gossip-list li {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #2a2e38;
}

.gossip-list li:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.gossip-time {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.gossip-link {
    color: #c9d1d9;
    font-size: 14px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s;
}

.gossip-link:hover {
    color: #e50914;
}

@media (max-width: 768px) {
    .gossip-main-title { font-size: 20px; }
    .gossip-main { padding: 20px; min-height: 200px; }
}



/* ==================== 今日热播速递 (黄金比例版) ==================== */
.tv-grid {
    display: grid;
    /* PC大屏默认：一行 4 个 */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-bottom: 40px;
}

.tv-card {
    background: #161a22;
    border: 1px solid #2a2e38;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.tv-card:hover {
    transform: translateY(-5px);
    border-color: #e50914;
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.1);
}

/* 图片容器：锁定 16:9 黄金比例，避免图片被裁切变形 */
.tv-card-img-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: #0d1117;
}

.tv-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* 保证图片居中显示 */
    transition: transform 0.4s ease;
}

.tv-card:hover .tv-card-img {
    transform: scale(1.05); /* 鼠标悬浮时图片微微放大，增加高级感 */
}

/* 文字信息区 */
.tv-card-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 标题和分数的排版 */
.tv-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tv-card-title {
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.tv-card-score {
    color: #f39c12;
    font-weight: bold;
    font-size: 15px;
}

/* 简介 */
.tv-card-meta {
    font-size: 13px;
    color: #8b949e;
    line-height: 1.6;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 简介最多显示两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部按钮 */
.tv-more-btn {
    display: inline-block;
    margin-top: auto; /* 永远推到底部对齐 */
    color: #58a6ff;
    font-size: 13px;
    transition: color 0.3s;
}

.tv-card:hover .tv-more-btn {
    color: #e50914;
}

/* ====================  完美自适应区 ==================== */
/* 笔记本端：一行 3 个 */
@media (max-width: 1200px) {
    .tv-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 平板端：一行 2 个 */
@media (max-width: 992px) {
    .tv-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 手机端：一行 1 个 */
@media (max-width: 768px) {
    .tv-grid { grid-template-columns: 1fr; }
    .tv-card-img-box { aspect-ratio: 16 / 9; } /* 手机上保持宽屏比例 */
    .tv-card-title { font-size: 16px; }
}




/* ==================== 本周热搜影人 (宽版横向卡片) ==================== */
.star-grid {
    display: grid;
    /* 默认大屏幕：一行4个 */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* 自适应：中等屏幕（如平板）变成一行2个 */
@media (max-width: 1200px) {
    .star-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 自适应：小屏幕（手机）变成一行1个 */
@media (max-width: 768px) {
    .star-grid {
        grid-template-columns: 1fr;
    }
}

.star-card {
    background: #161a22;
    border: 1px solid #2a2e38;
    border-radius: 12px;
    padding: 15px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, border-color 0.3s;
}

.star-card:hover {
    transform: translateY(-5px);
    border-color: #e50914;
}

.star-avatar-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0; /* 保证头像不被挤压 */
    background: #0d1117;
}

.star-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.star-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.star-name {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.star-desc {
    color: #8b949e;
    font-size: 13px;
}

/* ==================== 影人时间线 (电影感悬浮海报 - 6人版) ==================== */
.timeline-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 50px;
    /* 电脑大屏：一行 6 个 */
    grid-template-columns: repeat(6, 1fr);
}

/* 笔记本/小屏电脑：一行 5 个 */
@media (max-width: 1400px) {
    .timeline-grid { grid-template-columns: repeat(5, 1fr); }
}
/* 中屏电脑：一行 4 个 */
@media (max-width: 1200px) {
    .timeline-grid { grid-template-columns: repeat(4, 1fr); }
}
/* 平板横屏：一行 3 个 */
@media (max-width: 992px) {
    .timeline-grid { grid-template-columns: repeat(3, 1fr); }
}
/* 平板竖屏/手机：一行 2 个 */
@media (max-width: 768px) {
    .timeline-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 小手机：一行 1 个 */
@media (max-width: 480px) {
    .timeline-grid { grid-template-columns: 1fr; }
}

.timeline-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #161a22;
    /* 阴影增加立体感 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    /* 强制 3:4 的竖版人像比例 */
    aspect-ratio: 3 / 4;
}

.timeline-card:hover {
    /* 悬停时卡片稍微放大并浮起 */
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(229, 9, 20, 0.2); 
}

.timeline-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 优先取上部 20% 区域，确保正脸露出 */
    object-position: center 20%; 
    transition: transform 0.5s ease;
    z-index: 1;
}

.timeline-card:hover .timeline-img {
    /* 悬停时图片微微放大 */
    transform: scale(1.08);
}

/* 底部黑色渐变遮罩 */
.timeline-info {
    position: relative;
    z-index: 2;
    padding: 40px 15px 15px;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.95) 0%, rgba(13, 17, 23, 0.7) 50%, transparent 100%);
    text-align: center;
}

.timeline-name {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.timeline-desc {
    color: #c9d1d9;
    font-size: 12px;
    opacity: 0.8;
}

/* ==================== 高能榜单聚合 ==================== */
.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
@media (max-width: 992px) { .rank-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .rank-grid { grid-template-columns: 1fr; } }

.rank-card {
    background: #161a22;
    border: 1px solid #2a2e38;
    border-radius: 12px;
    padding: 20px;
}

.rank-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed #2a2e38;
}
.rank-title span {
    font-size: 12px;
    color: #8b949e;
    font-weight: normal;
}

/* 用 ol 自带计数器生成数字 */
.rank-list {
    list-style: none;
    counter-reset: rank-counter; /* 重置计数器 */
    padding: 0;
    margin: 0;
}
.rank-list li {
    counter-increment: rank-counter; /* 每次循环 +1 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #2a2e38;
}
.rank-list li:last-child { border-bottom: none; padding-bottom: 0; }

.rank-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    width: 80%;
}

/* 生成圆圈数字 */
.rank-item-left::before {
    content: counter(rank-counter);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background: #2a2e38; /* 默认灰色背景 */
    flex-shrink: 0;
}

/* 前 3 名的颜色 */
.rank-list li:nth-child(1) .rank-item-left::before { background: #f39c12; } /* 第1名金色 */
.rank-list li:nth-child(2) .rank-item-left::before { background: #bdc3c7; } /* 第2名银色 */
.rank-list li:nth-child(3) .rank-item-left::before { background: #d35400; } /* 第3名铜色 */

/* 标题文字 */
.rank-item-title {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.rank-item-title:hover { color: #e50914; }

/* 右侧分数 */
.rank-item-score {
    color: #f39c12;
    font-weight: bold;
    font-size: 14px;
    font-family: Arial, sans-serif;
}