/* ==========================================================================
   XK 游戏库 — 仿 3387 主站样式（详情页 / 游戏大厅）
   ========================================================================== */
:root {
    --xk-red: #ff4d3d;
    --xk-red-2: #ff7a22;
    --xk-green: #12b886;
    --xk-orange: #ff8a00;
    --xk-text: #23262e;
    --xk-text-2: #6b7280;
    --xk-text-3: #9aa1ad;
    --xk-line: #eceef3;
    --xk-bg: #f5f6fa;
    --xk-card: #ffffff;
    --xk-radius: 14px;
    --xk-shadow: 0 4px 20px rgba(24, 30, 48, .06);
    --xk-shadow-h: 0 10px 30px rgba(24, 30, 48, .12);
}

.xk-main { padding-bottom: 40px; overflow-x: hidden; }

/* ================= 布局优化：加宽容器、放大字号与预览图 ================= */
/* 关键：主题对 body 本身做了 max-width:1200px + --mian-max-width:1200px，
   只改 .container 无效；必须在游戏页作用域内同时覆盖 body 与其 CSS 变量 */
/* 关键：body 整体 1400 并居中（margin auto），解决之前"整页靠左"的问题；
   同时覆盖 --mian-max-width 与 .xk-main.container，三者保持一致 */
body.xk-game-page { max-width: 1400px !important; margin-left: auto !important; margin-right: auto !important; }
body.xk-game-page { --mian-max-width: 1400px; }
body.xk-game-page .xk-main.container { max-width: 1400px !important; margin-left: auto !important; margin-right: auto !important; }
.xk-block { padding: 26px; }
.xk-block-title { font-size: 22px; }
.xk-intro { font-size: 16px; line-height: 2.15; }
.xk-intro p { margin: 0 0 12px; }
.xk-hero-card { padding: 26px 30px; }
.xk-card-title { font-size: 26px; }
.xk-card-logo { width: 92px; height: 92px; flex-basis: 92px; border-radius: 20px; }
.xk-card-sub { font-size: 14px; }
.xk-tag { font-size: 13.5px; padding: 6px 13px; }
.xk-spec li b, .xk-spec li span { font-size: 14px; }
.xk-spec-inline li { font-size: 14px; }
.xk-dl-btn { height: 50px; padding: 0 36px; font-size: 16px; }

/* 首页 / 分类页：容器加宽后卡片自然放大，略增间距 */
.xk-sec { padding: 24px 26px 26px; }
.xk-sec-title { font-size: 25px; }
.xk-sec-grid, .xk-grid { gap: 22px; }
.xk-hcard-body { padding: 16px 17px 17px; gap: 13px; }
.xk-hcard-body .ico { width: 66px; height: 66px; flex-basis: 66px; border-radius: 15px; }
.xk-hcard-body h3 { font-size: 18.5px; }
.xk-hall-title { font-size: 24px; }
.xk-hall-title em { font-size: 14px; }

/* 详情页：截图放大、侧栏略宽避免主区过窄 */
.xk-body { grid-template-columns: minmax(0, 1fr) 372px; gap: 26px; }
.xk-shots { gap: 16px; }
.xk-side-block { padding: 22px; }
.xk-side-item img { width: 58px; height: 58px; flex-basis: 58px; border-radius: 14px; }
.xk-side-item .name { font-size: 14.5px; }
.xk-cat-tabs a { font-size: 14px; padding: 9px 18px; }
body.dark .xk-tool svg { color: var(--xk-red-2); }

/* 面包屑 */
.xk-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--xk-text-3);
    padding: 14px 0 12px;
    flex-wrap: wrap;
}
.xk-crumb a { color: var(--xk-text-2); text-decoration: none; }
.xk-crumb a:hover { color: var(--xk-red); }
.xk-crumb .cur { color: var(--xk-text); }

/* ================= 详情页 Hero（无视频，横向信息栏） ================= */
.xk-hero { display: block; }

.xk-hero-media { min-width: 0; }

.xk-player {
    position: relative;
    border-radius: var(--xk-radius);
    overflow: hidden;
    background: #0d1015;
    aspect-ratio: 16 / 9;
    box-shadow: var(--xk-shadow);
}
.xk-player-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xk-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.xk-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #111; }
.xk-fallback img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: .55; }
.xk-fallback-tip { position: relative; color: #fff; font-size: 13px; background: rgba(0, 0, 0, .55); padding: 6px 14px; border-radius: 20px; }

.xk-media-tabs {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    background: #eef0f5;
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.xk-mtab {
    border: 0;
    background: transparent;
    color: var(--xk-text-2);
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: .2s;
}
.xk-mtab em { font-style: normal; font-size: 11px; opacity: .6; }
.xk-mtab:hover { color: var(--xk-text); }
.xk-mtab.active { background: #fff; color: var(--xk-text); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

/* 信息卡（横跨整行） */
.xk-hero-card {
    background: var(--xk-card);
    border-radius: var(--xk-radius);
    padding: 20px 24px;
    box-shadow: var(--xk-shadow);
    border: 1px solid var(--xk-line);
}
.xk-card-head { display: flex; gap: 14px; align-items: center; }
.xk-card-logo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; flex: 0 0 72px; background: #f2f3f7; }
.xk-card-titlebox { min-width: 0; flex: 1; }
.xk-card-title { font-size: 21px; line-height: 1.35; margin: 0 0 6px; font-weight: 700; color: var(--xk-text); word-break: break-all; }
.xk-card-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.xk-card-stats {
    display: flex; align-items: baseline; gap: 22px;
}
.xk-edition { color: #12b886 !important; background: none !important; font-size: 12px; font-weight: 600; }
.xk-discount {
    background: linear-gradient(135deg, var(--xk-red), var(--xk-red-2));
    color: #fff; font-size: 12px; font-weight: 700;
    padding: 2px 8px; border-radius: 5px; letter-spacing: .3px;
}

.xk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.xk-tag { font-size: 12px; color: var(--xk-text-2); background: #f3f4f8; padding: 4px 10px; border-radius: 6px; }

.xk-hero-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px 24px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--xk-line);
}

.xk-score-row { display: flex; align-items: baseline; gap: 16px; margin-top: 16px; padding: 14px 0; border-top: 1px dashed var(--xk-line); border-bottom: 1px dashed var(--xk-line); }
.xk-score { color: var(--xk-orange); font-size: 12px; }
.xk-score b { font-size: 22px; font-weight: 800; margin-right: 2px; font-family: DIN, -apple-system, sans-serif; }
.xk-players { font-size: 12px; color: var(--xk-text-3); }
.xk-players b { font-size: 16px; color: var(--xk-text); font-weight: 700; margin-right: 3px; }

.xk-spec { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.xk-spec li { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.xk-spec li span { color: var(--xk-text-3); }
.xk-spec li b { color: var(--xk-text); font-weight: 600; font-size: 13px; }

/* 信息栏内横排规格 */
.xk-spec-inline { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; }
.xk-spec-inline li { flex-direction: row; align-items: baseline; gap: 6px; }

.xk-648 {
    margin-top: 16px; display: flex; gap: 10px; align-items: center;
    background: linear-gradient(135deg, #fff7e8, #fff2d9);
    border: 1px solid #ffe2b0; border-radius: 10px; padding: 10px 12px;
}
.xk-hero-foot .xk-648 { margin-top: 0; flex: 0 1 auto; }
.xk-648 .ic {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #ff5a5a, #ff3b30);
    color: #fff; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex: 0 0 28px;
}
.xk-648 strong { display: block; font-size: 13px; color: #a35b00; }
.xk-648 p { margin: 2px 0 0; font-size: 11px; color: #b98236; }

/* ================= Hero 卡片内下载按钮（右侧操作区） ================= */
.xk-card-actions {
    margin-left: auto; flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.xk-dl-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 30px; border: 0; border-radius: 22px;
    background: linear-gradient(135deg, var(--xk-red, #ff5a36), var(--xk-red-2, #ff2d2d));
    color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
    box-shadow: 0 6px 16px rgba(255, 60, 40, .28); transition: transform .15s ease, box-shadow .15s ease;
}
.xk-dl-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(255, 60, 40, .34); color: #fff; }
.xk-dl-btn--off { background: #eef0f3; color: #a6acb3; box-shadow: none; cursor: not-allowed; }

/* ================= 正文两栏 ================= */
.xk-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 20px; align-items: start; }
.xk-body-main { min-width: 0; }

/* 修复底部"白色方框"：zibll 内容容器(.xk-main)默认白底，grid 两栏高度不一致时
   短栏下方会露出该白底形成一个空白块。改为透明后，白色仅由各卡片(xk-block /
   xk-hero-card)自身提供，列下空隙显示页面灰底，白框即消失（首页/详情页通用）。
   用 !important 覆盖 zibll 对 .xk-main / main 的更高特异性白底规则 */
body.xk-game-page .xk-main,
body.xk-game-page main.xk-main,
body.xk-game-page .xk-body,
body.xk-game-page .xk-body-main,
body.xk-game-page .xk-body-side { background: transparent !important; }

/* 真正的底部白色方框来源：zibll 的 <footer class="footer"> 内部只有一个
   完全空的 <ul class="list-inline">（三个空 li），但主题给了白底 + 上下内边距，
   于是整页底部渲染出一条 1400×80 的纯白空条。页脚无任何内容，直接收起。
   ⚠ 若以后在页脚填版权/备案信息，请删除下面这条 display:none，改用
   仅去白底的做法：background:transparent;padding:0; */
body.xk-game-page footer.footer {
    display: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.xk-block {
    background: var(--xk-card);
    border: 1px solid var(--xk-line);
    border-radius: var(--xk-radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--xk-shadow);
}
.xk-block-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700; color: var(--xk-text);
    margin: 0 0 18px; line-height: 1;
}
.xk-block-title i { width: 4px; height: 17px; border-radius: 2px; background: linear-gradient(180deg, var(--xk-red), var(--xk-red-2)); display: block; }
.xk-block-sub { font-size: 12px; color: var(--xk-text-3); font-weight: 400; margin-left: 4px; }

.xk-intro { font-size: 14.5px; line-height: 2.0; color: #4b5563; }
.xk-intro p { margin: 0 0 10px; }
.xk-intro p:last-child { margin-bottom: 0; }
.xk-intro img { max-width: 100%; height: auto; }

/* 福利区 */
.xk-welfare { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
.xk-welfare-side {
    background: linear-gradient(160deg, #fff8ea 0%, #fffdf6 60%);
    border: 1px solid #ffeacb;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.xk-welfare-side img { width: 68px; height: 68px; border-radius: 16px; object-fit: cover; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); }
.xk-welfare-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid #ffd9a3; color: #b06a00;
    font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 20px;
}
.xk-welfare-badge b { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #ff5a5a, #ff3b30); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.xk-welfare-tip { margin: 0; font-size: 12px; color: #c08a3c; }

.xk-welfare-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.xk-welfare-list li h3 { font-size: 14px; font-weight: 700; color: var(--xk-red); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.xk-welfare-list li h3::after { content: ""; width: 10px; height: 3px; border-radius: 2px; background: #ffd6d0; }
.xk-welfare-list li h3 em { font-style: normal; font-size: 11px; color: #fff; background: var(--xk-red); padding: 1px 5px; border-radius: 3px; }
.xk-welfare-list .txt { font-size: 13px; line-height: 1.85; color: #5b6472; }
.xk-welfare-list .txt p { margin: 0 0 6px; }
.xk-welfare-list .txt p:last-child { margin: 0; }
.xk-welfare-list .txt br + br { display: none; }

/* 截图 */
.xk-shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.xk-shot {
    display: block; position: relative; overflow: hidden;
    border-radius: 10px; aspect-ratio: 9 / 16; background: #f2f3f7;
}
.xk-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.xk-shot:hover img { transform: scale(1.06); }
.xk-shot::after {
    content: "🔍"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .28); color: #fff; opacity: 0; transition: .25s; font-size: 20px;
}
.xk-shot:hover::after { opacity: 1; }

/* 工具 */
.xk-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xk-tool { display: flex; gap: 10px; align-items: center; background: #f8f9fc; border-radius: 10px; padding: 12px; }
.xk-tool svg { width: 30px; height: 30px; flex: 0 0 30px; color: var(--xk-red); }
.xk-tool h3 { font-size: 13px; font-weight: 600; margin: 0 0 3px; color: var(--xk-text); }
.xk-tool p { font-size: 12px; color: var(--xk-text-3); margin: 0; line-height: 1.5; }

/* 侧栏 */
.xk-body-side { min-width: 0; }
.xk-side-block { padding: 18px; }
.xk-side-list { display: flex; flex-direction: column; gap: 5px; }
.xk-side-item { display: flex; gap: 10px; align-items: center; padding: 7px; border-radius: 10px; text-decoration: none; transition: .2s; }
.xk-side-item:hover { background: #f7f8fb; }
.xk-side-item img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: 0 0 52px; background: #f2f3f7; }
.xk-side-item .info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.xk-side-item .name { font-size: 13px; color: var(--xk-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xk-side-item .meta { font-size: 11px; color: var(--xk-text-3); display: flex; align-items: center; gap: 6px; }
.xk-side-item .meta .d { font-style: normal; color: var(--xk-red); background: #fff1ef; padding: 0 4px; border-radius: 3px; }

.xk-side-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xk-side-cat {
    display: flex; align-items: center; justify-content: space-between;
    background: #f7f8fb; border-radius: 8px; padding: 9px 11px;
    font-size: 13px; color: var(--xk-text-2); text-decoration: none; transition: .2s;
}
.xk-side-cat:hover { background: #fff1ef; color: var(--xk-red); }
.xk-side-cat em { font-style: normal; font-size: 11px; color: var(--xk-text-3); }

.xk-side-note { background: #fbfbfd; border: 1px dashed var(--xk-line); border-radius: 12px; padding: 14px; }
.xk-side-note b { font-size: 12px; color: var(--xk-text-2); }
.xk-side-note p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; color: var(--xk-text-3); }

/* ================= 大厅 ================= */
.xk-hall-page { padding-top: 16px; }

.xk-banner {
    position: relative; border-radius: 18px; overflow: hidden;
    height: 420px; box-shadow: 0 12px 40px rgba(20, 26, 44, .18); background: #14161c;
    margin-bottom: 24px;
}
.xk-banner-track { position: absolute; inset: 0; }
.xk-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .7s ease;
    display: flex; align-items: center;
    text-decoration: none;
}
.xk-slide.active { opacity: 1; z-index: 2; }
.xk-slide-shade {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(8, 10, 15, .95) 0%, rgba(8, 10, 15, .78) 40%, rgba(8, 10, 15, .28) 70%, rgba(8, 10, 15, .05) 100%);
}
.xk-slide-inner { position: relative; z-index: 2; padding: 0 56px; max-width: 620px; }
.xk-slide-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.xk-slide-badges .b-green { color: #2ee6a8 !important; font-size: 13px; font-weight: 600; }
.xk-slide-badges .b-red { background: linear-gradient(135deg, #ff5a4d, #ff2d20); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 5px; }
.xk-slide-inner h2 { color: #fff !important; font-size: 34px; line-height: 1.25; margin: 0 0 12px; font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.xk-slide-inner p { color: rgba(255, 255, 255, .85) !important; font-size: 15px; line-height: 1.75; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xk-slide-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.xk-slide-meta span { color: rgba(255, 255, 255, .78) !important; font-size: 12px; }
.xk-slide-meta .pt { color: #ffb524; font-weight: 700; font-size: 15px; }
.xk-slide-meta .tg { background: rgba(255, 255, 255, .14); border-radius: 4px; padding: 2px 8px; }
.xk-slide-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #ff5a4d, #ff2d20);
    color: #fff; font-size: 14px; font-weight: 600;
    padding: 11px 26px; border-radius: 24px; box-shadow: 0 8px 20px rgba(255, 60, 40, .35);
}
.xk-slide-btn i { font-style: normal; font-size: 17px; line-height: 1; }
.xk-banner-dots { position: absolute; bottom: 20px; left: 56px; display: flex; gap: 8px; z-index: 3; }
.xk-banner-dots button {
    width: 8px; height: 8px; border-radius: 4px; border: 0; background: rgba(255, 255, 255, .4);
    cursor: pointer; transition: .3s; padding: 0;
}
.xk-banner-dots button.active { width: 26px; background: #fff; }
.xk-banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .18); color: #fff; font-size: 22px;
    cursor: pointer; opacity: 0; transition: .25s; line-height: 1;
}
.xk-banner:hover .xk-banner-arrow { opacity: 1; }
.xk-banner-arrow:hover { background: rgba(255, 255, 255, .3); }
.xk-banner-arrow.prev { left: 14px; }
.xk-banner-arrow.next { right: 14px; }

/* 大厅头部 */
.xk-hall-bar { margin-bottom: 18px; }
.xk-hall-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; min-width: 0; }
.xk-hall-title { font-size: 22px; font-weight: 800; color: var(--xk-text); margin: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.xk-hall-title em { font-style: normal; font-size: 13px; font-weight: 400; color: var(--xk-text-3); white-space: normal; }

.xk-cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.xk-cat-tabs a {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fff; border: 1px solid var(--xk-line);
    color: var(--xk-text-2); font-size: 13px;
    padding: 8px 16px; border-radius: 20px; text-decoration: none; transition: .2s;
}
.xk-cat-tabs a em { font-style: normal; font-size: 11px; color: var(--xk-text-3); }
.xk-cat-tabs a:hover { border-color: #ffc9c3; color: var(--xk-red); }
.xk-cat-tabs a.active { background: linear-gradient(135deg, var(--xk-red), var(--xk-red-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(255, 60, 40, .28); }
.xk-cat-tabs a.active em { color: rgba(255, 255, 255, .8); }

.xk-hall-body { display: block; }
.xk-hall-list { min-width: 0; }

/* 分类页平铺 */
.xk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; min-width: 0; }

/* 首页分类板块 */
.xk-sec {
    background: var(--xk-card); border-radius: 18px; padding: 20px 20px 20px;
    margin-bottom: 18px; box-shadow: var(--xk-shadow);
}
.xk-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.xk-sec-title {
    display: flex; align-items: center; gap: 9px;
    font-size: 21px; font-weight: 800; color: var(--xk-text);
    margin: 0; letter-spacing: .3px; line-height: 1.2;
}
.xk-sec-ico {
    width: 20px; height: 20px; flex: 0 0 20px; display: block;
    background:
        radial-gradient(circle at 28% 28%, #ff3b30 41%, transparent 42%),
        radial-gradient(circle at 72% 28%, #ff3b30 41%, transparent 42%),
        radial-gradient(circle at 28% 72%, #ff3b30 41%, transparent 42%),
        radial-gradient(circle at 72% 72%, #ff3b30 41%, transparent 42%);
}
.xk-sec-more { font-size: 13px; color: var(--xk-text-3); text-decoration: none; transition: .2s; }
.xk-sec-more:hover { color: var(--xk-red); }
.xk-sec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* 底部声明 */
.xk-hall-note {
    margin: 6px 0 10px; padding: 14px 18px; border-radius: 12px;
    background: #f0f1f6; color: var(--xk-text-3); font-size: 12.5px; line-height: 1.7;
}
.xk-hall-note b { color: var(--xk-text-2); margin-right: 6px; }
body.dark .xk-hall-note { background: #1b1e26; }

/* 大厅卡片：大预览图 + 图标 + 名称 */
.xk-hcard {
    display: block; background: var(--xk-card); border: 1px solid var(--xk-line);
    border-radius: 16px; overflow: hidden; text-decoration: none; transition: .22s;
    min-width: 0;
}
.xk-hcard:hover { transform: translateY(-3px); box-shadow: var(--xk-shadow-h); border-color: #ffd9d4; }
.xk-hcard-poster { position: relative; display: block; aspect-ratio: 16 / 9; background: #f2f3f7; overflow: hidden; }
.xk-hcard-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.xk-hcard:hover .xk-hcard-poster img { transform: scale(1.05); }
.xk-hcard-ed {
    position: absolute; top: 10px; right: 10px;
    background: rgba(18, 184, 134, .92); color: #fff;
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
    backdrop-filter: blur(2px);
}
.xk-hcard-body { display: flex; align-items: center; gap: 10px; padding: 12px 13px 13px; }
.xk-hcard-body .ico { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; flex: 0 0 52px; background: #f2f3f7; }
.xk-hcard-body .txt { min-width: 0; flex: 1; }
.xk-hcard-body h3 {
    font-size: 15.5px; font-weight: 600; color: var(--xk-text); line-height: 1.35;
    margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.xk-hcard-meta { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; min-width: 0; }
.xk-hcard-meta .disc {
    font-style: normal; font-size: 11px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #ff5a4d, #ff2d20);
    padding: 1px 6px; border-radius: 5px; line-height: 1.6; flex: 0 0 auto;
}
.xk-hcard-meta .tg { font-size: 11.5px; color: var(--xk-text-3); min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xk-hcard-648 {
    position: absolute; top: 10px; left: 10px;
    font-size: 11px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, #ff9f1a, #ff6f00);
    padding: 2px 8px; border-radius: 6px; white-space: nowrap;
    box-shadow: 0 3px 10px rgba(255, 120, 0, .35);
}

.xk-empty { color: var(--xk-text-3); font-size: 14px; padding: 40px; text-align: center; grid-column: 1 / -1; }

/* 数字翻页 */
.xk-pager {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 8px; padding: 30px 0 8px;
}
.xk-pager .page-numbers {
    min-width: 40px; height: 40px; padding: 0 13px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px; background: #fff; border: 1px solid var(--xk-line);
    color: var(--xk-text-2); font-size: 14px; font-weight: 500;
    text-decoration: none; transition: .2s; box-sizing: border-box;
}
.xk-pager .page-numbers:hover { border-color: #ffc4bb; color: var(--xk-red); background: #fff8f7; }
.xk-pager .page-numbers.current {
    background: linear-gradient(135deg, #ff5a4d, #ff2d20);
    border-color: transparent; color: #fff; font-weight: 700;
    box-shadow: 0 4px 14px rgba(255, 60, 40, .28);
}
.xk-pager .page-numbers.dots { background: none; border-color: transparent; color: var(--xk-text-3); letter-spacing: 1px; }
.xk-pager .page-numbers.prev, .xk-pager .page-numbers.next { font-size: 17px; }
.xk-pager-info { margin-left: 8px; font-size: 13px; color: var(--xk-text-3); }
body.dark .xk-pager .page-numbers { background: #23272f; border-color: #303540; color: #b9bfcc; }
body.dark .xk-pager .page-numbers.current { background: linear-gradient(135deg, #ff5a4d, #ff2d20); color: #fff; border-color: transparent; }

/* 排行榜 */
.xk-hall-side .xk-block { padding: 16px; margin-bottom: 16px; }
.xk-rank { display: flex; flex-direction: column; gap: 2px; }
.xk-rank-item { display: flex; align-items: center; gap: 9px; padding: 7px 4px; border-radius: 8px; text-decoration: none; transition: .2s; }
.xk-rank-item:hover { background: #f7f8fb; }
.xk-rank-item .no { font-size: 12px; font-weight: 800; color: var(--xk-text-3); width: 14px; text-align: center; font-family: DIN, sans-serif; }
.xk-rank-item .no.n1 { color: #ff3b30; }
.xk-rank-item .no.n2 { color: #ff7a22; }
.xk-rank-item .no.n3 { color: #ffab00; }
.xk-rank-item img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: 0 0 44px; background: #f2f3f7; }
.xk-rank-item .nm { flex: 1; min-width: 0; font-size: 12.5px; color: var(--xk-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xk-rank-item .d { font-style: normal; font-size: 10px; color: var(--xk-red); background: #fff1ef; padding: 1px 4px; border-radius: 3px; flex: 0 0 auto; }

/* ================= Lightbox ================= */
.xk-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(8, 10, 15, .93);
    display: flex; align-items: center; justify-content: center;
}
.xk-lightbox[hidden] { display: none; }
.xk-lightbox img { max-width: 84vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.xk-lightbox button { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.xk-lb-close { top: 24px; right: 26px; width: 42px; height: 42px; font-size: 24px; }
.xk-lb-prev, .xk-lb-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; }
.xk-lb-prev { left: 3vw; }
.xk-lb-next { right: 3vw; }
.xk-lb-count { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .75); font-size: 13px; }
.xk-lightbox button:hover { background: rgba(255, 255, 255, .25); }

/* ================= 响应式 ================= */
@media (max-width: 1100px) {
    .xk-hero, .xk-body, .xk-hall-body { grid-template-columns: minmax(0, 1fr); }
    .xk-hero-card { position: static; }
    .xk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xk-sec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xk-banner { height: 340px; }
    .xk-slide-inner { padding: 0 32px; }
    .xk-banner-dots { left: 32px; }
}

@media (max-width: 900px) {
    .xk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .xk-sec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .xk-main { padding-left: 12px; padding-right: 12px; }

    /* Banner：底部深色渐变保证文字可读，隐藏简介避免与背景文字打架 */
    .xk-banner { height: 260px; border-radius: 14px; margin-bottom: 18px; }
    .xk-slide { align-items: flex-end; padding-bottom: 26px; }
    .xk-slide-shade { background: linear-gradient(180deg, rgba(6, 8, 12, .28) 0%, rgba(6, 8, 12, .72) 46%, rgba(6, 8, 12, .97) 100%); }
    .xk-slide-inner { padding: 0 16px; max-width: 100%; }
    .xk-slide-badges { margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
    .xk-slide-inner h2 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .xk-slide-inner p { display: none; }
    .xk-slide-meta { margin-bottom: 12px; gap: 7px; }
    .xk-slide-meta span { font-size: 11px; }
    .xk-slide-meta .pt { font-size: 13px; }
    .xk-slide-btn { padding: 8px 18px; font-size: 12.5px; }
    .xk-banner-dots { left: 16px; bottom: 10px; }
    .xk-banner-arrow { display: none; }

    /* 移动端：卡片双列，预览图保持 16:9 */
    .xk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .xk-sec { padding: 14px 14px 16px; border-radius: 16px; margin-bottom: 14px; }
    .xk-sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .xk-sec-title { font-size: 18px; }
    .xk-sec-head { margin-bottom: 12px; }
    .xk-hcard-body { gap: 9px; padding: 10px 11px 11px; }
    .xk-hcard-body .ico { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px; }
    .xk-hcard-body h3 { font-size: 14px; margin-bottom: 5px; }
    .xk-hcard-648 { top: 8px; left: 8px; font-size: 10px; padding: 1px 6px; }
    .xk-hcard-ed { top: 8px; right: 8px; font-size: 10px; padding: 1px 6px; }

    .xk-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .xk-welfare { grid-template-columns: minmax(0, 1fr); }
    .xk-tools { grid-template-columns: minmax(0, 1fr); }
    .xk-card-title { font-size: 17px; }
    /* 详情页信息栏：评分类换行、规格与福利竖排 */
    .xk-hero-card { padding: 16px; }
    .xk-card-logo { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 13px; }
    .xk-card-head { flex-wrap: wrap; gap: 10px 12px; }
    .xk-card-stats { margin-left: 0; padding-left: 0; width: 100%; gap: 16px; }
    .xk-card-actions { margin-left: 0; width: 100%; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
    .xk-hero-foot { flex-direction: column; align-items: stretch; gap: 12px; }
    .xk-hero-foot .xk-648 { align-self: flex-start; }
    .xk-spec-inline { gap: 8px 18px; }
    .xk-block { padding: 16px; }
    .xk-hall-title { font-size: 18px; }
    .xk-hall-body { grid-template-columns: minmax(0, 1fr); }
    .xk-hall-side { margin-top: 4px; }
    .xk-cat-tabs { gap: 7px; }
    .xk-cat-tabs a { padding: 7px 13px; font-size: 12.5px; }
}

/* 暗色模式适配（zibll body.dark） */
body.dark {
    --xk-text: #e8ebf2;
    --xk-text-2: #a8b0c0;
    --xk-text-3: #78808f;
    --xk-line: #262b36;
    --xk-bg: #15171d;
    --xk-card: #1b1e26;
    --xk-shadow: 0 4px 20px rgba(0, 0, 0, .35);
    --xk-shadow-h: 0 10px 30px rgba(0, 0, 0, .5);
}
body.dark .xk-media-tabs { background: #23272f; }
body.dark .xk-mtab.active { background: #2f343e; }
body.dark .xk-tag, body.dark .xk-side-cat, body.dark .xk-side-item:hover, body.dark .xk-rank-item:hover, body.dark .xk-tool { background: #23272f; }
body.dark .xk-cat-tabs a { background: #1b1e26; }
body.dark .xk-side-cat:hover, body.dark .xk-rank-item .d, body.dark .xk-side-item .meta .d { background: #33222a; }
body.dark .xk-welfare-side { background: linear-gradient(160deg, #2a2418, #201d17); border-color: #3d3320; }
body.dark .xk-welfare-badge { background: #201d17; border-color: #4a3d24; color: #e0a94e; }
body.dark .xk-welfare-tip { color: #b08a4e; }
body.dark .xk-welfare-list .txt { color: #a8b0c0; }
body.dark .xk-648 { background: linear-gradient(135deg, #2a2418, #201d17); border-color: #3d3320; }
body.dark .xk-648 strong { color: #e0a94e; }
body.dark .xk-648 p { color: #b08a4e; }
body.dark .xk-side-note { background: #1b1e26; }
body.dark .xk-hcard { background: #1f232b; border-color: #2b303a; }
body.dark .xk-hcard-body h3 { color: #e8ecf3; }
body.dark .xk-hcard-meta .tg { color: #8e97a6; }
body.dark .xk-hcard .ico, body.dark .xk-hcard-poster { background: #23272f; }
body.dark .xk-sec { background: #1a1d24; }
body.dark .xk-sec-title { color: #e8ecf3; }
body.dark .xk-shots .xk-shot { background: #23272f; }

/* 移动端防溢出兜底 */
@media (max-width: 720px) {
    .xk-main, .xk-single, .xk-hall-page, .xk-hall-bar, .xk-hall-body, .xk-hall-head,
    .xk-grid, .xk-sec, .xk-sec-grid, .xk-cat-tabs, .xk-block, .xk-body, .xk-body-main, .xk-body-side {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    /* 主题 .container 为 content-box，移动端会溢出，强制修正 */
    .xk-main.container {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .xk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .xk-sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .xk-hcard { width: 100%; max-width: 100%; }
    .xk-hcard-body { width: 100%; }
    .xk-hcard-body h3 { max-width: 100%; word-break: break-all; }
    .xk-hero, .xk-hero-card, .xk-hero-media { max-width: 100%; min-width: 0; }
    .xk-cat-tabs a { max-width: 100%; }
}

/* ==========================================================================
   站点头部：主题未设置 LOGO 图片时用文字品牌兜底
   ========================================================================== */
.navbar-logo:not(:has(img)) {
    display: inline-flex;
    align-items: center;
    height: 100%;
}
.navbar-logo:not(:has(img))::before {
    content: "星空游戏";
    display: inline-block;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 1px;
    white-space: nowrap;
    color: #ff4d3d;
    background: linear-gradient(135deg, #ff4d3d 0%, #ff7a22 60%, #ffab00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.navbar-logo:not(:has(img))::after {
    content: "福利";
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    background: #ff4d3d;
    border-radius: 4px;
    vertical-align: 4px;
    -webkit-text-fill-color: #fff;
}
@media (max-width: 768px) {
    .navbar-logo:not(:has(img))::before { font-size: 18px; letter-spacing: 0; }
    .navbar-logo:not(:has(img))::after { font-size: 10px; }
}

/* ================= 福利板块（专属礼包码） ================= */
.xk-wcode { display: flex; flex-direction: column; gap: 14px; }
.xk-wcode-head {
    font-size: 14px; font-weight: 700; color: var(--xk-red);
    margin: 0; display: flex; align-items: center; gap: 6px;
}
.xk-wcode-head::after { content: ""; width: 10px; height: 3px; border-radius: 2px; background: #ffd6d0; }
.xk-wcode-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.xk-wcode-item {
    display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: center;
    background: linear-gradient(120deg, #fff7f6 0%, #fffbfb 60%);
    border: 1px solid #ffe1de; border-radius: 12px; padding: 14px 16px;
}
.xk-wcode-code { display: flex; align-items: center; gap: 8px; }
.xk-wcode-code code {
    flex: 1; min-width: 0;
    background: #fff; border: 1px dashed var(--xk-red); border-radius: 8px;
    padding: 8px 10px; text-align: center;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 15px; font-weight: 700; letter-spacing: .5px;
    color: var(--xk-red); word-break: break-all; line-height: 1.4;
}
.xk-wcode-copy {
    flex: 0 0 auto;
    border: 1px solid var(--xk-red); background: var(--xk-red); color: #fff;
    border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .15s ease; line-height: 1;
}
.xk-wcode-copy:hover { background: var(--xk-red-2); border-color: var(--xk-red-2); }
.xk-wcode-copy.is-done { background: var(--xk-green); border-color: var(--xk-green); }
.xk-wcode-info p { margin: 0; }
.xk-wcode-info .gift { font-size: 13.5px; line-height: 1.8; color: #4b5563; }
.xk-wcode-info .expire { font-size: 12px; color: var(--xk-text-3); margin-top: 4px !important; }
.xk-wcode-note {
    margin: 0; font-size: 12.5px; color: #a08456; line-height: 1.7;
    background: #fff9ee; border: 1px solid #ffeacb; border-radius: 8px; padding: 9px 12px;
}
.xk-wcode-note i { margin-right: 6px; }

/* ================= 下载通道：链接 + 二维码 ================= */
.xk-dl-wrap { display: flex; align-items: center; gap: 14px; }
.xk-dl-qr {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none;
}
.xk-dl-qr img {
    width: 84px; height: 84px; border-radius: 12px;
    border: 1px solid var(--xk-line); background: #fff; padding: 4px;
    display: block; transition: transform .15s ease, box-shadow .15s ease;
}
.xk-dl-qr:hover img { transform: scale(1.05); box-shadow: 0 6px 16px rgba(24, 30, 48, .16); }
.xk-dl-qr em {
    font-style: normal; font-size: 12px; color: var(--xk-text-3); line-height: 1;
}
.xk-dl-qr:hover em { color: var(--xk-red); }

/* 移动端：二维码与按钮竖排，避免挤压 */
@media (max-width: 782px) {
    .xk-wcode-item { grid-template-columns: 1fr; gap: 10px; }
    .xk-dl-wrap { flex-wrap: wrap; }
    .xk-dl-qr img { width: 72px; height: 72px; }
}
/* 游戏内名标签：渠道马甲名与游戏内真实名不一致时，在副标题处标注 */
.xk-alias {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
    color: #8a6116;
    background: #fff8e8;
    border: 1px solid #ffe1a6;
    padding: 0 8px;
    border-radius: 5px;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .xk-alias { font-size: 11px; padding: 0 6px; }
}
