.movie-page-background {
    background-color: #020015;
    position: relative; /* 添加相对定位 */
    overflow: hidden; /* 防止视频溢出 */
}

.movie-layout {
    display: grid;
    grid-template-columns: 1fr 5fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar content"
        "sidebar download";
    gap: 20px;
    padding: 20px;
}

.movie-header-space {
    grid-area: header;
    position: relative;
    height: 400px;
    border-radius: var(--border);
    overflow: hidden;
    margin-bottom: -112px; /* 让内容卡片上移，覆盖视频底部 */
    z-index: 1;
    background: none;
}

.blog-recommend {
    grid-area: content;
    width: 100%;
    position: relative;
    z-index: 2; /* 确保内容在视频上层 */
    margin-top: -194px; /* 配合header的margin-bottom，实现覆盖效果 */
    margin-bottom: 20px;
}
.right-content1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.magical {
    --border: 12px;
}

.left-content {
    position: relative;
    max-width: 232px;
    border-radius: 12px;
    background-color: #141419;
    box-shadow: 0px 0px 32px 0px rgba(10, 10, 14, 0.8);
    width: 100%;
    height: auto;
    overflow: visible;
}
.left-content::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
}
.left-content img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    filter: brightness(0.8);
    transition: filter 0.2s;
    object-fit: cover;
}

.douban-badge {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100px;
    height: 100px;
    z-index: 5;
    overflow: hidden;
    border-radius: 0 0 12px 0;
}
.douban-badge::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 100px 100px 0 0;
    border-color: transparent #141418 transparent transparent;
    transform: rotate(0deg);
}
.douban-badge-inner {
    position: absolute;
    right: 1px;
    bottom: 24px;
    color: #fff;
    text-align: center;
    width: 60px;
    z-index: 6;
    transform: rotate(-45deg); /* 与三角形平行 */
}
.douban-score {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    display: block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}


.right-content1 p{
    color: #a7a7a7;
}
.movie-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px;
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 1;
        background-color: #05001354;
        border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
}

.movie-info-section {
    display: flex;
    gap: 30px;
}

.movie-tabrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}
.movie-btn-wrap {
    position: relative;
    display: inline-flex;
}
.movie-btn {
    --text-color: #6F98FF;
    --bg-color: rgba(111, 152, 255, 0.1);
    --hover-bg-color: rgba(111, 152, 255, 0.2);
    box-sizing: border-box;
    border: 0;
    border-radius: 34px;
    color: var(--text-color);
    padding: 0.2em 0.8em;
    background: var(--bg-color);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.movie-btn::after {
    content: "›";
    margin-left: 4px;
    font-size: 18px;
    color: var(--text-color);
    line-height: 1;
    transition: color 0.3s ease;
}

.movie-btn:hover {
    background: var(--hover-bg-color);
    color: var(--text-color);
}

.movie-btn:hover::after {
    color: var(--text-color);
}

/* 删除 .movie-link 相关样式，因为不再需要 */

.synopsis-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}
.synopsis-section .synopsis-title {
    color: #E8E8F6;
    margin-bottom: 15px;
}
.synopsis-section .synopsis-content {
    color: #A8A8B6;
    line-height: 1.6;
}

.movie-download-section {
    grid-area: download;

}


.movie-sidebar {
    grid-area: sidebar;
    border-radius: 12px;
    grid-row: 4 / 1;
    z-index: 10; /* 提高层级，确保在其他元素上方 */
    width: 100%; /* 确保宽度正确 */
}

.movie-widget {
    margin-bottom: 30px;
}

.movie-widget-title {
    color: #E8E8F6;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
}

.movie-menu-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.movie-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.movie-menu-list li {
    margin-bottom: 10px;
}

.movie-menu-list a {
    color: #A8A8B6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.movie-menu-list a:hover {
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .movie-layout {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "sidebar"
            "content"
            "download";
    }
    
    .movie-sidebar.fixed {
        position: static;
    }
}

.background-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 40px); /* 补偿父容器的padding */
    /*margin-left: -20px; */
    height: 400px;
    z-index: 0;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-video-preview {
    background: rgba(255, 255, 255, .01);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    box-shadow: inset 0 0 0 8px #ffffff08;
    padding: 8px;
    /*height: 100%;*/
}

.movie-related-section {
    background: rgba(255, 255, 255, .01);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}

.movie-related-section .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
    margin: 0;
}


/* 确保卡片有足够的间距 */
.movie-related-section .col {
    padding: var(--bs-gutter-x);
}


.movie-related-section .main-title {
    color: #E8E8F6;
    font-size: 18px;
    margin: 0;

}

/* 删除原有的 related-movies-grid 相关样式 */

.movie-comments-section {
    background: rgba(255, 255, 255, .01);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

/* 当JS添加fixed类时应用的样式 */
.movie-sidebar.fixed {
    position: fixed;
    top: 20px;
    /* 宽度由JS动态计算 */
    /* 不设置最大高度和滚动 */
}

/* 移除滚动条相关样式 */
/* 
.movie-sidebar::-webkit-scrollbar {
    width: 4px;
}

.movie-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.movie-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
*/

/* 增强移动端响应式样式 */
@media (max-width: 768px) {
    /* 隐藏侧边栏 */
    .movie-sidebar {
        display: none !important;
    }
    
    /* 修改布局结构 */
    .movie-layout {
        display: block !important;
        padding: 10px !important;
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "header"
            "content"
            "download" !important;
    }
    
    /* 调整主内容区布局 */
    .movie-layout1 {
        width: 100% !important;
    }
    
    /* 调整标题区域 */
    .movie-header-space {
        height: 300px !important; /* 减少视频高度 */
        margin-bottom: -60px !important; /* 调整覆盖高度 */
    }
    
    /* 调整信息区域 */
    .blog-recommend {
        margin-top: -140px !important; /* 调整配合header的margin-bottom */
    }
    
    /* 设置内容区域的间距 */
    .movie-download-section,
    .movie-related-section,
    .movie-comments-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }
    
    /* 修改电影信息部分为纵向排列 */
    .movie-info-section {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* 调整左侧内容区域 */
    .left-content {
        margin: 0 auto !important;
        margin-bottom: 20px !important;
    }
    
    /* 调整右侧内容区域 */
    .right-content1 {
        padding-left: 0 !important;
    }
    
    /* 调整标签展示 */
    .movie-tabrow {
        justify-content: center !important;
    }
    
    /* 调整相关电影部分 */
    .movie-related-section .row {
        --bs-gutter-x: 0.75rem !important;
        --bs-gutter-y: 0.75rem !important;
    }
    
    /* 优化视频背景 */
    .video-background {
        width: 100% !important;
        height: 300px !important;
    }
}

/* 小屏幕手机的优化 */
@media (max-width: 576px) {
    /* 进一步减少间距 */
    .movie-layout {
        padding: 5px !important;
    }
    
    /* 更小的视频高度 */
    .movie-header-space {
        height: 250px !important; 
        margin-bottom: -40px !important;
    }
    
    /* 调整信息区域 */
    .blog-recommend {
        margin-top: -120px !important;
    }
    
    /* 减小内容的边距 */
    .movie-content {
        padding: 15px !important;
    }
    
    /* 减小内容区域的标题字体 */
    .movie-content h1 {
        font-size: 1.5rem !important;
    }
    
    /* 调整相关电影网格 */
    .movie-related-section .row-cols-lg-6 > * {
        width: 50% !important; /* 确保每行只有两个 */
    }
}

