/*!
 * 合并样式表 - custom.css
 */

/* ====================== Font Awesome 图标 ====================== */
/*!
 * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
 * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
 */
@font-face{
    font-family:'FontAwesome';
    src:url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
        url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff');
    font-weight:normal;
    font-style:normal
}
.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}
.fa-fw{width:1.28571429em;text-align:center}
.fa-pull-left{float:left}
.fa-pull-right{float:right}
.fa.fa-pull-left{margin-right:.3em}
.fa.fa-pull-right{margin-left:.3em}
.pull-right{float:right}
.pull-left{float:left}
.fa.pull-left{margin-right:.3em}
.fa.pull-right{margin-left:.3em}

/* 只保留实际使用的图标 */
.fa-refresh:before{content:"\f021"}
.fa-warning:before{content:"\f071"}
.fa-exclamation-triangle:before{content:"\f071"}
.fa-arrow-left:before{content:"\f060"}
.fa-arrow-right:before{content:"\f061"} 

/* ====================== 自定义基础样式 ====================== */

/* 详情页演员样式 */
.gm-vod .form_actor {
    display: inline-block;
    margin-right: 6px;
}
.gm-vod .form_actor:after {
    content: "/";
    margin-left: 6px;
}
.gm-vod .form_actor:last-child:after{
    content: "";
    margin-left: 0;
}
.gm-vod .info .form_actor:first-child {margin-left: 0;}
.gm-vod .mac_search {
    background: none;
    border: none;
    display: inline-block;
    text-decoration-line: underline;
    color: #333;
    font-size: 14px;
}

/* 详情页缩略图和播放按钮样式 */
.detail-thumb {
    display: block;
    width: 220px;
    height: auto;
    margin: 0 auto;
    margin-bottom: 20px;
}

.detail-thumb img {
    width: 100%;
}

.btn-play {
    background: #d94f4f;
    text-align: center;
    border-radius: 0 0 5px 5px;
    padding: 8px 0;
    font-size: 18px;
    color: #fff;
    width: 220px;
    margin: -26px auto 15px;
    display: block;
    text-decoration: none;
}

.btn-play:hover {
    background: #c04242;
    color: #fff;
    text-decoration: none;
}

/* 豆瓣评分链接样式 */
.link-douban {
    background: #008000b8;
    color: #fff;
    padding: 1px 3px;
    border-radius: 2px;
}

.link-douban:hover {
    background: #006000;
    color: #fff;
    text-decoration: none;
}

/* 确保播放器元素正常显示 */
#playerCnt, #playerCnt * {
    box-sizing: border-box;
}

.MacPlayer, 
.MacPlayer iframe, 
.MacPlayer #buffer, 
.MacPlayer #playleft, 
.MacPlayer #player, 
.MacPlayer embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 固定播放器样式 */
.player-fixed {
    position: relative; /* 修改为相对定位 */
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 播放器底部控制栏样式 */
.player-footer {
    background-color: #f8f8f8;
    padding: 10px 0;
    margin: 0 0 8px 0;
    text-align: center;
    border-radius: 4px;
    position: relative;
    z-index: 10;
}

.player-footer a {
    display: inline-block;
    margin: 0 5px;
    padding: 5px 10px;
    background-color: #eee;
    color: #333;
    border-radius: 3px;
}

.player-footer a:hover {
    background-color: #ddd;
    text-decoration: none;
}

.player-footer a i {
    margin-right: 5px;
}

.player-footer a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 版权声明样式 */
.copyright-notice {
    background-color: #f8f8f8;
    padding: 10px;
    margin: 15px 0;
    font-size: 12px;
    color: #999;
    border-radius: 4px;
    text-align: center;
}

/* 播放源和播放列表样式 */
#dom-source {
    margin-top: 0;
    z-index: 20;
    background-color: #fff;
    clear: both;
    position: relative;
    margin-bottom: 20px;
}

/* 面包屑导航样式 - 确保不被遮挡 */
.gm-bread {
    position: relative;
    z-index: 50; /* 确保在播放器之上 */
    margin-bottom: 15px;
    background: #fff;
    padding: 10px 5px;
}

/* 播放器区域样式 */
#playerCnt {
    min-height: 200px;
    background: #000;
    position: relative;
    margin-bottom: 5px; /* 减少与控制栏的间距 */
    margin-top: 10px; /* 与面包屑导航保持间距 */
    z-index: 10; /* 低于面包屑导航 */
}

/* 响应式播放器容器 */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
}

.embed-responsive-16by9::before {
    padding-top: 56.25%;
}

.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 播放器容器样式 */
.player-container {
    position: relative;
    background-color: #000;
    overflow: hidden;
}

/* 播放列表样式优化 */
#dom-source .source .list {
    display: none;
    position: relative;
    z-index: 30;
    background-color: #fbfbfb;
    border-radius: 0 0 4px 4px;
    padding: 10px;
    max-width: 100%;
    overflow: hidden;
}

/* 播放线路标签样式 */
#dom-source .hd {
    position: relative;
    z-index: 30;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    border-radius: 4px 4px 0 0;
    padding-left: 8px;
}

/* 播放线路按钮样式 */
.hd-item {
    display: inline-block;
    padding: 8px 15px;
    margin-right: 1px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    color: #333; /* 改为黑色 */
}

.hd-item.on {
    background-color: #ff6b6b;
    color: #fff;
    font-weight: bold; /* 加粗 */
}

.hd-item:hover {
    background-color: #eee;
}

.hd-item:active {
    transform: scale(0.98);
}

/* 剧集列表容器 */
#dom-source .source .list .episodes-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* 剧集按钮样式 */
#dom-source .source .list a {
    display: inline-block;
    margin: 5px;
    padding: 6px 10px;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 3px;
    color: #333;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
}

#dom-source .source .list a span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

#dom-source .source .list a.on {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff5252;
}

#dom-source .source .list a:hover {
    background-color: #eee;
}

#dom-source .source .list a.on:hover {
    background-color: #ff5252;
}

/* 固定播放器时的样式 */
.player-fixed #playerCnt {
    z-index: 1;
}

/* 图片和链接相关优化 */
.gm-list > .item > .link > .img {
    -webkit-tap-highlight-color: transparent;
}

.gm-list > .item > .link {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.gm-list > .item > .link:focus,
.gm-list > .item > .link:active {
    outline: none;
}

/* 无轮廓焦点样式 */
a:focus, button:focus, input:focus, 
.gm-list > .item > .link:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* 移动端搜索框样式优化 */
.mi-pop-search .wrap input {
    -webkit-appearance: none;
    border-radius: 16px; /* 添加圆角，与PC端保持一致 */
    border: 1px solid #ccc;
}

.mi-pop-search .wrap button {
    border-radius: 0 16px 16px 0; /* 添加右侧圆角 */
}

/* 图片淡入动画 */
@keyframes imgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 延迟加载图片样式 */
img[src^="data:image/gif;base64"] {
    opacity: 0;
}

img.img-loaded {
    animation: imgFadeIn 0.3s ease-in;
}

/* ====================== 移动端优化与热搜CSS ====================== */

/* ID选择器样式确保可点击性 */
#btn-nav, #btn-search {
    display: block;
    width: 40px;
    height: 40px;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 弹出层样式 */
.mi-pop-search {
    display: none !important;
    z-index: 999 !important;
}

.mi-pop-search.on {
    display: block !important;
}

.mi-pop-nav {
    display: none !important;
    z-index: 999 !important;
}

.mi-pop-nav.on {
    display: block !important;
}

/* 移动端适配样式合集 */
@media (max-width: 767px) {
    /* 播放列表移动端样式 */
    #dom-source .source .list {
        padding: 8px 5px;
    }
    
    #dom-source .source .list a {
        margin: 3px;
        padding: 5px 8px;
        font-size: 12px;
    }

    /* 移动端列表项点击优化 */
    .gm-list > .item > .link,
    .gm-list > .item > .link > .img {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* 移动端触摸优化 */
    .gm-list .item {
        touch-action: manipulation;
    }
    
    .gm-list .item .link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 提升移动端性能 */
    .gm-list .item .img {
        will-change: opacity;
        backface-visibility: hidden;
    }
    
    /* 预防iOS上的橡皮筋效果导致页面布局问题 */
    .gm-main {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 标签切换移动端样式 */
    .tab-tit-box {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .tab-tit-box a {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* ====================== 热搜展开收起功能 ====================== */
html body .gm-list-fix .item:nth-child(n+7) {
    display: none;
}

html body .gm-list-fix.all-show .item:nth-child(n+7) {
    display: block;
}

.gm-list-fix .item {
    transition: opacity 0.3s ease;
}

.openall-button {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    display: inline-block;
    border-radius: 20px; /* 圆角效果（根据原按钮圆角大小调整数值） */
}

.openall-button:hover,
.openall-button:focus {
    color: #333;
    font-weight: bold;
    outline: none;
}

.more .openall-button {
    margin-left: 10px;
}

/* 元数据区域样式 */
.gm-meta {
    padding: 10px;
    background: #f8f8f8;
    margin-bottom: 15px;
    border-radius: 4px;
}

.gm-meta h3, .gm-meta h4 {
    font-size: 16px;
    margin: 0 0 10px 0;
    padding: 0;
    color: #333;
    font-weight: bold;
    border-left: 3px solid #ff6b6b;
    padding-left: 10px;
}

/* 标签切换样式 */
.tab-tit-box {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.tab-tit-box a {
    padding: 8px 10px; /* 减小水平内边距 */
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px; /* 添加默认字体大小 */
}

.tab-tit-box a.on {
    color: #333;
    font-weight: bold;
}

/* 优化移动端文字分类显示 */
@media (max-width: 767px) {
    .gm-meta {
        position: relative; /* 设置为相对定位 */
    }
    
    .gm-meta h3 {
        margin-bottom: 5px; /* 减小底部边距 */
        display: inline-block; /* 显示为内联块元素 */
    }
    
    .tab-tit-box {
        margin-top: 0;
        margin-bottom: 10px;
        border-bottom: none;
        display: inline-flex; /* 使其和标题在同一行 */
        vertical-align: middle;
        position: absolute; /* 绝对定位 */
        right: 10px; /* 靠右对齐 */
        top: 10px; /* 靠上对齐，与标题同高 */
        width: auto;
        max-width: 60%; /* 最大宽度 */
    }
    
    .tab-tit-box a {
        padding: 3px 5px; /* 更小的内边距 */
        font-size: 12px; /* 更小的字体 */
        margin-left: 1px;
        letter-spacing: -0.5px; /* 减小字距 */
    }
    
    /* 确保标题和分类选项卡不重叠 */
    .gm-meta {
        padding-right: 10px;
    }
}

/* 修复PC端导航和搜索图标重叠问题 - 清理版 */
/* 覆盖app2.css中的冲突规则，确保移动端按钮在PC端不显示 */
@media (min-width: 1200px) {
    #btn-nav, 
    #btn-search,
    .gm-head > .wrap > .btn-nav,
    .gm-head > .wrap > .btn-search {
        display: none !important;
    }
}

/* 确保在移动端显示按钮 */
@media (max-width: 1199px) {
    #btn-nav, 
    #btn-search,
    .gm-head > .wrap > .btn-nav,
    .gm-head > .wrap > .btn-search {
        display: block !important;
    }
    
    /* 移动端隐藏导航和搜索框 */
    .gm-head > .wrap > .nav,
    .gm-head > .wrap > .search {
        display: none !important;
    }
} 