/* ===== 神手游戏资讯站 全局样式 ===== */
:root {
    --primary: #ff6b6b;
    --primary-dark: #e85a5a;
    --text: #222;
    --text-secondary: #666;
    --bg: #f5f6f8;
    --white: #fff;
    --border: #eee;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
    --radius: 8px;
    --nav-dark: #1f2021;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.container { max-width: 1260px; margin: 0 auto; padding: 0 15px; }

/* ===== 顶部条 ===== */
.top-bar {
    background: var(--nav-dark);
    color: #aaa;
    font-size: 12px;
    padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #aaa; margin-right: 15px; transition: color .2s; }
.top-bar a:hover { color: var(--white); }
.top-bar .user-links a { margin-right: 0; margin-left: 15px; }

/* ===== 主导航 ===== */
.main-header {
    background: #1f2021;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}
.main-header .container {
    display: flex; align-items: center; height: 64px;
    position: relative; z-index: 2;
}
.main-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 18' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,0 C360,18 720,4 1080,14 C1260,18 1380,10 1440,0 L1440,18 L0,18 Z'/%3E%3C/svg%3E") repeat-x;
    background-size: 50% 100%;
    animation: waveMove 40s linear infinite;
    pointer-events: none;
    z-index: 1;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 26px; font-weight: 800; color: #fff;
    margin-right: 35px;
}
.logo .brand-cn { color: var(--primary); }
.logo .brand-en { font-weight: 700; letter-spacing: 1px; }
.logo img.logo-img { display: block; max-height: 42px; width: auto; }
@media (max-width: 1024px) {
    .logo img.logo-img { max-height: 34px; }
}

.main-nav {
    display: flex; gap: 6px; flex: 1; min-width: 0;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
    padding: 10px 16px; border-radius: 4px;
    font-size: 15px; font-weight: 500; color: rgba(255,255,255,.85);
    white-space: nowrap; transition: all .2s;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.1); color: var(--primary); }
.main-nav a.highlight { background: var(--primary); color: var(--white); }
.main-nav a.highlight:hover { background: var(--primary-dark); }

.search-box { position: relative; }
.search-box input {
    width: 220px; padding: 8px 36px 8px 14px;
    border: 1px solid rgba(255,255,255,.2); border-radius: 20px;
    background: rgba(255,255,255,.1); font-size: 13px; color: #fff; outline: none;
}
.search-box input::placeholder { color: rgba(255,255,255,.5); }
.search-box button {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: rgba(255,255,255,.6);
}

/* 移动端汉堡菜单按钮（桌面默认隐藏） */
.nav-toggle {
    display: none;
    flex: 0 0 auto;
    width: 38px; height: 34px;
    margin-left: 10px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 6px;
    background: rgba(255,255,255,.08);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}
.nav-toggle .nt-bar {
    display: block; width: 18px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.main-header.nav-open .nav-toggle .nt-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.main-header.nav-open .nav-toggle .nt-bar:nth-child(2) { opacity: 0; }
.main-header.nav-open .nav-toggle .nt-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== 顶部搜索联想下拉 ===== */
.search-suggest {
    position: fixed; z-index: 9999; display: none;
    background: var(--white); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.16);
    overflow: hidden; padding: 6px 0;
    text-align: left;
}
.search-suggest.show { display: block; }
.search-suggest .ss-group { padding: 2px 0 6px; border-bottom: 1px solid var(--border); }
.search-suggest .ss-group:last-of-type { border-bottom: none; }
.search-suggest .ss-label {
    font-size: 12px; color: #999; padding: 8px 12px 4px;
    display: flex; align-items: center; gap: 5px;
}
.search-suggest .ss-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 12px; font-size: 14px; color: var(--text);
    cursor: pointer; text-decoration: none; min-height: 34px;
}
.search-suggest .ss-item:hover,
.search-suggest .ss-item.active { background: #f4f5f7; color: var(--primary); }
.search-suggest .ss-item img {
    width: 28px; height: 28px; border-radius: 5px; object-fit: cover; flex-shrink: 0;
}
.search-suggest .ss-dot {
    width: 28px; height: 28px; border-radius: 5px; flex-shrink: 0;
    background: #f0f1f3; color: var(--text-secondary);
    font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.search-suggest .ss-item.ss-article:hover .ss-dot { color: var(--primary); }
.search-suggest .ss-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest .ss-tag {
    flex-shrink: 0; font-size: 11px; color: #999;
    background: #f2f3f5; border-radius: 3px; padding: 1px 6px;
}
.search-suggest .ss-item:hover .ss-tag { color: var(--primary); }
.search-suggest .ss-history { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 8px; }
.search-suggest .ss-his-item {
    font-size: 12px; color: var(--text-secondary);
    background: #f2f3f5; border-radius: 12px; padding: 3px 10px;
    cursor: pointer;
}
.search-suggest .ss-his-item:hover { color: var(--primary); }
.search-suggest .ss-view-all {
    display: block; text-align: center;
    font-size: 13px; color: var(--primary); padding: 8px 0 6px;
    border-top: 1px solid var(--border); cursor: pointer;
}
.search-suggest .ss-view-all:hover { background: #fafafa; }

@keyframes waveMove {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ===== 二级标签导航 ===== */
.tag-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.tag-nav .container { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-nav a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 4px;
    font-size: 13px; font-weight: 500;
    background: #f7f8fa; color: #555;
    transition: all .2s;
}
.tag-nav a:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.tag-nav .tag-mm { background: #ff6b6b; color: #fff; }
.tag-nav .tag-blue { background: #4dabf7; color: #fff; }
.tag-nav .tag-green { background: #51cf66; color: #fff; }
.tag-nav .tag-purple { background: #9775fa; color: #fff; }
.tag-nav .tag-orange { background: #ffa94d; color: #fff; }

/* 移动端隐藏二级游戏标签导航，PC 端保持显示 */
@media (max-width: 1024px) {
    .tag-nav { display: none; }
}

/* ===== 搜索热区 ===== */
.search-hero {
    background: var(--white);
    padding: 25px 0 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.search-hero .hot-words { margin-top: 12px; font-size: 13px; color: #888; }
.search-hero .hot-words span { margin-right: 6px; }
.search-hero .hot-words a { color: var(--text-secondary); margin: 0 8px; }
.search-hero .hot-words a:hover { color: var(--primary); }

/* ===== 首页焦点区 ===== */
.hero-section { padding: 20px 0; }
.hero-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 15px;
}
.banner-slider {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: #ddd; height: 360px;
    cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.banner-track {
    display: flex; height: 100%;
    transition: transform .6s ease; will-change: transform;
}
.banner-slider.dragging { cursor: grabbing; }
.banner-slider.dragging .banner-track { transition: none; }
.banner-slider .slide { position: relative; flex: 0 0 100%; height: 100%; }
.banner-slider .slide-link {
    position: relative; display: block; height: 100%;
    color: var(--white); text-decoration: none;
}
.banner-slider .slide img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.banner-slider .slide-title { pointer-events: none; }
.banner-slider .slide-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 30px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    color: var(--white); font-size: 20px; font-weight: 700;
}
.banner-dots {
    position: absolute; bottom: 15px; right: 15px;
    display: flex; gap: 8px;
}
.banner-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.5); cursor: pointer;
}
.banner-dots span.active { background: var(--white); }

.hero-side {
    display: flex; flex-direction: column; gap: 15px;
}
.side-card {
    display: block;
    background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    flex: 1; position: relative;
    color: inherit; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.14);
}
.side-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.side-card:hover img { transform: scale(1.04); }
.side-card .side-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: var(--white); font-weight: 700;
}
.side-card .side-title small { font-weight: 400; opacity: .85; }
.side-card.side-empty {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #eef1f5);
    color: #9aa3ad; font-size: 13px; text-align: center;
    padding: 20px; line-height: 1.8;
}

/* ===== 热门游戏入口 ===== */
.hot-games-bar {
    background: var(--white); border-radius: var(--radius);
    padding: 15px 20px; margin-top: 15px;
    display: flex; gap: 25px; flex-wrap: wrap;
    box-shadow: var(--shadow);
}
.game-chip {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 200px;
}
.game-chip img {
    width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
}
.game-chip .info { flex: 1; min-width: 0; }
.game-chip .name { font-weight: 700; font-size: 13px; white-space: nowrap; }
.game-chip .platform { font-size: 12px; color: #888; }
.game-chip .enter-btn {
    padding: 5px 14px; border: 1px solid var(--primary);
    color: var(--primary); border-radius: 20px;
    font-size: 12px; transition: all .2s;
}
.game-chip .enter-btn:hover { background: var(--primary); color: var(--white); }

/* ===== 内容卡片 ===== */
.section { margin-top: 25px; }
.section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 15px; font-size: 18px; font-weight: 700;
}
.section-header .icon { color: var(--primary); font-size: 20px; }
.section-header .more { margin-left: auto; font-size: 13px; color: #888; font-weight: 400; }
.section-header .more:hover { color: var(--primary); }

.main-layout {
    display: grid; grid-template-columns: 1fr 360px; gap: 20px;
}

/* 游戏专区信息卡（PC 端：左图右文） */
.game-info-card { display: flex; gap: 20px; margin-bottom: 20px; align-items: flex-start; }
.game-info-cover { width: 200px; height: 120px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
/* 游戏攻略分类网格 */
.subcat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
/* 搜索页游戏结果网格 */
.search-game-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }

/* ===== 文章列表 ===== */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.article-list { display: flex; flex-direction: column; gap: 18px; }
.article-item {
    display: flex; gap: 15px; padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    color: inherit; text-decoration: none;
}
.article-item:last-child { border-bottom: none; padding-bottom: 0; }
.article-item .thumb {
    width: 180px; height: 110px; border-radius: 6px;
    object-fit: cover; flex-shrink: 0;
}
.article-item .body { flex: 1; display: flex; flex-direction: column; }
.article-item .title {
    font-size: 16px; font-weight: 700; color: var(--text);
    line-height: 1.4; margin-bottom: 8px;
}
.article-item:hover .title { color: var(--primary); }
.article-item .summary {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.6; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-item .meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: #999; margin-top: 8px;
}
.article-item .meta .author { color: var(--primary); }
.article-item .meta .cat { background: #f2f3f5; padding: 2px 8px; border-radius: 4px; }
.article-item .badges { display: flex; gap: 8px; margin-bottom: 8px; }
.article-item .badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600; color: var(--white);
}
.article-item .badge-top { background: #ff4d4f; }
.article-item .badge-hot { background: #ff922b; }

/* ===== 缩略图扫光（悬浮光带滑过） ===== */
.article-item .thumb-wrap {
    position: relative; display: block; overflow: hidden; flex-shrink: 0;
    width: 180px; height: 110px; border-radius: 6px;
}
.article-item .thumb-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.article-item .thumb-wrap .thumb {
    width: 100%; height: 100%; display: block;
    object-fit: cover; transition: transform .45s ease;
}
.article-item:hover .thumb-wrap .thumb { transform: scale(1.06); }
.article-item .thumb-wrap::after {
    content: ''; position: absolute; left: 0; top: -10%; width: 36%; height: 120%;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .38) 45%,
        rgba(255, 255, 255, .65) 50%,
        rgba(255, 255, 255, .38) 55%,
        rgba(255, 255, 255, 0) 100%);
    transform: translateX(-130%) skewX(-18deg);
    pointer-events: none;
}
.article-item:hover .thumb-wrap::after {
    animation: thumb-sweep .55s ease-out .06s forwards;
}
@keyframes thumb-sweep {
    0% { transform: translateX(-130%) skewX(-18deg); }
    100% { transform: translateX(330%) skewX(-18deg); }
}
@media (prefers-reduced-motion: reduce) {
    .article-item:hover .thumb-wrap::after { animation: none; }
    .article-item:hover .thumb-wrap .thumb { transform: none; }
}

/* ===== 首页资讯“查看更多” ===== */
.news-more-bar { text-align: center; margin-top: 16px; }
.load-more-btn {
    display: inline-block; cursor: pointer;
    border: 1px solid var(--primary); background: #fff; color: var(--primary);
    font-size: 14px; line-height: 1; padding: 11px 36px; border-radius: 22px;
    transition: background .2s, color .2s;
}
.load-more-btn:hover { background: var(--primary); color: #fff; }
.load-more-btn:disabled { cursor: default; opacity: .55; }
.load-more-btn:disabled:hover { background: #fff; color: var(--primary); }
.load-more-btn.loading { opacity: .7; cursor: wait; }

/* ===== 侧边栏模块 ===== */
.sidebar .widget { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.sidebar .widget-title {
    font-size: 16px; font-weight: 700; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar .widget-title .icon { color: var(--primary); }

.side-list { display: flex; flex-direction: column; gap: 12px; }
.side-list .side-item { display: flex; gap: 10px; }
.side-list .side-item img {
    width: 90px; height: 56px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
}
.side-list .side-item .info { flex: 1; }
.side-list .side-item .title {
    font-size: 13px; font-weight: 600; color: var(--text);
    line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.side-list .side-item .title:hover { color: var(--primary); }
.side-list .side-item .meta { font-size: 12px; color: #999; margin-top: 4px; }

.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-list .rank-item { display: flex; align-items: center; gap: 10px; }
.rank-list .rank {
    width: 22px; height: 22px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--white); flex-shrink: 0;
}
.rank-list .rank.top { background: var(--primary); }
.rank-list .rank.normal { background: #999; }
.rank-list .rank-item .info { flex: 1; }
.rank-list .rank-item .title { font-size: 13px; font-weight: 600; }
.rank-list .rank-item .title:hover { color: var(--primary); }
.rank-list .rank-item .meta { font-size: 12px; color: #999; }
.rank-list .rank-item .btn {
    padding: 3px 10px; background: var(--primary); color: var(--white);
    border-radius: 4px; font-size: 12px;
}
.rank-list .rank-item .btn:hover { background: var(--primary-dark); }
.rank-list .rank-item .btn.disabled { background: #b8bcc2; cursor: not-allowed; }
.rank-list .rank-item .btn.disabled:hover { background: #b8bcc2; }

/* 测试表 */
.test-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.test-table th, .test-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); }
.test-table th { color: #888; font-weight: 500; }
.test-table .status { color: var(--primary); font-weight: 600; }

/* ===== 页脚 ===== */
.main-footer {
    background: var(--nav-dark); color: #aaa;
    padding: 45px 0 25px; margin-top: 40px;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
}
.footer-col h4 { color: var(--white); margin: 0 0 15px; font-size: 15px; }
.footer-col p { font-size: 13px; line-height: 1.8; margin: 0; }
.footer-col a { color: #aaa; font-size: 13px; display: block; margin-bottom: 8px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid #333; margin-top: 30px; padding-top: 20px;
    text-align: center; font-size: 12px; color: #666;
}

/* ===== 通用页面内容 ===== */
.page-title {
    font-size: 22px; font-weight: 700; margin: 25px 0 15px;
    display: flex; align-items: center; gap: 10px;
}
.page-content { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 25px; min-height: 400px; }
.article-detail .cover { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.article-detail h1 { font-size: 26px; margin: 0 0 15px; }
.article-detail .meta { color: #888; font-size: 13px; margin-bottom: 20px; }
.article-detail .body { font-size: 15px; line-height: 1.8; color: #333; }
.article-detail .body p { margin-bottom: 15px; }
.article-detail .body img { border-radius: 6px; margin: 10px 0; }

/* 分页 */
.cs-pagination { margin-top: 25px; text-align: center; }
.cs-pagination ul { display: inline-flex; gap: 6px; }
.cs-pagination a {
    display: block; padding: 6px 12px; background: var(--white);
    border: 1px solid var(--border); border-radius: 4px;
    font-size: 13px; color: #555;
}
.cs-pagination li.active a { background: var(--primary); color: var(--white); border-color: var(--primary); }
.cs-pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 表单 ===== */
.cs-form { max-width: 420px; }
.cs-form .form-group { margin-bottom: 18px; }
.cs-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.cs-form input, .cs-form textarea, .cs-form select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; outline: none;
}
.cs-form input:focus, .cs-form textarea:focus { border-color: var(--primary); }
.cs-btn {
    display: inline-block; padding: 10px 24px;
    background: var(--primary); color: var(--white);
    border: none; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.cs-btn:hover { background: var(--primary-dark); }
.cs-btn.secondary { background: #333; }
.cs-btn.disabled { background: #b8bcc2; cursor: not-allowed; }
.cs-btn.disabled:hover { background: #b8bcc2; }

/* ===== 后台 ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: #1a1a1a; color: #aaa; flex-shrink: 0;
}
.admin-sidebar .brand { padding: 20px; color: var(--white); font-weight: 700; font-size: 18px; border-bottom: 1px solid #333; }
.admin-sidebar a { display: block; padding: 14px 20px; color: #aaa; font-size: 14px; border-bottom: 1px solid #262626; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #262626; color: var(--white); }
.admin-main { flex: 1; background: var(--bg); }
.admin-header {
    background: var(--white); padding: 15px 25px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: var(--shadow);
}
.admin-body { padding: 25px; }
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: #fafafa; font-weight: 600; }
.admin-table tr:hover { background: #fafafa; }
.admin-table .small-btn { padding: 4px 10px; font-size: 12px; border-radius: 4px; background: var(--primary); color: var(--white); }
.admin-table .small-btn.danger { background: #ff4d4f; }
.admin-table .small-btn.secondary { background: #e5e7eb; color: #6b7280; }
.admin-table .small-btn.secondary:hover { background: #d4d6d9; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 25px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card h3 { margin: 0; font-size: 28px; color: var(--primary); }
.stat-card p { margin: 5px 0 0; color: #888; font-size: 13px; }

/* ===== 图文排版编辑器（后台） ===== */
.rich-box { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.rich-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px;
    padding: 6px 8px; background: #f7f8fa; border-bottom: 1px solid #ececec;
}
.rich-toolbar button {
    border: 1px solid transparent; background: transparent; color: #444;
    font-size: 13px; line-height: 1; height: 26px; padding: 0 7px; border-radius: 4px; cursor: pointer;
}
.rich-toolbar button:hover { background: #e9ebee; }
.rich-toolbar button.on { background: #ffe1e1; color: var(--primary); border-color: #ffb8b8; }
.rich-toolbar button.rich-accent { color: var(--primary); font-weight: 600; }
.rich-toolbar .rich-fw { font-weight: 800; }
.rich-toolbar .rich-it { font-style: italic; font-family: serif; }
.rich-toolbar .rich-un { text-decoration: underline; }
.rich-toolbar .rich-sep { width: 1px; height: 16px; background: #ddd; margin: 0 5px; }
.rich-canvas {
    min-height: 420px; max-height: 620px; overflow-y: auto;
    padding: 18px 24px; outline: none; background: #fff;
}
.rich-canvas:empty::before { content: attr(data-placeholder); color: #b8bcc2; pointer-events: none; }
.rich-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.rich-pop { background: #fff; border-radius: 10px; width: 460px; max-width: 92vw; box-shadow: 0 12px 40px rgba(0,0,0,.2); overflow: hidden; }
.rich-pop-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 18px; font-weight: 600; border-bottom: 1px solid #f0f0f0;
}
.rich-pop-close { border: none; background: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1; padding: 0 4px; }
.rich-pop-body { padding: 16px 18px; }
.rich-pop-body .rich-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rich-pop-body .rich-lbl { flex-shrink: 0; width: 66px; color: #666; font-size: 13px; }
.rich-pop-body .rich-row input { flex: 1; }
.rich-pop-body .rich-row input[type="text"], .rich-pop-body textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 14px; outline: none; box-sizing: border-box;
}
.rich-pop-body .rich-row input[type="text"]:focus, .rich-pop-body textarea:focus { border-color: var(--primary); }
.rich-pop-body .rich-row textarea { resize: vertical; }
.rich-status { font-size: 13px; }
.rich-pop-body .rich-or { text-align: center; color: #bbb; font-size: 13px; margin: 2px 0 12px; }
.rich-pop-body .rich-tip { background: #f7f8fa; border-radius: 6px; padding: 10px 12px; color: #888; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.rich-right { justify-content: flex-end; margin-top: 4px; }

/* ===== 公众号式正文排版（前台详情 + 编辑器画布共用） ===== */
:is(.article-detail .body, .rich-canvas) { font-size: 15px; line-height: 1.9; color: #333; word-break: break-word; }
:is(.article-detail .body, .rich-canvas) p { margin: 0 0 16px; }
:is(.article-detail .body, .rich-canvas) div { margin-bottom: 8px; }
:is(.article-detail .body, .rich-canvas) h1,
:is(.article-detail .body, .rich-canvas) h2,
:is(.article-detail .body, .rich-canvas) h3 {
    margin: 26px 0 12px; font-weight: 700; line-height: 1.4; color: #222;
}
:is(.article-detail .body, .rich-canvas) h1 { font-size: 22px; }
:is(.article-detail .body, .rich-canvas) h2 { font-size: 20px; }
:is(.article-detail .body, .rich-canvas) h3 { font-size: 17px; }
:is(.article-detail .body, .rich-canvas) h4 { font-size: 16px; }
:is(.article-detail .body, .rich-canvas) img {
    max-width: 100%; height: auto; display: block; border-radius: 6px;
}
:is(.article-detail .body, .rich-canvas) figure { margin: 16px auto; text-align: center; }
:is(.article-detail .body, .rich-canvas) figure img { margin: 0 auto; }
:is(.article-detail .body, .rich-canvas) figcaption {
    color: #999; font-size: 13px; margin-top: 6px; text-align: center;
}
:is(.article-detail .body, .rich-canvas) video,
:is(.article-detail .body, .rich-canvas) iframe {
    display: block; max-width: 100%; margin: 14px auto; border: 0; border-radius: 8px;
}
:is(.article-detail .body, .rich-canvas) blockquote {
    border-left: 4px solid var(--primary); background: #fff6f6; color: #666;
    padding: 10px 16px; margin: 0 0 16px; border-radius: 0 6px 6px 0;
}
:is(.article-detail .body, .rich-canvas) ul,
:is(.article-detail .body, .rich-canvas) ol { padding-left: 26px; margin: 0 0 16px; }
:is(.article-detail .body, .rich-canvas) li { margin: 5px 0; }
:is(.article-detail .body, .rich-canvas) hr {
    border: none; border-top: 1px solid #ececec; margin: 24px 0;
}
:is(.article-detail .body, .rich-canvas) a { color: var(--primary); }
:is(.article-detail .body, .rich-canvas) code {
    background: #f4f4f5; color: #d6336c; padding: 2px 6px; border-radius: 4px; font-size: 13px;
}
:is(.article-detail .body, .rich-canvas) pre {
    background: #282c34; color: #e6e6e6; padding: 14px 16px; border-radius: 8px;
    overflow-x: auto; font-size: 13px; line-height: 1.7; margin: 0 0 16px;
}
:is(.article-detail .body, .rich-canvas) pre code { background: none; color: inherit; padding: 0; }
:is(.article-detail .body, .rich-canvas) table {
    width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px;
}
:is(.article-detail .body, .rich-canvas) th, :is(.article-detail .body, .rich-canvas) td {
    border: 1px solid #e6e6e6; padding: 8px 10px; text-align: left;
}
:is(.article-detail .body, .rich-canvas) th { background: #fafafa; font-weight: 600; }

/* ===== 游戏社区网格 ===== */
.game-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px;
}

/* ===== 搜索结果游戏卡片 ===== */
.search-game-card {
    display: flex; gap: 12px; align-items: center;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--white); padding: 10px;
    transition: box-shadow .2s, border-color .2s;
}
.search-game-card:hover {
    border-color: var(--primary); box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.search-game-card > img {
    width: 62px; height: 62px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.search-game-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.search-game-card .name { font-size: 15px; font-weight: 700; color: var(--text); }
.search-game-card .desc {
    font-size: 12px; color: #999;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-game-card .enter-btn {
    font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 2px;
}

/* ===== 响应式 ===== */
/* 中屏/较窄桌面：导航横向可滚动，避免项目被裁切 */
@media (max-width: 1180px) {
    .main-nav { overflow-x: auto; scrollbar-width: none; }
    .main-nav::-webkit-scrollbar { display: none; }
    .main-nav a { white-space: nowrap; padding: 10px 11px; font-size: 14px; }
    .logo { margin-right: 20px; font-size: 23px; }
    .search-box input { width: 180px; }
}

@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 1fr; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { display: none; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }

    /* 头部：LOGO+搜索+汉堡按钮一行，全部栏目收进下拉面板，点击 ☰ 展开 */
    .main-header::after { display: none; }
    .main-header { overflow: visible; }
    .main-header .container { flex-wrap: nowrap; height: auto; padding: 9px 15px; }
    .logo { margin-right: auto; }
    .nav-toggle { display: inline-flex; }
    .main-nav {
        order: 99;
        display: none;
        position: absolute; left: 0; right: 0; top: 100%;
        margin: 0; padding: 10px 15px 14px;
        background: var(--nav-dark);
        box-shadow: 0 12px 28px rgba(0,0,0,.35);
        flex-wrap: wrap; gap: 4px 6px;
        z-index: 300;
    }
    .main-header.nav-open .main-nav { display: flex; }
    .main-nav a { padding: 9px 14px; font-size: 15px; }
}

@media (max-width: 768px) {
    /* web/移动端隐藏侧边栏中的次要板块（新游视频/每周要闻/游戏评测/关注我们），PC 正常显示 */
    .sidebar .widget.sidebar-hide-mobile { display: none; }

    /* 顶部条：手机只保留核心登录/注册，隐藏次要链接与长文案 */
    .top-bar .quick-links,
    .top-bar .top-plain,
    .top-bar .top-mid,
    .top-bar .top-adm { display: none; }
    .top-bar .container { justify-content: center; }

    body { font-size: 14px; }
    .main-header .container { padding: 7px 12px; }
    .logo { font-size: 19px; gap: 6px; }
    .search-box { margin-left: 10px; }
    .search-box input { width: 110px; font-size: 12px; padding: 6px 28px 6px 11px; }
    .main-nav a { padding: 8px 13px; font-size: 14px; }
    .nav-toggle { margin-left: 6px; }

    .hero-section { padding: 12px 0; }
    .banner-slider { height: 210px; }
    .banner-slider .slide-title { font-size: 15px; padding: 16px 12px 10px; }
    .banner-dots { bottom: 10px; right: 10px; gap: 6px; }
    .banner-dots span { width: 7px; height: 7px; }

    /* 热门游戏入口：两列网格，按钮独立占一行，点击更顺手 */
    .hot-games-bar {
        display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
        padding: 12px; margin-top: 12px;
    }
    .game-chip { min-width: 0; flex-wrap: wrap; row-gap: 6px; align-content: flex-start; }
    .game-chip img { width: 44px; height: 44px; }
    .game-chip .info { min-width: 0; }
    .game-chip .name { overflow: hidden; text-overflow: ellipsis; }
    .game-chip .enter-btn { width: 100%; text-align: center; box-sizing: border-box; padding: 6px 4px; }

    .card { padding: 14px; }
    .page-title { font-size: 19px; margin: 16px 0 12px; }
    .page-title small { display: block; margin-top: 3px; }
    .page-content { padding: 14px; }
    .game-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

    /* 资讯 / 招募等列表：手机改为“左小图右文”紧凑卡片 */
    .article-item { gap: 12px; padding-bottom: 14px; }
    .article-item .thumb-wrap,
    .article-item .thumb { width: 112px; height: 74px; }
    .article-item .title {
        font-size: 15px; margin-bottom: 5px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .article-item .summary { font-size: 12px; -webkit-line-clamp: 2; }
    .article-item .meta { flex-wrap: wrap; gap: 8px; font-size: 11px; margin-top: 6px; }

    /* 详情页 */
    .article-detail .cover { max-height: 230px; }
    .article-detail h1 { font-size: 21px; }

    /* 游戏专区信息卡：手机端改为上图下文 */
    .game-info-card { flex-direction: column; gap: 12px; }
    .game-info-cover { width: 100%; height: 180px; }

    .sidebar .widget { padding: 14px; margin-bottom: 14px; }

    /* 表单输入放大，避免 iOS 聚焦时自动缩放 */
    .cs-form input, .cs-form textarea, .cs-form select { font-size: 16px; }

    .main-footer { padding: 18px 0 14px; margin-top: 25px; }
    /* web/移动端隐藏页脚前三列（站点介绍/推荐游戏/联系方式）与攻略分享平台，保留友情链接，PC 不动 */
    .main-footer .footer-col:nth-child(-n+3),
    .main-footer .footer-col .footer-platform { display: none; }
    .main-footer .footer-col-friend .footer-friend-title { margin-top: 0; }
    .main-footer .footer-bottom { border-top: none; margin-top: 0; padding-top: 0; }

    /* 后台：窄屏下侧栏置顶、内容卡片横向留白收紧 */
    .admin-header { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
    .admin-body { padding: 12px; }
    .admin-card { padding: 14px; }
    .admin-body .admin-card { overflow-x: auto; }
    .admin-body .admin-table { min-width: 560px; }
    .admin-table th, .admin-table td { padding: 10px 8px; }
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-sidebar .brand { font-size: 16px; padding: 16px 20px; }
    .admin-sidebar a { padding: 12px 20px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
    .banner-slider { height: 190px; }
    .stat-grid { grid-template-columns: 1fr; }
    .container { padding: 0 12px; }
    /* 攻略分类 / 搜索结果网格：手机改为 2 列紧凑布局 */
    .subcat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .search-game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .subcat-card { padding: 12px 8px; }
    .subcat-card img { width: 48px; height: 48px; margin-bottom: 6px; }
    .subcat-card .name { font-size: 13px; }
    .subcat-card .count { font-size: 11px; padding: 1px 8px; }
}

/* ===== 右下角 QQ 在线咨询悬浮气泡（全站） ===== */
.qq-float {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #22c1ff, #0f97f0);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 22px rgba(18, 166, 245, .42);
    overflow: hidden;
    transition: box-shadow .2s ease;
}
.qq-float:hover,
.qq-float:focus-visible {
    color: #fff;
    outline: none;
    box-shadow: 0 10px 28px rgba(18, 166, 245, .6);
}
.qq-float .qq-bubble {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -1px;
    user-select: none;
}
.qq-float .qq-tip {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    transition: max-width .25s ease, opacity .18s ease;
}
.qq-float:hover .qq-tip,
.qq-float:focus-visible .qq-tip {
    max-width: 130px;
    opacity: 1;
    padding: 0 16px 0 4px;
}

@media (max-width: 480px) {
    .qq-float { right: 12px; bottom: 84px; }
    .qq-float .qq-bubble { width: 46px; height: 46px; font-size: 15px; }
}

/* ===== 右下角“关注我们”悬浮气泡与资料卡（全站） ===== */
.qq-card {
    display: none;
    position: fixed; right: 20px; bottom: 170px; z-index: 1000;
    width: 250px; padding: 16px 16px 10px;
    background: #fff; border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0,0,0,.18);
}
.qq-card.open { display: block; animation: qqPop .18s ease; }
@keyframes qqPop {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to   { opacity: 1; transform: none; }
}
.qq-card .qq-card-close {
    position: absolute; top: 6px; right: 10px;
    border: none; background: none; font-size: 18px;
    color: #bbb; cursor: pointer; line-height: 1;
}
.qq-card .qq-card-title {
    text-align: center; font-size: 16px; font-weight: 700; color: #333;
}
.qq-card .qq-card-qr { text-align: center; margin-top: 10px; }
.qq-card .qq-card-qr img {
    width: 96px; height: 96px; object-fit: cover;
    border-radius: 8px; border: 1px solid #eee; background: #fff;
}
.qq-card .qq-card-list { list-style: none; margin: 10px 0 0; padding: 0; }
.qq-card .qq-card-list li {
    padding: 8px 0; border-top: 1px solid #f2f3f5;
}
.qq-card .qq-card-list li:first-child { border-top: none; }
.qq-card .qq-card-list .k {
    display: block; font-size: 11px; color: #a0a4ab; margin-bottom: 2px;
}
.qq-card .qq-card-list .row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.qq-card .qq-card-list .v {
    font-size: 15px; font-weight: 700; color: #222;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qq-card .qq-card-list .copy-btn {
    flex: 0 0 auto; background: #ff4d4f; color: #fff;
    border: none; border-radius: 6px; padding: 5px 12px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .2s;
}
.qq-card .qq-card-list .copy-btn:hover { background: #e63c3e; }
.qq-card .qq-card-list .copy-btn:active { opacity: .85; }
@media (max-width: 1024px) {
    .qq-card { right: 12px; bottom: 150px; }
    /* 触屏无 hover，隐藏 PC 侧的文字展开条，避免误触发 */
    .qq-float .qq-tip { display: none; }
}
@media (max-width: 480px) {
    .qq-card { width: 220px; right: 10px; bottom: 140px; }
}

/* ===== 首页文章卡片列表（大图横向列表改为小卡片并排） ===== */
.cat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.cat-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--white); overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.cc-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #f1f2f4; }
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-title {
    font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.cc-summary {
    font-size: 13px; line-height: 1.5; color: #666;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; flex: 1;
}
.cc-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    font-size: 12px; color: #aaa; margin-top: auto;
}
.cc-meta .author { color: var(--primary); }

/* ===== 后台表单·开关样式 ===== */
.cs-form .form-group-switches .switches {
    display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
    padding: 4px 0;
}
.cs-form label.switch {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 0; cursor: pointer; user-select: none;
    font-weight: 400; color: #333;
}
.cs-form label.switch input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 44px; min-width: 44px; height: 24px;
    padding: 0; margin: 0; border: none; border-radius: 12px;
    background: #d0d5dd; position: relative; outline: none;
    cursor: pointer; transition: background .2s;
}
.cs-form label.switch input[type="checkbox"]::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: transform .2s;
}
.cs-form label.switch input[type="checkbox"]:checked {
    background: var(--primary);
}
.cs-form label.switch input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}
@media (max-width: 480px) {
    .cs-form .form-group-switches .switches { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ===== 后台·访问统计页 ===== */
.analytics-head {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.analytics-stat {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.analytics-stat .as-num { font-size: 26px; font-weight: 700; color: var(--primary); }
.analytics-stat .as-cap { font-size: 13px; color: #888; }
.analytics-tip { margin: 0 0 12px; font-size: 12px; color: #aaa; }
.analytics-empty { padding: 22px 0; text-align: center; color: #aaa; font-size: 13px; }
.analytics-chart { overflow-x: auto; }
.analytics-chart svg { width: 100%; min-width: 620px; height: auto; display: block; }
.analytics-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}
.analytics-sub {
    font-size: 11px; color: #b0b4bb; font-weight: 400;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px;
}
.analytics-cols .admin-table a { text-decoration: none; }
.analytics-cols .admin-table a:hover { color: var(--primary); }
.bar-row {
    display: flex; align-items: center; gap: 10px;
    margin: 9px 0; min-height: 18px;
}
.bar-label {
    flex: 0 0 150px; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 13px; color: #333;
}
.bar-track {
    flex: 1 1 auto; background: #f2f3f5;
    height: 14px; border-radius: 7px; overflow: hidden; min-width: 60px;
}
.bar-fill { height: 100%; background: var(--primary); border-radius: 7px; }
.bar-val {
    flex: 0 0 auto; min-width: 70px; text-align: right;
    font-size: 12px; color: #555; line-height: 1.5;
}
@media (max-width: 640px) {
    .analytics-cols { grid-template-columns: 1fr; }
    .bar-label { flex-basis: 108px; }
}
