/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #ef4238;
}

/* 顶部导航栏 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    height: 80px;
}

.logo {
    margin-right: 30px;
}

.logo img {
    height: 40px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-right: 20px;
    font-size: 16px;
}

.main-nav li.active a {
    color: #ef4238;
}

.city-select a {
    display: flex;
    align-items: center;
}

.user-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.app-download {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.app-download i {
    margin-left: 5px;
    font-size: 20px;
}

/* 电影海报和基本信息 */
.movie-banner {
    background: linear-gradient(to bottom, #1c2933, #2b3c4e);
    padding: 40px 0 20px;
    color: #fff;
    position: relative;
}

.movie-info {
    display: grid;
    grid-template-columns: 230px minmax(270px, 220px) 250px;
    grid-gap: 30px;
    position: relative;
    padding-bottom: 20px;
}

.movie-poster {
    width: 230px;
    height: 320px;
    position: relative;
    margin-bottom: -70px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
    padding: 5px;
    margin-right: 0;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.movie-basic-info {
    width: auto;
    display: flex;
    flex-direction: column;
    padding-top: 5px;
    height: 270px;
    justify-content: space-between;
}

.movie-info-top {
    margin-bottom: 0;
}

.movie-title {
    font-size: 26px;
    margin-bottom: 8px;
}

.movie-title-en {
    font-size: 18px;
    color: #999;
    margin-bottom: 15px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#cast,#gallery{
    display: none;
}
.movie-brief-info {
    margin-bottom: 12px;
}

.movie-brief-info span {
    margin-right: 15px;
    color: #fff;
}

.movie-release-info {
    color: #999;
    margin-bottom: 20px;
}

.movie-info-bottom {
    margin-top: 0;
    margin-bottom: 0;
}

.movie-action {
    display: flex;
    margin-bottom: 10px;
}

.movie-buy {
    margin-top: 10px;
    width: 100%;
    max-width: 210px;
}

.movie-score-container {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: flex-start;
    padding-top: 5px;
    height: 270px;
    margin-left: 0;
}

.score-box {
    text-align: center;
    margin-bottom: 30px;
}

.wish-box {
    text-align: center;
}

.score-title, .wish-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.score-value {
    font-size: 36px;
    color: #ffb400;
    line-height: 1;
    margin-bottom: 5px;
}

.score-people {
    font-size: 12px;
    color: #999;
}

.wish-value {
    font-size: 36px;
    color: #ef4238;
    line-height: 1;
    margin-bottom: 5px;
}

.wish-value span {
    font-size: 14px;
    margin-left: 2px;
}

.btn-want, .btn-score {
    display: inline-block;
    width: 100px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 4px;
    font-size: 16px;
}

.btn-want {
    background-color: #8a4fff;
    color: #fff;
    margin-right: 10px;
}

.btn-score {
    background-color: #666;
    color: #fff;
}

.btn-buy {
    display: block;
    width: 210px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #ef4238;
    border-radius: 4px;
    font-size: 16px;
    color: #fff;
    margin-top: 10px;
}

/* 电影详情内容区域 */
.movie-detail-content {
    padding: 65px 0 40px;
    background-color: #fff;
}

.movie-detail-content .container {
    display: flex;
    justify-content: space-between;
}

.content-main {
    width: 70%;
}

.content-sidebar {
    width: 28%;
}

/* 导航标签 */
.detail-nav {
    margin-bottom: 30px;
}

.nav-path {
    margin-bottom: 20px;
    color: #999;
}

.nav-path a {
    color: #999;
}

.nav-path a:hover {
    color: #ef4238;
}

.nav-tabs {
    border-bottom: 1px solid #e5e5e5;
    display: flex;
}

.tab-item {
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    position: relative;
}

.tab-item.active {
    color: #ef4238;
}

.tab-item.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ef4238;
}

/* 通用区块样式 */
.section-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
}

.section-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    padding-left: 10px;
}

.section-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background-color: #ef4238;
}

/* 评论区域样式 */
.movie-comments {
    display: none; /* 默认隐藏评论区域 */
}

.movie-comments.active {
    display: block;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.comments-count {
    color: #999;
    font-size: 14px;
}

/* 评论发布区域 */
.comment-post {
    display: flex;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-input-area {
    flex: 1;
}

.comment-input-area textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    resize: none;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating {
    color: #ffb400;
}

.rating i {
    margin-right: 5px;
    cursor: pointer;
}

.btn-post {
    padding: 8px 20px;
    background-color: #ef4238;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 评论筛选栏 */
.comment-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.filter-tabs .filter-tab {
    margin-right: 20px;
    color: #666;
}

.filter-tabs .filter-tab.active {
    color: #ef4238;
}

.filter-dropdown select {
    padding: 5px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

/* 评论列表 */
.comment-list {
    margin-bottom: 30px;
}

.comment-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

.comment-user {
    width: 60px;
    margin-right: 20px;
    text-align: center;
}

.user-name {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-rating {
    color: #ffb400;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

.comment-text {
    margin-bottom: 15px;
    line-height: 1.6;
}

.comment-actions a {
    margin-right: 20px;
    color: #999;
}

.comment-actions a:hover {
    color: #ef4238;
}

.comment-actions i {
    margin-right: 5px;
}

/* 分页 */
.comment-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.page-prev,
.page-next,
.page-num {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    margin: 0 5px;
    border-radius: 4px;
}

.page-num.active {
    background-color: #ef4238;
    color: #fff;
}

.page-ellipsis {
    margin: 0 5px;
}

.page-jump {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.jump-input {
    width: 40px;
    height: 30px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.jump-button {
    padding: 0 10px;
    height: 30px;
    background-color: #ef4238;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-left: 5px;
    cursor: pointer;
}

/* 侧边栏样式 */
.sidebar-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    padding-left: 10px;
}

.sidebar-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background-color: #ef4238;
}

.related-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.related-poster {
    width: 100px;
    height: 60px;
    margin-right: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.related-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    flex: 1;
}

.related-title {
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.4;
}

.related-views {
    color: #999;
    font-size: 12px;
}

/* 底部样式修改 */
.site-footer {
    background-color: #262426;
    padding: 40px 0;
    color: #999;
    margin-top: auto; /* 确保footer在底部 */
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: #999;
    margin: 0 15px;
}

.footer-info {
    text-align: center;
    line-height: 2;
    font-size: 12px;
}

.footer-certificates {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.footer-certificates a {
    margin: 0 10px;
}

.footer-certificates img {
    height: 40px;
}

/* 清除浮动相关样式可以移除，因为使用了flex布局 */
.clearfix:after {
    content: none;
}

/* 主体内容 */
.movie-detail-container {
    flex: 1;
}

/* 演职人员区域样式调整 */
.cast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cast-list {
    display: flex;
    gap: 30px; /* 导演和演员容器之间的间距 */
    flex-wrap: wrap; /* 允许在必要时换行 */
}

.cast-category {
    flex: 0 0 auto; /* 不平均分配空间，根据内容自适应宽度 */
    margin-bottom: 20px; /* 在小屏幕上换行时的底部间距 */
}

/* 调整导演容器宽度 */
.cast-category:first-child {
    min-width: 120px; /* 确保至少能容纳一个导演头像 */
    max-width: 30%; /* 限制最大宽度 */
}

/* 调整演员容器宽度 */
.cast-category:last-child {
    min-width: 260px; /* 确保至少能容纳两个演员头像 */
    /* max-width: 70%; */ /* 限制最大宽度 */
    flex-grow: 1;
}

.category-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.cast-items {
    display: flex;
    flex-wrap: wrap; /* 允许在必要时换行 */
    gap: 20px; /* 项目之间的间距 */
    justify-content: space-between;
}

.cast-item {
    width: 145px; /* 固定宽度 */
    text-align: center; /* 文字居中 */
}

.cast-avatar {
    width: 145px;
    height: 170px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-name {
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-role {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.more {
    color: #666;
    font-size: 14px;
}

.more:hover {
    color: #ef4238;
}

/* 图集区域样式 - 修正版 */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gallery-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* 左侧大图占2份，右侧小图各占1份 */
    grid-template-rows: 1fr 1fr; /* 两行等高 */
    gap: 10px; /* 图片之间的间距 */
    height: 400px; /* 固定总高度 */
}

.gallery-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05); /* 鼠标悬停时轻微放大效果 */
}

/* 大图效果 */
.gallery-item.large {
    grid-column: 1; /* 占据第一列 */
    grid-row: 1 / span 2; /* 从第一行开始，跨越两行 */
}

/* 小图效果 */
.gallery-item.small {
    /* 小图自动填充剩余网格 */
}

/* 影片资料样式 */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-item {
    display: flex;
}

.data-label {
    color: #999;
    width: 80px;
    flex-shrink: 0;
}

.data-value {
    color: #333;
    flex: 1;
}

/* 票房区域样式 */
.box-office-data {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.box-office-item {
    text-align: center;
    width: 33.33%;
}

.box-office-value {
    font-size: 24px;
    color: #ef4238;
    margin-bottom: 5px;
}

.box-office-label {
    font-size: 14px;
    color: #999;
}
#cast .cast-list{
    width: 100%;
    gap: 0;
}

#cast .cast-list .cast-category{
    width: 100%;
    min-width: none;
    max-width: none;
}
#actor-wrap{
    grid-column-gap: 23px;
    justify-content: flex-start;
}