/**
 * OKAY 影视 - 主样式文件
 * 完全复刻老站 faoc10.net 的布局
 */

/* ========== 重置样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

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

img {
    display: inline-block;
    border: none;
    vertical-align: middle;
}

li {
    list-style: none;
}

body {
    line-height: 1.6;
    color: #222;
    font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
    background-color: #F4F5F8;
    padding-top: 110px; /* 给顶部漂浮广告留空间 */
    padding-bottom: 110px; /* 给底部漂浮广告留空间 */
}

/* ========== 主容器：固定750px宽度 ========== */
main {
    max-width: 750px;
    margin: 0 auto;
}

/* ========== 广告通用 ========== */
.adqu {
    width: 100%;
    overflow: hidden;
}

.adqu .onead:empty,
.adqu [data-ad-slot]:empty,
.adqu [data-slot]:empty {
    display: none;
}

.adqu img {
    width: 100%;
    height: auto;
    display: block;
}

.topad img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== Logo 区域 ========== */
.logoqu {
    background-color: #333;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logoqu a {
    color: #fff;
    font-size: 15px;
}

.logoqu img {
    height: 40px;
}

/* ========== 导航横幅广告（导航下方） ========== */
.adhf img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== 文字广告：白底+彩色文字特效 ========== */
.menu-wrap {
    width: 100%;
    background: #fff;
    padding: 8px 10px;
}

.menu-wrap dl {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 5px 0;
}

.menu-wrap dt {
    font-weight: bold;
    color: #e74c3c;
    font-size: 13px;
    margin-right: 10px;
}

.menu-wrap dd {
    font-size: 12px;
}

/* 文字广告特效：渐变色+闪烁 */
.menu-wrap dd a {
    color: #9b59b6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 2px 6px;
    border-radius: 3px;
}

.menu-wrap dd a:hover {
    color: #fff;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

/* ========== 分类导航：简洁白底卡片风格 ========== */
#menu {
    background: #fff;
    padding: 15px 20px;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#menu .nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#menu .nav-title {
    color: #ff6b35;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
}

#menu .nav-divider {
    width: 1px;
    height: 16px;
    background: #e0e0e0;
    margin: 0 8px;
}

/* 分类链接：圆角标签风格 */
#menu a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

#menu a:hover {
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255,107,53,0.3);
}

/* 分类网格布局：上下各5个 */
#menu .nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 12px;
    padding: 0 10px;
}
/* 2列布局模式 */
#menu .nav-grid.nav-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

#menu .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

#menu .nav-item:hover {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

#menu .nav-item.hot::after {
    content: 'HOT';
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b3b;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

@media (max-width: 768px) {
    #menu .nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    #menu .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.menua {
    display: flex;
    flex-wrap: wrap;
}

.menua a {
    display: inline-block;
    text-align: center;
    padding: 10px 0;
    width: 33.33%;
}

.hotimg {
    width: 20px;
    height: 12px;
    vertical-align: middle;
    margin-right: 3px;
}

/* ========== 搜索框：现代简约风格 ========== */
#search {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

#search .x {
    display: flex;
    gap: 10px;
}

#search .lr {
    flex: 1;
}

#s_word {
    padding: 12px 16px;
    border: 2px solid #eee;
    width: 100%;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fafafa;
}

#s_word:focus {
    border-color: #ff6b35;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

#s_word::placeholder {
    color: #aaa;
}

#searchVod {
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

#searchVod:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

.reso {
    margin-top: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 10px 0;
}

.reso-label {
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
    margin-right: 4px;
    flex-shrink: 0;
}

.reso a {
    display: inline-flex;
    align-items: center;
    color: #555;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e0 100%);
    border: 1px solid rgba(255,107,53,0.15);
    border-radius: 18px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.reso a:hover {
    color: #fff;
    background: linear-gradient(135deg, #ff6b35 0%, #e74c3c 100%);
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.35);
}

/* 前3个热搜词特殊样式（火热） */
.reso a.hot-top {
    background: linear-gradient(135deg, #ffebe0 0%, #ffd8c8 100%);
    border-color: rgba(231,76,60,0.25);
    color: #c0392b;
    font-weight: 600;
}

.reso a.hot-top::after {
    content: '🔥';
    margin-left: 4px;
    font-size: 12px;
}

/* ========== 方格子APP下载按钮 ========== */
.links-top ul.icon-list {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
}

.links-top ul.icon-list li {
    width: 25%;
    text-align: center;
    padding: 8px 4px;
}

.links-top ul.icon-list li:empty {
    display: none;
    padding: 0;
}

.links-top ul.icon-list li a {
    display: block;
}

.links-top ul.icon-list li img {
    width: 50px;
    height: 50px;
    border-radius: 20%;
}

.links-top ul.icon-list li .name {
    font-size: 12px;
    color: #333;
    margin-top: 5px;
}

.links-top ul.icon-list li button {
    margin-top: 5px;
    padding: 3px 10px;
    font-size: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* ========== 视频列表标题（简洁白底风格） ========== */
.caption {
    width: 100%;
    height: 44px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid #f0f0f0;
}

.caption a {
    color: #333;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}

.caption a:first-child::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #ff6b35, #f7931e);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

.caption .lr + div a {
    color: #ff6b35;
    font-size: 13px;
    font-weight: 500;
}

.caption .lr + div a:hover {
    text-decoration: underline;
}

/* 换一批按钮样式 */
.refresh-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8e0 100%);
    border: 1px solid rgba(255,107,53,0.2);
    border-radius: 15px;
    color: #ff6b35 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s ease;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255,107,53,0.3);
}

.refresh-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.refresh-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    border: 2px solid #ff6b35;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========== 视频卡片网格：手机2列，平板3列 ========== */
.vlist {
    display: flex;
    flex-wrap: wrap;
    padding: 5px;
    background: #fff;
}

.vone {
    width: 50%;
    padding: 5px;
}

/* ========== 视频卡片样式（渐变边框特效） ========== */
.vone dl {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.vone dl:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255,107,53,0.3);
    border-color: #ff6b35;
    animation: borderGlow 1.5s ease infinite;
}

.vone dt {
    position: relative;
    height: 140px;
}

.vone dt img {
    border-radius: 5px 5px 0 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.vone a {
    display: block;
}

/* 播放按钮叠加层 */
.vone .preview-item a:hover:before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') center no-repeat;
    background-size: 30%;
    background-color: rgba(0, 0, 0, 0.3);
}

/* 播放次数和日期 */
.view-times {
    height: 30px;
    padding: 0 10px;
    background-image: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #fff;
}

.view-times .views span {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat;
    background-size: contain;
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: -1px;
    margin-right: 3px;
}

.view-times .date {
    background-color: rgba(0, 0, 0, .6);
    border-radius: 4px;
    padding: 0 8px;
    height: 22px;
    line-height: 22px;
}

/* 视频标题 */
.vone dd a h3 {
    height: 55px;
    line-height: 25px;
    overflow: hidden;
    font-size: 14px;
    font-weight: normal;
    padding: 5px;
    color: #333;
}

.vone dd a h3 small {
    background: #e74c3c;
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
    margin-right: 3px;
}

.vone dd a:hover h3 {
    color: #e74c3c;
}

/* ========== 顶部/底部漂浮广告 ========== */
#topNavad,
#bottomNavad {
    background-color: transparent;
    z-index: 999;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
}

#topNavad {
    top: 0;
}

#bottomNavad {
    bottom: 0;
}

#topNavad img,
#bottomNavad img {
    max-height: 100px !important;
    height: 100px !important;
    width: 100%;
    object-fit: contain;
}

#MyDiv2,
#MyDiv1 {
    position: relative;
}

#MyDiv2 > .close-btn,
#MyDiv1 > .close-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    padding: 2px 10px;
}

/* ========== 左右侧浮动广告 ========== */
#float_right,
#float_left {
    position: fixed;
    top: 40%;
    z-index: 99999;
    width: 80px;
    transform: translate(0, -50%);
}

#float_right {
    right: 0;
}

#float_left {
    left: 0;
}

#float_right ul,
#float_left ul {
    list-style: none;
}

#float_right li,
#float_left li {
    margin-bottom: 5px;
    position: relative;
    min-height: 100px;
}

#float_right img,
#float_left img {
    width: 80px;
    border-radius: 5px;
}

.spin_close {
    width: 16px;
    height: 16px;
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    color: #fff;
    text-align: center;
    line-height: 16px;
    z-index: 10;
}

/* ========== 清除浮动 ========== */
.clear {
    clear: both;
}

/* ========== 布局辅助 ========== */
.x {
    display: flex;
}

.m {
    align-items: center;
}

.lr {
    flex: 1;
}

.c {
    display: flex;
    justify-content: center;
}

/* ========== 视频分类标签导航（简洁白底风格） ========== */
.video-tabs {
    display: flex;
    background: #fff;
    margin: 0;
    padding: 0 15px;
    border-bottom: 1px solid #eee;
}

.video-tabs .tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

.video-tabs .tab-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    border-radius: 3px 3px 0 0;
    transition: width 0.25s ease;
}

.video-tabs .tab-item:hover {
    color: #ff6b35;
}

.video-tabs .tab-item.active {
    color: #ff6b35;
}

.video-tabs .tab-item.active::after {
    width: 60%;
}

/* 火焰特效 */
.tab-fire {
    display: inline-block;
    margin-right: 4px;
    animation: fireFlicker 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 3px rgba(255,107,53,0.6));
}

.video-tabs .tab-item:hover .tab-fire,
.video-tabs .tab-item.active .tab-fire {
    animation: fireBurn 0.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 6px rgba(255,107,53,0.9));
}

.video-section {
    animation: fadeIn 0.3s ease;
}

/* 广告视频标识 */
.vone .ad-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}

.vone.is-ad dt {
    border: 2px solid rgba(231, 76, 60, 0.5);
    border-radius: 8px;
}

.vone.is-ad:hover dt {
    border-color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
}

/* ========== 懒加载占位 ========== */
.lazyload {
    opacity: 0;
    transition: opacity 0.35s ease-in;
}

.lazyload.loaded {
    opacity: 1;
}

.vone dt .lazyload:not(.loaded) {
    background: linear-gradient(90deg, #1a1a2e 25%, #243b55 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 动画定义 ========== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes borderGlow {
    0%, 100% { border-color: #ff6b35; box-shadow: 0 10px 30px rgba(255,107,53,0.3); }
    25% { border-color: #f7931e; box-shadow: 0 10px 30px rgba(247,147,30,0.3); }
    50% { border-color: #e74c3c; box-shadow: 0 10px 30px rgba(231,76,60,0.3); }
    75% { border-color: #9b59b6; box-shadow: 0 10px 30px rgba(155,89,182,0.3); }
}

@keyframes fireFlicker {
    0% { transform: scale(1) rotate(-3deg); opacity: 0.9; }
    50% { transform: scale(1.1) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(-2deg); opacity: 0.85; }
}

@keyframes fireBurn {
    0% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
