.xu5-tabs-wrapper{display:flex;min-height:300px}

/* 搜索模式：右侧只显示搜索结果，分类面板隐藏 */
#xu5TabsWrapper.xu5-search-mode .xu5-category-panels{display:none}
#xu5TabsWrapper.xu5-search-mode .xu5-search-results{display:block}

/* 搜索模式：左侧只显示“全部资源/全部游戏”，样式与普通分类按钮一致 */
#xu5TabsWrapper.xu5-search-mode .xu5-tab-nav .xu5-tab-btn{
  display:none;
}
#xu5TabsWrapper.xu5-search-mode .xu5-tab-nav::before{
  content:'全部资源';
  display:block;
  width:calc(100% - 12px);
  margin:2px 6px;
  padding:6px 10px;
  text-align:center;
  font-size:14px;
  font-weight:600;
  color:#409eff;
  background:#e8f0fe;
  border-radius:6px;
  box-sizing:border-box;
}
.xu5-tab-nav{width:120px;flex-shrink:0;border-right:1px solid #e4e7ed;padding:8px 0}
.xu5-tab-btn{display:block;width:calc(100% - 12px);margin:2px 4px;padding:4px 4px;border:none;background:none;text-align:center;cursor:pointer;font-size:14px;color:#303133;transition:color .2s,background .2s,border-radius .2s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:6px;box-sizing:border-box}
.xu5-tab-btn:hover{color:#409eff;background:#f0f2f5}
.xu5-tab-btn.active{color:#409eff;font-weight:600;background:#e8f0fe87;border-right:none}
.xu5-tab-panels{flex:1;min-width:0;padding:0 1px}
.xu5-tab-panel{display:none}
.xu5-tab-panel.active{display:block}
.xu5-tab-panel[data-loaded="0"] .tab-content{min-height:80px}
.xu5-accordion-item{border-bottom:1px solid #ebeef5}
.xu5-accordion-header{display:flex;align-items:center;padding:10px 14px;cursor:pointer;transition:background .2s;font-size:16px;color:#673AB7;font-weight:500}
.xu5-accordion-header:hover{background:#f5f7fa}
.xu5-accordion-header .icon-container{width:32px;height:32px;margin-right:8px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:8px;overflow:hidden}
.xu5-accordion-header .icon-container .img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.xu5-accordion-header .arrow{margin-left:auto;transition:transform .2s;font-size:14px;color:#999}
.xu5-accordion-header.open .arrow{transform:rotate(90deg)}
.xu5-accordion-body{display:none;padding:0 10px 10px}
.xu5-accordion-body.open{display:block}
.xu5-accordion-header:focus-visible,.url:focus-visible{outline:2px solid #409eff;outline-offset:-2px;border-radius:6px}
.xu5-search-row{display:flex;align-items:center;gap:10px;margin:12px auto;max-width:800px;padding:0 15px;box-sizing:border-box}
.xu5-search{position:relative;flex:1;min-width:0}
.xu5-ra-float-btn{display:inline-flex;align-items:center;gap:5px;height:44px;padding:0 16px;border:1px solid #e0e0e0;border-radius:8px;background:#fff;color:#999;font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .3s;flex-shrink:0;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06)}
.xu5-ra-float-btn:hover{border-color:#409eff;color:#409eff;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06),0 0 0 3px rgba(64,158,255,0.08)}
.xu5-ra-float-btn svg{width:15px;height:15px;flex-shrink:0}
.xu5-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:#aaa;pointer-events:none}
.xu5-search-input{width:100%;height:44px;border-radius:8px;border:1px solid #e0e0e0;font-size:14px;padding:0 40px 0 42px;outline:none;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06);transition:border-color .3s,box-shadow .3s;box-sizing:border-box}
.xu5-search-input:focus{border-color:#999;box-shadow:inset 0 1px 3px rgba(0,0,0,0.06),0 0 0 3px rgba(0,0,0,0.04)}
.xu5-search-clear{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:20px;color:#999;cursor:pointer;display:none;line-height:1}
.xu5-search-clear.visible{display:block}
.xu5-search-empty{text-align:center;color:#666;margin:15px 0;font-size:14px;padding:12px;background:#f5f5f5;border-radius:4px;display:none}
.xu5-search-info{text-align:center;color:#666;margin:15px 0;font-size:15px;padding:12px;background:#f5f5f5;border-radius:4px;display:none}
.xu5-search-results{display:none}
.xu5-no-image{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#f0f2f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8c8c8' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/40% no-repeat;border-radius:8px;font-size:0;color:transparent}

/* ─── 分页（软件/游戏共用） ─── */
.xu5-pagination{display:flex;align-items:center;justify-content:center;gap:6px;padding:16px 0;flex-wrap:wrap}
.xu5-page-btn{padding:6px 14px;border:1px solid #dcdfe6;border-radius:6px;background:#fff;cursor:pointer;font-size:13px;color:#606266;transition:all .2s}
.xu5-page-btn:hover:not(:disabled){border-color:#409eff;color:#409eff}
.xu5-page-btn:disabled{opacity:.4;cursor:not-allowed}
.xu5-page-btn.active{background:#409eff;color:#fff;border-color:#409eff}
.xu5-page-nums{display:flex;gap:4px}
.xu5-page-num{min-width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid #dcdfe6;border-radius:6px;background:#fff;cursor:pointer;font-size:13px;color:#606266;transition:all .2s}
.xu5-page-num:hover{border-color:#409eff;color:#409eff}
.xu5-page-num.active{background:#409eff;color:#fff;border-color:#409eff;font-weight:600}
.xu5-page-ellipsis{min-width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:13px;color:#999}
.xu5-page-info{font-size:12px;color:#909399;margin-left:8px}

@media(max-width:768px){
  .item-tabs{margin-left:4px;margin-right:4px}
  .xu5-search-row{margin:12px 0;padding:0 10px}
  .xu5-ra-float-btn span{display:none}
  .xu5-ra-float-btn{padding:0 12px;height:40px}
  .xu5-tab-nav{width:100px;font-size:12px}
  .xu5-tab-btn{padding:7px 8px;font-size:12px}
  .xu5-accordion-header{padding:8px 10px;font-size:14px}
  .xu5-accordion-header .icon-container{width:28px;height:28px}
  .xu5-search-input{height:40px;font-size:13px;padding:0 36px 0 38px}
  .xu5-search-icon{width:16px;height:16px;left:12px}
  .item-content .nav{flex-direction:column;align-items:unset}
  .item-content .nav .name{max-width:100%;margin-right:0}
  .item-content .nav .urls{margin-top:6px;flex-wrap:wrap}
}

/* ==========================================================================
   游戏列表页（body.xu5-game-archive）
   外围黑底沿用 style.css；内容在白色 .item-tabs 内；不影响软件列表页
   ========================================================================== */

/* 滚动条 */
html:has(body.xu5-game-archive:not(.xu5-game-skin-b)){scrollbar-color:#2a2f3a #000;scrollbar-width:thin}
html:has(body.xu5-game-archive:not(.xu5-game-skin-b))::-webkit-scrollbar{width:12px;height:12px}
html:has(body.xu5-game-archive:not(.xu5-game-skin-b))::-webkit-scrollbar-track{background:#000}
html:has(body.xu5-game-archive:not(.xu5-game-skin-b))::-webkit-scrollbar-thumb{background:#2a2f3a;border-radius:8px;border:3px solid #000}
html:has(body.xu5-game-archive:not(.xu5-game-skin-b))::-webkit-scrollbar-thumb:hover{background:#3a4150}

/* 搜索框 / 远程协助（紫色强调，区别于软件页蓝色） */
body.xu5-game-archive .xu5-search-input:focus{border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.14)}
body.xu5-game-archive .xu5-ra-float-btn:hover{border-color:#8b5cf6;color:#7c3aed;box-shadow:0 0 0 3px rgba(139,92,246,.1)}
body.xu5-game-archive .xu5-search-empty,body.xu5-game-archive .xu5-search-info{border:1px solid #eceef3}

/* 左侧分类导航 */
body.xu5-game-archive .xu5-tab-nav{border-right-color:#eceef3}
body.xu5-game-archive .xu5-tab-btn{color:#5b6472}
body.xu5-game-archive .xu5-tab-btn:hover{color:#7c3aed;background:#f3f0ff}
body.xu5-game-archive .xu5-tab-btn.active{color:#7c3aed;background:#f1ecff;font-weight:600;box-shadow:inset 0 0 0 1px rgba(139,92,246,.2)}
body.xu5-game-archive #xu5TabsWrapper.xu5-search-mode .xu5-tab-nav::before{content:'全部游戏';color:#7c3aed;background:#f1ecff}
body.xu5-game-archive:not(.xu5-game-skin-b) .xu5-tab-nav .xu5-ra-float-btn{
  width:calc(100% - 12px);
  margin:10px 4px 4px;
  height:36px;
  padding:0 8px;
  justify-content:center;
  font-size:12px;
  box-sizing:border-box;
}

/* 游戏封面卡片 */
body.xu5-game-archive .xu5-game-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:20px;padding:16px 16px 20px}
body.xu5-game-archive .xu5-game-card{display:flex;flex-direction:column;position:relative;isolation:isolate;border-radius:10px;overflow:hidden;background:#fff;border:1px solid #eceef2;box-shadow:none;transition:border-color .2s ease,box-shadow .2s ease;text-decoration:none;color:inherit}
body.xu5-game-archive .xu5-game-card:hover{border-color:#e2e5eb;box-shadow:0 6px 16px -10px rgba(20,23,40,.16)}
body.xu5-game-archive .xu5-game-cover{position:relative;width:100%;padding-top:56.25%;overflow:hidden;background:#eef0f4}
body.xu5-game-archive .xu5-game-cover img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
body.xu5-game-archive .xu5-game-nocover{position:absolute;top:0;left:0;width:100%;height:100%;background:#16182a url('../../static/img/default-cover.jpg') center/cover no-repeat;font-size:0;color:transparent}
body.xu5-game-archive .xu5-game-info{padding:10px 12px 12px}
body.xu5-game-archive .xu5-game-title{font-size:14px;font-weight:600;color:#2a2f3a;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* 角标：NEW / 评分 */
body.xu5-game-archive .xu5-game-badge-new{position:absolute;top:8px;left:8px;z-index:4;padding:2px 8px;border-radius:6px;font-size:11px;font-weight:800;letter-spacing:.6px;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);box-shadow:0 4px 10px -4px rgba(124,58,237,.8)}
body.xu5-game-archive .xu5-game-badge-rating{position:absolute;top:8px;right:8px;z-index:4;display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:6px;font-size:12px;font-weight:800;color:#ffd86b;background:rgba(7,9,14,.6);border:1px solid rgba(255,255,255,.14)}
body.xu5-game-archive .xu5-game-badge-rating svg{width:11px;height:11px;fill:#ffd86b}

/* 分页（紫色强调） */
body.xu5-game-archive .xu5-page-btn:hover:not(:disabled),body.xu5-game-archive .xu5-page-num:hover{border-color:#8b5cf6;color:#7c3aed}
body.xu5-game-archive .xu5-page-btn.active,body.xu5-game-archive .xu5-page-num.active{background:linear-gradient(135deg,#6366f1,#7c83f3);border-color:transparent;color:#fff;box-shadow:0 6px 14px -10px rgba(124,58,237,.5)}

/* focus-visible / 页脚链接 */
body.xu5-game-archive a:focus-visible,
body.xu5-game-archive button:focus-visible:not(.xu5-header-search-close):not(.xu5-header-search-btn),
body.xu5-game-archive input:focus-visible:not(.xu5-header-search-input),
body.xu5-game-archive .xu5-tab-btn:focus-visible,
body.xu5-game-archive .xu5-game-card:focus-visible{outline:2px solid #8b5cf6;outline-offset:2px;border-radius:8px}
body.xu5-game-archive .xu5-footer-nav-link:hover,
body.xu5-game-archive .xu5-friend-link:hover,
body.xu5-game-archive .footer-links a,
body.xu5-game-archive .time:hover{color:#7c3aed}

/* 搜索关键词高亮 */
.xu5-hl{background:rgba(139,92,246,.28);color:inherit;border-radius:3px;padding:0 1px}
body.xu5-game-archive .xu5-hl{background:rgba(139,92,246,.2);color:#6d28d9}

/* 骨架屏（游戏搜索/分页加载） */
body.xu5-game-archive .xu5-skel-card{border-radius:12px;overflow:hidden}
body.xu5-game-archive .xu5-skel-cover{width:100%;padding-top:56.25%}
body.xu5-game-archive .xu5-skel-cover,body.xu5-game-archive .xu5-skel-line{position:relative;overflow:hidden;background:rgba(127,127,127,.15)}
body.xu5-game-archive .xu5-skel-line{height:12px;margin:10px 12px;border-radius:6px}
body.xu5-game-archive .xu5-skel-line.short{width:50%}
@keyframes xu5-shimmer{100%{transform:translateX(100%)}}
body.xu5-game-archive .xu5-skel-cover::after,body.xu5-game-archive .xu5-skel-line::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(127,127,127,.18),transparent);animation:xu5-shimmer 1.2s infinite}

/* 移动端 */
@media (max-width:600px){
  body.xu5-game-archive .xu5-tab-nav{width:96px}
  body.xu5-game-archive .xu5-game-cards{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;padding:12px 10px}
  body.xu5-game-archive .xu5-game-info{padding:9px 10px 11px}
  body.xu5-game-archive .xu5-game-title{font-size:13px;line-height:1.35;-webkit-line-clamp:2}
  body.xu5-game-archive .xu5-game-badge-new{font-size:10px;padding:1px 6px;top:6px;left:6px}
  body.xu5-game-archive .xu5-game-badge-rating{font-size:11px;padding:1px 6px;top:6px;right:6px}
}
@media (max-width:360px){
  body.xu5-game-archive .xu5-game-cards{gap:8px;padding:10px 8px}
  body.xu5-game-archive .xu5-game-title{font-size:12px}
}

@media(prefers-reduced-motion:reduce){
  body.xu5-game-archive .xu5-skel-cover::after,body.xu5-game-archive .xu5-skel-line::after{animation:none}
}

/* ==========================================================================
   游戏皮肤 B：列表排版（浅色外壳在 style.css）
   ========================================================================== */
body.xu5-game-archive.xu5-game-skin-b .item-tabs{
  background:transparent;
  border-radius:0;
  box-shadow:none;
  width:min(100%, var(--xu5-b-max));
  max-width:var(--xu5-b-max);
  margin:0 auto;
  padding:4px var(--xu5-b-pad) 8px;
  box-sizing:border-box;
  flex:0 1 auto;
  align-self:center;
}
body.xu5-game-archive.xu5-game-skin-b .item-tabs .breadcrumb{
  padding:8px 0 0;
  font-size:12px;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tabs-wrapper{flex-direction:column;min-height:0}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-nav{
  width:100%;
  flex-shrink:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px 4px;
  border-right:none;
  border-bottom:1px solid #eceef3;
  padding:6px 0 8px;
  box-sizing:border-box;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  margin:0;
  padding:4px 10px;
  border-radius:6px;
  font-size:13px;
  line-height:1.3;
  font-weight:500;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  background:transparent;
  border:none;
  box-shadow:none;
  color:#5b6472;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-btn:hover{
  color:#7c3aed;
  background:#f3f0ff;
  border:none;
  box-shadow:none;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-btn.active{
  color:#7c3aed;
  background:#f3f0ff;
  border:none;
  font-weight:600;
  box-shadow:none;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-nav .xu5-ra-float-btn{
  margin-left:auto;
  flex:0 0 auto;
  height:28px;
  padding:0 10px;
  border-radius:6px;
  background:#fff;
  border:1px solid #e6e9f0;
  box-shadow:none;
  font-size:12px;
  color:#5b6472;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-nav .xu5-ra-float-btn:hover{
  border-color:#c4b5fd;
  color:#7c3aed;
  box-shadow:none;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-tab-panels{padding:0}
body.xu5-game-archive.xu5-game-skin-b .xu5-game-cards{
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:12px;
  padding:10px 0 14px;
}
body.xu5-game-archive.xu5-game-skin-b .xu5-game-cover{padding-top:56.25%}
body.xu5-game-archive.xu5-game-skin-b .xu5-game-card{border-radius:8px;background:#fff}
body.xu5-game-archive.xu5-game-skin-b .xu5-game-info{padding:8px 10px 10px}
body.xu5-game-archive.xu5-game-skin-b .xu5-game-title{font-size:13px;line-height:1.35}
body.xu5-game-archive.xu5-game-skin-b .xu5-pagination{padding:8px 0 4px;gap:4px}
body.xu5-game-archive.xu5-game-skin-b .xu5-page-btn{padding:4px 10px;font-size:12px}
body.xu5-game-archive.xu5-game-skin-b .xu5-page-num{
  min-width:28px;
  height:28px;
  font-size:12px;
}
@media (max-width:768px){
  body.xu5-game-archive.xu5-game-skin-b .xu5-tab-nav .xu5-ra-float-btn{height:28px;padding:0 8px}
}
@media (max-width:600px){
  body.xu5-game-archive.xu5-game-skin-b .xu5-tab-nav{
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding:4px 0 8px;
    gap:2px;
  }
  body.xu5-game-archive.xu5-game-skin-b .xu5-tab-btn{flex:0 0 auto;padding:4px 8px;font-size:12px}
  body.xu5-game-archive.xu5-game-skin-b .xu5-game-cards{
    grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
    gap:8px;
    padding:8px 0 12px;
  }
}
