/* =========================================================================
   van 侧边栏模块样式Version: 1.70（v1.28 新增，lan-child 式模块管理）
   -------------------------------------------------------------------------
   命名空间：一律 .van-side-* / .van-rank-list / .van-rel-grid / .van-tl /
   .van-bars / .van-qnav / .van-stats / .cloudy 前缀，禁裸通用类。
   令牌沿用 base.css 的 --van-*（全站已加载，双份亮/暗定义）。
   ========================================================================= */

/* 容器中和：single-sidebar 的 before_widget 会包一层 <div class="widget van-side-group">，
   父主题有全局 .widget 卡片样式（白底/圆角/1.25rem 内边距/边框/阴影，暗色 #21242b），
   不中和会卡片套卡片。特异性 (0,2,0)/(0,3,0) 稳压父主题 .widget (0,1,0)，与加载顺序无关。 */
.widget.van-side-group,
.sidebar .widget.van-side-group {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    overflow: visible;
}

/* 模块壳 + 标题 */
.van-side-mod {
    background: var(--van-card, #fff);
    border: 1px solid var(--van-line, #e6e9ee);
    border-radius: .8rem;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
}
.van-side-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.van-side-hd .t { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--van-title, #171a21); }
.van-side-hd .t::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--van-accent, #12B981); }
.van-side-hd .sub { font-size: 11.5px; color: var(--van-muted, #7a828f); margin-left: auto; }

/* 封面（img 与占位二合一） */
.van-side-cover {
    border-radius: 8px; object-fit: cover; flex: none; display: flex;
    align-items: center; justify-content: center; color: rgba(255, 255, 255, .88);
    font-weight: 800; letter-spacing: 2px;
    background: radial-gradient(circle at 115% -15%, rgba(47, 224, 168, .30), transparent 55%),
                linear-gradient(135deg, #262b36, #14171f);
}
.van-side-cover img, img.van-side-cover { display: block; max-width: 100%; }

/* 管理员提示 */
.van-side-admin-tip {
    margin: 0; padding: 10px 12px; font-size: 12.5px; border-radius: 8px;
    background: var(--van-accent-weak, rgba(18, 185, 129, .10));
    color: var(--van-accent-strong, #0a5c41);
}

/* ---- 01 热门游戏榜 ---- */
.van-rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.van-rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; transition: background .2s; }
.van-rank-list li:hover { background: var(--van-accent-weak, rgba(18, 185, 129, .10)); }
.van-rank-list .meta { min-width: 0; flex: 1; }
.van-rank-list .cn { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--van-title, #171a21); white-space: nowrap; overflow: hidden; }
.van-rank-list .cn a { color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.van-rank-list .cn a:hover { color: var(--van-accent-strong, #0a5c41); }
.van-rank-list .rk { width: 22px; height: 22px; border-radius: 7px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; background: var(--van-soft, #eef2f6); color: var(--van-muted, #7a828f); }
.van-rank-list .rk.top { background: linear-gradient(135deg, var(--van-accent, #12B981), #2FE0A8); color: var(--van-accent-ink, #04150f); }
.van-rank-list .heat { display: flex; align-items: center; gap: 4px; flex: none; color: var(--van-accent-strong, #0a5c41); font-size: 12.5px; font-weight: 700; }

/* ---- 02 相关游戏推荐 ---- */
/* v1.34：改单列上下排列，每条全宽大封面（欢哥反馈双列并排图片看不清） */
.van-rel-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.van-rel-grid .card { display: block; text-decoration: none; }
.van-rel-grid .card .van-side-cover { width: 100%; height: 92px; border-radius: 9px; transition: opacity .25s; }
.van-rel-grid .card:hover .van-side-cover { opacity: .86; }
.van-rel-grid .pad { padding: 7px 2px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.van-rel-grid .t { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--van-title, #171a21); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.van-rel-grid .card:hover .t { color: var(--van-accent-strong, #0a5c41); }
.van-rel-grid .info { flex: none; }
.van-rel-grid .size { font-size: 11px; color: var(--van-muted, #7a828f); }
.van-rel-grid .dl { width: 24px; height: 24px; border-radius: 8px; background: var(--van-accent-weak, rgba(18, 185, 129, .10)); color: var(--van-accent-strong, #0a5c41); display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.van-rel-grid .card:hover .dl { background: var(--van-accent, #12B981); color: var(--van-accent-ink, #04150f); }

/* ---- 03 快捷导航卡 ---- */
.van-qnav { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.van-qnav a { display: flex; flex-direction: column; gap: 7px; padding: 13px 12px; border-radius: 11px; text-decoration: none; background: var(--van-soft, #eef2f6); transition: background .2s, transform .2s; }
.van-qnav a:hover { background: var(--van-accent, #12B981); transform: translateY(-2px); }
.van-qnav .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--van-accent-weak, rgba(18, 185, 129, .10)); color: var(--van-accent-strong, #0a5c41); display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.van-qnav a:hover .ic { background: rgba(4, 21, 15, .16); color: var(--van-accent-ink, #04150f); }
.van-qnav b { font-size: 13px; font-weight: 600; color: var(--van-title, #171a21); }
.van-qnav a:hover b { color: var(--van-accent-ink, #04150f); }
.van-qnav i { font-style: normal; font-size: 10.5px; color: var(--van-muted, #7a828f); }
.van-qnav a:hover i { color: var(--van-accent-ink, #04150f); opacity: .75; }

/* ---- 04 站长精选 ---- */
.van-side-editors-pick .pick { position: relative; display: block; border-radius: 12px; overflow: hidden; }
.van-side-editors-pick .pick .van-side-cover { border-radius: 12px; }
.van-side-editors-pick .badge { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, var(--van-accent, #12B981), #2FE0A8); color: var(--van-accent-ink, #04150f); font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; display: flex; align-items: center; gap: 4px; }
.van-side-editors-pick .scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, rgba(4, 21, 15, .72)); }
.van-side-editors-pick .cap { position: absolute; left: 12px; bottom: 10px; color: #fff; }
.van-side-editors-pick .cap b { display: block; font-size: 14.5px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.van-side-editors-pick .cap i { font-style: normal; font-size: 11px; opacity: .85; }
.van-side-editors-pick .tags { display: flex; gap: 6px; margin: 12px 0 10px; flex-wrap: wrap; }
.van-side-editors-pick .tags span { font-size: 11px; color: var(--van-accent-strong, #0a5c41); background: var(--van-accent-weak, rgba(18, 185, 129, .10)); padding: 2.5px 9px; border-radius: 999px; font-weight: 600; }
.van-side-editors-pick .meta-row { display: flex; gap: 12px; font-size: 11.5px; color: var(--van-muted, #7a828f); margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--van-line, #e6e9ee); align-items: center; }
.van-side-editors-pick .meta-row .st { display: flex; align-items: center; gap: 3px; color: var(--van-accent-strong, #0a5c41); font-weight: 700; }
.van-side-editors-pick .cta { display: block; text-align: center; background: var(--van-accent, #12B981); color: var(--van-accent-ink, #04150f); font-size: 13.5px; font-weight: 700; padding: 10px 0; border-radius: 10px; text-decoration: none; transition: filter .2s; }
.van-side-editors-pick .cta:hover { filter: brightness(1.08); color: var(--van-accent-ink, #04150f); }

/* ---- 05 最近更新时间轴 ---- */
.van-tl { list-style: none; margin: 0; padding: 0; }
.van-tl li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.van-tl .d { flex: none; width: 52px; text-align: center; border-radius: 9px; padding: 4px 0 5px; background: var(--van-soft, #eef2f6); }
.van-tl .d b { display: block; font-size: 12px; font-weight: 800; color: var(--van-text, #4a4f5a); line-height: 1.2; font-variant-numeric: tabular-nums; }
.van-tl .d i { display: block; font-style: normal; font-size: 9.5px; margin-top: 1px; color: var(--van-muted, #7a828f); }
.van-tl li.is-new .d { background: var(--van-accent-weak, rgba(18, 185, 129, .12)); }
.van-tl li.is-new .d b, .van-tl li.is-new .d i { color: var(--van-accent-strong, #0a5c41); }
.van-tl .cn { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--van-title, #171a21); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; transition: color .2s; }
.van-tl .cn:hover { color: var(--van-accent-strong, #0a5c41); }

/* ---- 06 下载热度条形榜 ---- */
.van-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.van-bars .top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.van-bars .n { font-size: 12px; font-weight: 800; color: var(--van-muted, #7a828f); width: 18px; }
.van-bars li:nth-child(-n+3) .n { color: var(--van-accent-strong, #0a5c41); }
.van-bars .cn { font-size: 13px; font-weight: 600; color: var(--van-title, #171a21); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.van-bars .cn:hover { color: var(--van-accent-strong, #0a5c41); }
.van-bars .v { font-size: 11.5px; color: var(--van-muted, #7a828f); font-variant-numeric: tabular-nums; }
.van-bars .track { height: 6px; border-radius: 3px; background: var(--van-soft, #eef2f6); overflow: hidden; }
.van-bars .fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--van-accent, #12B981), #2FE0A8); }

/* ---- 07 站点数据卡 ---- */
.van-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.van-stats .cell { background: var(--van-soft, #eef2f6); border-radius: 11px; padding: 12px 12px 10px; }
.van-stats .cell.wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.van-stats .num { display: flex; align-items: center; gap: 5px; font-size: 19px; font-weight: 800; color: var(--van-accent-strong, #0a5c41); font-variant-numeric: tabular-nums; line-height: 1.2; }
.van-stats .num i { font-style: normal; font-size: 13px; }
.van-stats .lab { font-size: 11px; color: var(--van-muted, #7a828f); margin-top: 2px; }
.van-stats .wide .txt b { font-size: 13px; color: var(--van-title, #171a21); display: block; }
.van-stats .wide .txt i { font-style: normal; font-size: 11px; color: var(--van-muted, #7a828f); }
.van-stats .wide .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--van-accent-weak, rgba(18, 185, 129, .10)); color: var(--van-accent-strong, #0a5c41); display: flex; align-items: center; justify-content: center; flex: none; }

/* ---- 08 求资源卡 ---- */
.van-side-request-card .ask { background: linear-gradient(135deg, var(--van-accent-weak, rgba(18, 185, 129, .10)), transparent 70%), var(--van-soft, #eef2f6); border-radius: 12px; padding: 16px 14px; text-align: center; }
.van-side-request-card .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--van-card, #fff); color: var(--van-accent-strong, #0a5c41); display: flex; align-items: center; justify-content: center; margin: 0 auto 9px; box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.van-side-request-card b { display: block; font-size: 14px; font-weight: 700; color: var(--van-title, #171a21); }
.van-side-request-card .ask > i { display: block; font-style: normal; font-size: 11.5px; color: var(--van-muted, #7a828f); margin: 4px 0 12px; }
.van-side-request-card .btn { display: block; background: var(--van-accent, #12B981); color: var(--van-accent-ink, #04150f); font-size: 13px; font-weight: 700; padding: 9px 0; border-radius: 10px; text-decoration: none; transition: filter .2s; }
.van-side-request-card .btn:hover { filter: brightness(1.08); color: var(--van-accent-ink, #04150f); }

/* ---- 09 热门标签云 ---- */
.van-side-tag-cloud .cloudy { display: flex; flex-wrap: wrap; gap: 8px; }
.van-side-tag-cloud .cloudy a { display: flex; align-items: center; gap: 5px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--van-text, #4a4f5a); background: var(--van-soft, #eef2f6); padding: 5px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.van-side-tag-cloud .cloudy a .c { font-size: 10px; color: var(--van-muted, #7a828f); font-weight: 400; }
.van-side-tag-cloud .cloudy a:hover { background: var(--van-accent, #12B981); color: var(--van-accent-ink, #04150f); }
.van-side-tag-cloud .cloudy a:hover .c { color: var(--van-accent-ink, #04150f); opacity: .7; }
.van-side-tag-cloud .cloudy a.hot { font-size: 13.5px; color: var(--van-accent-strong, #0a5c41); background: var(--van-accent-weak, rgba(18, 185, 129, .10)); }

/* ---- 接管模式下隐藏父主题硬编码的侧栏旧导航（v1.33）----
   线上父主题在 .sidebar 尾部写死 UL.h-navList（游戏介绍/视频/截图/下载 4 链接），
   暗色下是亮底很突兀，且与「快捷导航」模块功能重复。仅接管模式隐藏，小工具模式不动。 */
body.van-side-takeover .sidebar .h-navList { display: none !important; }
