/* ==========================================================================
   1. 全局与基础样式 (Global & Base Styles)
   ========================================================================== */
body {
    background-color: #f4f4f9;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    color: #c00;
    text-decoration: none;
}

.row h3 {
    padding-left: 10px;
    border-left: 4px solid #c00;
    font-size: 1.5rem;
}

/* ==========================================================================
   2. 头部导航 (Header Navigation)
   ========================================================================== */
.navbar-dark .form-control::placeholder {
    color: #999;
}

.mac_history_box,
.mac_user_box {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    display: none;
    min-width: 180px;
    padding: 0.5rem 0;
    margin-top: .125rem;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .25rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
    z-index: 1050;
}

.mac_history_box dd a,
.mac_user_box li a {
    color: #212529;
    text-decoration: none;
    display: block;
    padding: .25rem 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mac_history_box dd a:hover,
.mac_user_box li a:hover {
    background-color: #f8f9fa;
}

.mac_history_box dt {
    padding: .25rem 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}
.mac_history_box dt a {
    color: #6c757d;
    font-size: .875em;
    float: right;
    text-decoration: none;
}
.mac_history_box dt a:hover {
    color: #dc3545;
}
.mac_history_box dd.hide {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
}

.mac_user_box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* PC端导航下拉菜单悬停效果 */
@media (min-width: 992px) {
    .navbar-dark .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* ==========================================================================
   3. 通用卡片样式 (General Card Styles)
   ========================================================================== */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease-in-out;
}

.card-img-top {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.card-title {
    font-size: 1rem;
}

.card-title a {
    color: inherit; 
}

/* ==========================================================================
   4. 首页轮播图 (Index Carousel)
   ========================================================================== */
#heroCarousel .carousel-item,
#heroCarousel .carousel-inner {
    height: 380px;
}
#heroCarousel .carousel-item img {
    height: 100%;
    object-fit: cover;
}
@media (max-width: 992px) {
    #heroCarousel .carousel-item,
    #heroCarousel .carousel-inner {
        height: 300px;
    }
}
@media (max-width: 768px) {
    #heroCarousel .carousel-item,
    #heroCarousel .carousel-inner {
        height: 200px;
    }
}

/* ==========================================================================
   5. 详情页 (Detail Page)
   ========================================================================== */
.detail-hero {
    position: relative;
    padding: 3rem 0;
    color: #fff;
    overflow: hidden;
    background-color: #212529;
}
.detail-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.5);
    transform: scale(1.2);
    z-index: 1;
}
.detail-hero__content {
    position: relative;
    z-index: 2;
}
.detail-hero__poster {
    border-radius: .5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.detail-hero__title {
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.detail-hero__meta {
    font-size: 0.9rem;
    opacity: 0.9;
}
.detail-hero__meta a {
    color: #fff;
}
.line-clamp-2 {
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   line-height: 1.5;
}

/* ==========================================================================
   6. 播放页 (Play Page)
   ========================================================================== */
.macplayer {
    position: relative; /* 为内部绝对定位元素提供参考 */
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
}
@media (min-width: 992px) {
    .macplayer {
        height: 550px;
        aspect-ratio: auto;
    }
}
.macplayer iframe {
    width: 100%;
    height: 100%;
}
.episode-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (min-width: 768px) {
    .episode-list {
        grid-template-columns: repeat(6, 1fr);
    }
}
.episode-list .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.myui-player__notice {
    position: absolute; /* 绝对定位，确保覆盖整个播放器区域 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    z-index: 10; /* 确保在顶层 */
}
.myui-player__notice .col-pd {
    background-color: rgba(30, 30, 30, 0.85); /* 加深背景 */
    padding: 2rem 3rem; /* 增加内边距 */
    border-radius: .5rem;
    max-width: 90%; /* 限制最大宽度 */
}
.myui-player__notice h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.myui-player__notice h5 {
    font-size: 1rem;
    color: #adb5bd;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.myui-player__notice .btn-warm {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

/* --- 【新增】密码解锁区域CSS --- */
#password-gate { width: 100%; height: 100%; color: white; display: flex; flex-direction: column; align-items: center; justify-content: center;  box-sizing: border-box; text-align: center; }
.gate-content { display: flex; flex-direction: column; align-items: center; background-color: rgba(30,30,30,0.8); padding: 10px; border-radius: 12px; }

.qr-code-box { width: 90px;  background-color: white; padding: 5px; border-radius: 8px; }
.qr-code-box img { width: 100%; height: 100%; display: block; }
.gate-tip { font-size: 13px; color: #aaa; margin: 1px 0; }
.wechat-green { color: #07c160; font-weight: bold; }
.input-group { display: flex; align-items: center; }
#password_input { padding: 10px; border-radius: 5px; border: 1px solid #555; background-color: #333; color: white; text-align: center; width: 160px; height: 30px; box-sizing: border-box; font-size: 16px; }
#verify-btn { padding: 0 18px; background-color: #07c160; color: white; border: none; border-radius: 5px; margin-left: 10px; cursor: pointer; height: 30px; font-size: 16px; transition: background-color 0.2s; }
#verify-btn:hover { background-color: #06a853; }
#verify-status { font-size: 14px; color: #ff5c5c; margin-top: 1px; height: 20px; }

@media (min-width: 768px) {
    .gate-content { padding: 30px 40px; max-width: 400px; }
    .gate-title { display: block; font-size: 20px; font-weight: bold; margin: 0 0 20px 0; }
    .qr-code-box { width: 120px; }
    .gate-tip { font-size: 14px; margin: 15px 0; }
    #password_input { width: 200px; height: 44px; }
    #verify-btn { height: 44px; }
    #verify-status { margin-top: 15px; }
}

/* ==========================================================================
   7. 用户中心 (User Center)
   ========================================================================== */
.form-container {
    max-width: 480px;
    margin: 2rem auto;
}
.user-menu .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ==========================================================================
   8. 排行榜 (Rank Page)
   ========================================================================== */
.rank-list-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}
.rank-list-item:last-child {
    border-bottom: none;
}
.rank-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c757d;
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}
.rank-number.top-1 { color: #ffc107; }
.rank-number.top-2 { color: #adb5bd; }
.rank-number.top-3 { color: #cd7f32; }
.rank-poster {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: .25rem;
    margin-right: 1rem;
}
.rank-info {
    flex-grow: 1;
    min-width: 0;
    max-width: 55%;
}
.rank-info h5, .rank-info p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-info h5 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
}
.rank-info p {
    font-size: .875rem;
    color: #6c757d;
    margin-bottom: .25rem;
}
.rank-hits {
    font-size: 1rem;
    color: #dc3545;
    font-weight: 500;
}
@media (max-width: 576px) {
    .rank-list-item { flex-wrap: wrap; }
    .rank-poster { width: 60px; height: 85px; }
    .rank-number { font-size: 1.2rem; width: 40px; }
    .rank-info { max-width: none; flex-basis: calc(100% - 110px); }
    .rank-info h5 { font-size: 1rem; }
    .rank-list-item .ms-auto {
        width: 100%;
        margin-left: 0 !important;
        margin-top: .5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left !important;
    }
    .rank-list-item .btn { margin-top: 0 !important; }
}


/* ==========================================================================
   9. CPS商品详情页 (dplay.html) 专属样式
   ========================================================================== */
/* 1. 主体布局 */
.product-detail-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 2. 左侧图片画廊 */
.product-gallery .main-image {
    border: 1px solid #eee;
    border-radius: .25rem;
    padding: 5px;
    margin-bottom: 10px;
}
.product-gallery .thumbnail-list {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 10px;
}
.product-gallery .thumbnail-list li {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: .25rem;
    cursor: pointer;
    transition: border-color .2s;
    overflow: hidden; /* 确保图片不会溢出圆角 */
}
.product-gallery .thumbnail-list li.active,
.product-gallery .thumbnail-list li:hover {
    border-color: #dc3545;
}
.product-gallery .thumbnail-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3. 右侧信息区 */
.product-title {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
}
.product-subtitle {
    font-size: 1rem;
    color: #6c757d;
}

/* 价格/优惠券条 */
.product-price-bar {
    background: linear-gradient(90deg, #ff8a00, #e52e00);
    color: #fff;
    border-radius: .25rem;
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.product-price-bar .price-label {
    font-size: 1rem;
}
.product-price-bar .price-value {
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1;
}
.product-price-bar .price-value::before {
    content: '¥';
    font-size: 1.2rem;
    margin-right: 2px;
}

/* 规格选择 */
.spec-group {
    font-size: .875rem;
}
.spec-group .spec-label {
    color: #6c757d;
    flex-shrink: 0; /* 防止标签文字被压缩 */
}
.spec-group .spec-item {
    margin-right: 10px;
    margin-bottom: 10px;
}
.spec-group .spec-item .btn {
    border-width: 2px;
}

/* 4. 底部详情区域 */
.product-details-tabs .nav-tabs {
    border-bottom: 2px solid #dee2e6;
}
.product-details-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
}
.product-details-tabs .nav-link.active {
    color: #0d6efd;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom-width: 2px; /* 覆盖默认边框 */
    margin-bottom: -2px; /* 让激活的tab与下方内容区的边框连接 */
}
.product-details-tabs .tab-content {
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 .25rem .25rem;
}
.product-details-tabs .tab-content img {
    max-width: 100%;
    height: auto; /* 保持图片比例 */
    margin-bottom: 1rem;
}

/* ==========================================================================
   10. 筛选页
   ========================================================================== */

/* 筛选区域总容器 */
.filter-box {
    background-color: #fff;
    padding: 1rem 1.5rem;
    border-radius: .5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

/* 每一行筛选 */
.filter-line {
    display: flex;
    flex-wrap: wrap; /* 允许在手机端换行 */
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.875rem;
}

.filter-line:last-child {
    border-bottom: none;
}

/* 筛选行标签，如“类型”、“地区” */
.filter-label {
    color: #888;
    font-weight: bold;
    margin-right: 1.5rem;
    white-space: nowrap; /* 防止标签换行 */
    width: 60px; /* 固定宽度，让选项对齐 */
    text-align: right;
}

/* 筛选选项列表 */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* 允许选项换行 */
}

.filter-list li {
    margin-right: 10px;
    margin-bottom: 10px; /* 为换行后的选项提供垂直间距 */
}

/* 筛选选项链接 */
.filter-list li a {
    color: #333;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: 20px; /* 圆角胶囊样式 */
    transition: all 0.2s ease-in-out;
}

.filter-list li a:hover {
    color: #fff;
    background-color: #0d6efd;
}

/* 当前激活的选项 */
.filter-list li a.active {
    color: #fff;
    background-color: #dc3545; /* 激活时使用更醒目的红色 */
    font-weight: bold;
}

/* 手机端响应式调整 */
@media (max-width: 768px) {
    .filter-line {
        flex-direction: column; /* 垂直堆叠 */
        align-items: flex-start; /* 左对齐 */
    }
    .filter-label {
        width: auto;
        margin-bottom: 0.5rem; /* 增加和下方选项的间距 */
        text-align: left;
    }
    .filter-list li {
        margin-right: 8px;
        margin-bottom: 8px;
    }
    .filter-list li a {
        padding: 0.2rem 0.6rem;
    }
}
/*下载页面*/
        .down-hero {
            position: relative;
            padding: 3rem 0;
            color: #fff;
            overflow: hidden;
            background-color: #212529;
        }
        .down-hero__bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            filter: blur(20px) brightness(0.5);
            transform: scale(1.2);
            z-index: 1;
        }
        .down-hero__content { position: relative; z-index: 2; }
        .down-hero__poster {
            border-radius: .5rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.3);
            width: 150px;
        }
        .down-hero__title {
            font-size: 2rem;
            font-weight: 300;
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
        }

       

        /* --- 下载列表 --- */
 