/* =========================================
   1. 基础变量与全局重置 (严格保留，未做任何删除)
   ========================================= */
:root {
    --bg-main: #0a0a0a;
    --card-bg: #161616;
    --text-white: #ffffff;
    --text-gray: #888888;
    --accent-blue: #00a1d6;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0; padding: 0; overflow-x: hidden;
}

/* 全局滚动条：变细、深色 (已修复不挡按钮) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; border: 2px solid #0a0a0a; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* =========================================
   2. 导航栏 (严格保留)
   ========================================= */
.navbar-fixed {
    position: sticky; top: 0; z-index: 9999;
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid #222; height: 60px;
    display: flex; align-items: center;
}
.nav-container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.site-logo { font-size: 20px; font-weight: bold; color: var(--accent-blue); letter-spacing: 1px; cursor: pointer; }
.category-nav { display: flex; gap: 8px; }
.nav-item { padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 14px; background: #222; color: var(--text-gray); transition: var(--transition); }
.nav-item:hover { color: #fff; background: #333; }
.nav-item.active { background: var(--accent-blue); color: #fff; }

/* =========================================
   3. 搜索与标题 (严格保留)
   ========================================= */
.search-area { max-width: 1200px; margin: 40px auto 30px auto; padding: 0 20px; display: flex; justify-content: center; }
.search-box { position: relative; width: 100%; max-width: 700px; }
.search-box input {
    width: 100%; padding: 15px 20px 15px 50px; border-radius: 8px;
    border: 1px solid #333; background: #111; color: #fff; font-size: 16px; outline: none; transition: var(--transition);
}
.search-box input:focus { border-color: var(--accent-blue); box-shadow: 0 0 10px rgba(0, 161, 214, 0.2); }
.search-box::before { content: "🔍"; position: absolute; left: 18px; top: 50%; transform: translateY(-50%); opacity: 0.4; }

.section-header { max-width: 1200px; margin: 0 auto 20px auto; padding: 0 20px; }
.section-title { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.section-title::before { content: ""; width: 4px; height: 20px; background-color: var(--accent-blue); border-radius: 2px; }

/* =========================================
   4. 内容网格 (严格保留)
   ========================================= */
.main-content { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px 20px; min-height: 400px; }
.video-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.video-card { width: 100%; cursor: pointer; transition: var(--transition); }
.video-card:hover { transform: translateY(-5px); }
.poster-box { position: relative; aspect-ratio: 3 / 4.2; border-radius: 12px; overflow: hidden; background-color: #1a1a1a; }
.poster-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.category-badge { position: absolute; top: 5px; left: 5px; background: rgba(0, 0, 0, 0.6); color: #fff; padding: 2px 8px; font-size: 11px; border-radius: 4px; z-index: 2; }
.info-title { margin-top: 10px; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-time { font-size: 12px; color: var(--text-gray); margin-top: 5px; }

.tag-container { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.tag-pill { background: #2a2a2a; color: #00d4ff; font-size: 10px; padding: 1px 6px; border: 1px solid #333; border-radius: 10px; cursor: pointer; transition: var(--transition); }
.tag-pill:hover { background: #00d4ff; color: #000; }

/* =========================================
   5. 弹窗基础样式 (严格保留关闭按钮优化)
   ========================================= */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92); z-index: 10000; align-items: center; justify-content: center; backdrop-filter: blur(10px);
}
.modal-content {
    background: var(--card-bg); width: 95%; max-width: 1100px; max-height: 90vh;
    border-radius: 16px; position: relative; padding: 0; border: 1px solid #333; overflow: hidden;
}

.close-btn {
    position: absolute; right: 25px; top: 20px; width: 42px; height: 42px;
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%;
    cursor: pointer; z-index: 10010; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.close-btn::before, .close-btn::after { content: ''; position: absolute; width: 20px; height: 2px; background-color: #fff; }
.close-btn::before { transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }
.close-btn:hover { background: #ff4d4d; border-color: #ff4d4d; transform: rotate(90deg); }

.modal-scroll-area { max-height: 90vh; overflow-y: auto; padding: 30px; }
.modal-scroll-area::-webkit-scrollbar { width: 5px; }
.modal-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

.modal-main { display: flex; gap: 30px; margin-top: 10px; }
.modal-preview { flex: 1.8; min-width: 0; }
.modal-preview video, .modal-preview img { width: 100%; height: auto; border-radius: 12px; border: 1px solid #222; background: #000; }
.modal-details { flex: 1; display: flex; flex-direction: column; min-width: 280px; }
.modal-details h2 { margin: 0 0 10px 0; font-size: 22px; color: #fff; }
.release-date { font-size: 13px; color: #666; margin-bottom: 10px; }
#modalDesc { color: #aaa; line-height: 1.6; font-size: 14px; margin-bottom: 20px; white-space: pre-wrap; }

/* =========================================
   6. 【新版】网盘功能区域 (重新设计)
   ========================================= */
.download-group { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 20px; }

.dl-item { 
    background: #1e1e1e; border: 1px solid #2a2a2a; border-radius: 12px; 
    padding: 12px 16px; display: flex; justify-content: space-between; align-items: center;
    transition: var(--transition);
}
.dl-item:hover { background: #252525; border-color: #444; }

.dl-name { font-size: 15px; font-weight: bold; color: #eee; display: flex; align-items: center; gap: 8px; }
.dl-name::before { content: "📁"; font-size: 16px; }

.dl-btns { display: flex; align-items: center; gap: 10px; }

/* 提取码按钮：点击复制样式 */
.btn-copy { 
    background: rgba(255,255,255,0.05); color: #aaa; border: 1px solid #333; 
    padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
    transition: var(--transition); outline: none;
}
.btn-copy:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: var(--accent-blue); }
.btn-copy:active { transform: scale(0.95); }

/* 进入按钮：跳转样式 */
.btn-go { 
    background: var(--accent-blue); color: #fff; padding: 7px 20px; 
    border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: bold;
    transition: var(--transition); box-shadow: 0 4px 12px rgba(0, 161, 214, 0.3);
}
.btn-go:hover { background: #00bfff; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 161, 214, 0.5); }

/* =========================================
   7. 推荐、灯箱、回到顶部 (严格保留)
   ========================================= */
.recommend-section, .screenshot-section { margin-top: 40px; border-top: 1px solid #222; padding-top: 20px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.rec-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; cursor: pointer; }
.rec-item p { font-size: 12px; margin-top: 5px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
.screenshot-grid img { width: 100%; border-radius: 12px; cursor: zoom-in; transition: 0.3s; border: 1px solid #333; }

.lightbox-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); z-index: 20000; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox-overlay img { max-width: 92%; max-height: 92%; box-shadow: 0 0 40px rgba(0,0,0,0.8); animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px;
    background: var(--accent-blue); color: white; border-radius: 50%;
    display: none; align-items: center; justify-content: center; font-size: 20px;
    cursor: pointer; z-index: 999; box-shadow: 0 4px 15px rgba(0,0,0,0.4); transition: var(--transition);
}
.back-to-top:hover { transform: translateY(-5px); background: #00bfff; }

.pagination { margin: 50px 0; display: flex; justify-content: center; gap: 8px; }
.page-btn { min-width: 40px; height: 40px; border: none; background: #222; color: #ccc; border-radius: 8px; cursor: pointer; }
.page-btn.active { background: var(--accent-blue); color: #fff; }

/* Docsify 兼容性保留 */
#docsify-view { display: none; }
section.content { background-color: var(--bg-main) !important; }

@media (max-width: 850px) {
    .modal-main { flex-direction: column; }
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .dl-item { flex-direction: column; gap: 12px; align-items: flex-start; }
    .dl-btns { width: 100%; justify-content: flex-end; }
}
