/* 默认模板样式 - 手游推广平台 */
*{margin:0;padding:0;box-sizing:border-box}
:root{--primary:#6366f1;--primary-d:#4f46e5;--accent:#f59e0b;--bg:#f8fafc;--card:#fff;--text:#1e293b;--muted:#64748b;--border:#e2e8f0;--radius:12px;--shadow:0 2px 8px rgba(0,0,0,.06)}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:var(--bg);line-height:1.6}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.main-content{min-height:60vh;padding:24px 20px}

/* Header */
.site-header{background:linear-gradient(135deg,#4f46e5,#6366f1);color:#fff;box-shadow:0 2px 12px rgba(79,70,229,.2);position:sticky;top:0;z-index:100}
.header-inner{display:flex;align-items:center;gap:24px;height:64px}
.logo{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:700;color:#fff;white-space:nowrap}
.logo-icon{font-size:24px}
.main-nav{display:flex;gap:20px;flex:1}
.main-nav a{color:rgba(255,255,255,.9);font-size:15px;font-weight:500;padding:6px 4px;transition:color .2s}
.main-nav a:hover{color:#fff}
.search-box{display:flex;align-items:center;background:rgba(255,255,255,.15);border-radius:20px;padding:4px 4px 4px 14px}
.search-box input{background:transparent;border:none;outline:none;color:#fff;width:160px;font-size:14px}
.search-box input::placeholder{color:rgba(255,255,255,.7)}
.search-box button{background:#fff;color:#4f46e5;border:none;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:12px}

/* Hero */
.hero-banner{background:linear-gradient(135deg,#6366f1 0%,#8b5cf6 100%);color:#fff;padding:60px 0;text-align:center;border-radius:0 0 24px 24px;margin-bottom:24px}
.hero-title{font-size:36px;font-weight:800;margin-bottom:12px}
.hero-sub{font-size:16px;opacity:.9;margin-bottom:24px;max-width:640px;margin-left:auto;margin-right:auto}
.hero-actions{display:flex;gap:12px;justify-content:center}
.btn{display:inline-block;padding:10px 24px;border-radius:8px;font-weight:600;font-size:15px;cursor:pointer;border:none;transition:all .2s}
.btn-primary{background:#fff;color:var(--primary-d)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.15)}
.btn-ghost{background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.4)}
.btn-ghost:hover{background:rgba(255,255,255,.25)}
.btn-outline{background:transparent;color:var(--primary);border:1px solid var(--primary)}
.btn-outline:hover{background:var(--primary);color:#fff}

/* Block */
.block{background:var(--card);border-radius:var(--radius);padding:20px;margin-bottom:24px;box-shadow:var(--shadow)}
.block-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.block-title{font-size:20px;font-weight:700}
.more{color:var(--primary);font-size:14px;font-weight:500}

/* Game grid */
.game-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.game-grid.grid-2{grid-template-columns:repeat(2,1fr)}
.game-card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:14px;transition:all .2s;text-align:center;align-items:center}
.game-card:hover{box-shadow:0 6px 20px rgba(99,102,241,.15);transform:translateY(-3px);border-color:var(--primary)}
.game-card .game-top{display:flex;align-items:center;gap:14px;width:100%}
.game-icon{width:72px;height:72px;border-radius:16px;overflow:hidden;flex-shrink:0;background:#f1f5f9}
.game-icon img{width:100%;height:100%;object-fit:cover}
.game-card-mini{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:14px;text-align:center;transition:all .2s}
.game-card-mini:hover{box-shadow:0 6px 16px rgba(0,0,0,.1);transform:translateY(-2px)}
.game-icon-sm{width:64px;height:64px;border-radius:14px;overflow:hidden;margin:0 auto 8px;background:#f1f5f9}
.game-icon-sm img{width:100%;height:100%;object-fit:cover}
.game-name{font-size:15px;font-weight:600;margin:8px 0 6px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.game-meta{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;margin-bottom:6px;width:100%}
.game-meta .size{font-size:12px;color:var(--muted)}
.tag{background:#eef2ff;color:var(--primary-d);font-size:11px;padding:2px 8px;border-radius:10px;font-weight:500}
.tag-light{background:#f1f5f9;color:var(--muted);font-size:11px;padding:2px 8px;border-radius:10px}
.tag-light.rating{color:#f59e0b;background:#fef3c7}
.tag.web{background:#faf5ff;color:#7c3aed}
.tag.mobile{background:#eef2ff;color:#4f46e5}
.game-desc{font-size:12px;color:#92400e;background:#fef3c7;border:1px solid #fde68a;border-left:4px solid #f59e0b;padding:6px 10px;border-radius:6px;margin:8px auto 12px;max-width:100%;box-sizing:border-box;word-break:break-word;white-space:normal;line-height:1.5;text-align:center;align-self:center}
.dl-btn{background:var(--primary);color:#fff;font-size:13px;font-weight:600;padding:6px 16px;border-radius:20px;white-space:nowrap;margin-top:auto}
.game-card:hover .dl-btn{background:var(--primary-d)}

/* Article list */
.article-list{display:grid;gap:14px}
.article-item{display:flex;gap:16px;background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;transition:all .2s}
.article-item:hover{box-shadow:0 6px 16px rgba(0,0,0,.08);border-color:var(--primary)}
.art-thumb{width:160px;height:100px;object-fit:cover;border-radius:8px;flex-shrink:0;background:#f1f5f9}
.art-body{flex:1;min-width:0}
.art-title{font-size:17px;font-weight:600;margin-bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.art-summary{font-size:14px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-bottom:8px}
.art-meta{display:flex;gap:12px;font-size:12px;color:var(--muted);align-items:center}
.art-tags{background:#f1f5f9;padding:2px 8px;border-radius:10px}

/* Game detail */
.game-detail{background:var(--card);border-radius:var(--radius);padding:24px;margin-bottom:24px;box-shadow:var(--shadow)}
.gd-head{display:flex;gap:24px;margin-bottom:24px;flex-wrap:wrap}
.gd-icon{width:120px;height:120px;border-radius:24px;overflow:hidden;flex-shrink:0;box-shadow:0 8px 24px rgba(0,0,0,.12);background:#f1f5f9}
.gd-icon img{width:100%;height:100%;object-fit:cover}
.gd-info{flex:1;min-width:280px}
.gd-title{font-size:28px;font-weight:800;margin-bottom:12px}
.gd-tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.gd-desc{display:inline-block;font-size:14px;color:#92400e;background:#fef3c7;border:1px solid #fde68a;border-left:4px solid #f59e0b;padding:8px 14px;border-radius:8px;margin-bottom:18px;max-width:100%;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.gd-download{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.gd-download .btn-primary{background:linear-gradient(135deg,#5b6cff,#7c3aed);color:#fff;padding:12px 32px;font-size:15px;font-weight:700;border-radius:24px;box-shadow:0 6px 20px rgba(91,108,255,.4);transition:all .2s}
.gd-download .btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(91,108,255,.55)}
.gd-download .btn-outline{background:#fff;color:var(--primary-d);border:1.5px solid var(--primary);padding:12px 24px;font-size:14px;font-weight:600;border-radius:24px}
.screenshots{margin-bottom:24px}
.screenshots h2{font-size:18px;margin-bottom:12px}
.shots-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px}
.shots-row img{width:200px;height:120px;object-fit:cover;border-radius:8px;flex-shrink:0}
.gd-content{margin-bottom:24px}
.gd-content h2{font-size:18px;margin-bottom:12px}

/* Prose (content) */
.prose h2{font-size:20px;margin:24px 0 12px;font-weight:700}
.prose h3{font-size:17px;margin:20px 0 10px;font-weight:600}
.prose p{margin-bottom:14px;color:#334155;line-height:1.8}
.prose ul,.prose ol{margin:0 0 14px 22px;color:#334155;line-height:1.9}
.prose strong{color:#1e293b}
.prose img{border-radius:8px;margin:14px 0}

/* Article detail */
.article-detail{background:var(--card);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow)}
.breadcrumb{font-size:13px;color:var(--muted);margin-bottom:16px}
.breadcrumb a{color:var(--primary)}
.art-h1{font-size:28px;font-weight:800;margin-bottom:12px;line-height:1.4}
.art-info{display:flex;gap:16px;font-size:13px;color:var(--muted);padding-bottom:16px;border-bottom:1px solid var(--border);margin-bottom:20px;flex-wrap:wrap;align-items:center}
.art-content{font-size:16px}

/* Article detail - 双栏布局：左文章 + 右上角关联游戏 */
.article-with-aside{display:grid;grid-template-columns:1fr 320px;gap:24px;align-items:start}
.article-with-aside.no-aside{grid-template-columns:1fr}
.article-with-aside .article-detail{min-width:0}
.article-aside{position:sticky;top:84px}
.aside-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow);overflow:hidden}
.aside-head{font-size:15px;font-weight:700;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--border);color:var(--text)}
.aside-game{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px}
.aside-game .game-icon{width:80px;height:80px;border-radius:18px;overflow:hidden;background:#f1f5f9;margin-bottom:4px}
.aside-game .game-icon img{width:100%;height:100%;object-fit:cover}
.aside-game .game-name{font-size:16px;font-weight:600;margin:2px 0}
.aside-game .game-meta{justify-content:center;margin-bottom:6px}
.aside-game .game-desc{margin:6px 0 10px;max-width:100%}
.aside-game .dl-btn{margin-top:4px}
.aside-game:hover .game-name{color:var(--primary)}

/* Category filter */
.cat-filter{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.cat-filter a{padding:6px 16px;background:var(--card);border:1px solid var(--border);border-radius:20px;font-size:14px;transition:all .2s}
.cat-filter a.active,.cat-filter a:hover{background:var(--primary);color:#fff;border-color:var(--primary)}

/* Page head */
.page-head{margin-bottom:20px}
.page-head h1{font-size:26px;font-weight:800}
.page-head p{color:var(--muted);margin-top:4px}

/* Pagination */
.pagination{display:flex;gap:6px;justify-content:center;align-items:center;margin-top:24px;flex-wrap:wrap}
.pagination a{padding:6px 12px;background:var(--card);border:1px solid var(--border);border-radius:6px;font-size:14px}
.pagination a.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.pagination a:hover:not(.active){border-color:var(--primary);color:var(--primary)}
.page-info{font-size:13px;color:var(--muted);margin-left:8px}

.empty{padding:40px;text-align:center;color:var(--muted)}

/* Footer */
.site-footer{background:#1e293b;color:#cbd5e1;padding:40px 0 20px;margin-top:40px}
.footer-cols{display:grid;grid-template-columns:2fr 1fr 1fr;gap:40px;margin-bottom:24px}
.footer-col h4{color:#fff;margin-bottom:12px;font-size:15px}
.footer-col p{font-size:14px;line-height:1.7}
.footer-col a{display:block;font-size:14px;margin-bottom:6px;color:#94a3b8}
.footer-col a:hover{color:#fff}
.copyright{border-top:1px solid #334155;padding-top:16px;text-align:center;font-size:13px;color:#94a3b8}
.copyright a{color:#94a3b8}

/* Responsive */
@media (max-width:992px){
    .game-grid{grid-template-columns:repeat(3,1fr)}
    /* 文章详情：中屏以下回退单栏，关联游戏显示在文章下方 */
    .article-with-aside{grid-template-columns:1fr}
    .article-aside{position:static;margin-top:16px}
}
@media (max-width:768px){
    .header-inner{flex-wrap:wrap;height:auto;padding:12px 16px;gap:12px}
    .main-nav{order:3;width:100%;gap:14px;overflow-x:auto}
    .search-box{margin-left:auto}
    .search-box input{width:100px}
    .hero-title{font-size:26px}
    .hero-banner{padding:36px 16px}
    .game-grid,.game-grid.grid-4,.game-grid.grid-5{grid-template-columns:repeat(2,1fr)}
    .gd-head{flex-direction:column;align-items:center;text-align:center}
    .gd-tags{justify-content:center}
    .article-item{flex-direction:column}
    .art-thumb{width:100%;height:160px}
    .footer-cols{grid-template-columns:1fr;gap:20px}
    .art-h1{font-size:22px}
    .article-detail{padding:18px}
    .aside-card{padding:14px}
}
