/* ============================================================
   GH Layout Variants - 布局多样式引擎（纯 CSS 覆盖层）
   12 套布局变体：只改变布局/栅格/对齐/卡片形态/留白节奏，
   不改动任何 HTML 结构，不破坏各组主题原有配色体系。
   ============================================================ */

/* ---------- 变体1 lv-classic-center：经典居中均衡栅格 ---------- */
body.lv-classic-center .hero-section { text-align: center; }
body.lv-classic-center .games-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.lv-classic-center .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.lv-classic-center .container { max-width: 1200px; }

/* ---------- 变体2 lv-left-aligned：左对齐大标题紧凑CTA ---------- */
body.lv-left-aligned .hero-section { text-align: left; }
body.lv-left-aligned .hero-section .container { max-width: 1000px; margin-left: 0; }
body.lv-left-aligned .hero-cta { justify-content: flex-start; }
body.lv-left-aligned .hero-subtitle { margin-left: 0; }
body.lv-left-aligned .games-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
body.lv-left-aligned .game-card .game-excerpt { display: none; }
body.lv-left-aligned .articles-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---------- 变体3 lv-split-duo：双栏主区大卡 ---------- */
body.lv-split-duo .games-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
body.lv-split-duo .game-card:has(.game-thumbnail) { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
body.lv-split-duo .game-card .game-thumbnail, body.lv-split-duo .game-card .btn-demo-static { height: 100%; }
body.lv-split-duo .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
body.lv-split-duo .article-card:has(.article-thumbnail) { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: center; }

/* ---------- 变体4 lv-dense-grid：密集四列高信息密度 ---------- */
body.lv-dense-grid .hero-section { padding-top: 48px; padding-bottom: 48px; }
body.lv-dense-grid .hero-stats { max-width: 640px; }
body.lv-dense-grid .games-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
body.lv-dense-grid .game-card { padding: 10px; }
body.lv-dense-grid .game-card .game-excerpt { display: none; }
body.lv-dense-grid .articles-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
body.lv-dense-grid .article-card .article-excerpt { display: none; }
body.lv-dense-grid .seo-guide-section .container { max-width: 1180px; }

/* ---------- 变体5 lv-asymmetric：不对称跨列交错栅格 ---------- */
body.lv-asymmetric .games-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
body.lv-asymmetric .games-grid .game-card:first-child { grid-column: span 2; grid-row: span 2; }
body.lv-asymmetric .games-grid .game-card:first-child .game-thumbnail { height: 100%; min-height: 240px; }
body.lv-asymmetric .games-grid .game-card:nth-child(4) { grid-column: span 2; }
body.lv-asymmetric .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
body.lv-asymmetric .articles-grid .article-card:first-child { grid-column: span 2; }
body.lv-asymmetric .hero-section .hero-title { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------- 变体6 lv-editorial：杂志编辑风窄栏细线 ---------- */
body.lv-editorial .container { max-width: 880px; }
body.lv-editorial .hero-section { border-bottom: 1px solid rgba(128,128,128,.3); }
body.lv-editorial .hero-title { font-size: 44px; letter-spacing: -0.5px; }
body.lv-editorial .hero-subtitle { font-size: 17px; line-height: 1.9; }
body.lv-editorial .games-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
body.lv-editorial .game-card { border-radius: 0; box-shadow: none; border: none; border-bottom: 1px solid rgba(128,128,128,.25); padding-bottom: 22px; }
body.lv-editorial .articles-grid { grid-template-columns: 1fr; gap: 10px; }
body.lv-editorial .article-card:has(.article-thumbnail) { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
body.lv-editorial .faq-list { max-width: 100%; }

/* ---------- 变体7 lv-zigzag：区块锯齿交替背景 ---------- */
body.lv-zigzag .hero-section { text-align: center; }
body.lv-zigzag .games-section { padding: 64px 0; }
body.lv-zigzag .seo-guide-section { padding: 64px 0; }
body.lv-zigzag .games-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.lv-zigzag .games-grid .game-card:nth-child(3n+2) { transform: translateY(28px); }
body.lv-zigzag .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.lv-zigzag .articles-grid .article-card:nth-child(3n+2) { transform: translateY(28px); }

/* ---------- 变体8 lv-pill-soft：胶囊大圆角柔和阴影 ---------- */
body.lv-pill-soft .game-card { border-radius: 24px; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
body.lv-pill-soft .article-card { border-radius: 24px; box-shadow: 0 12px 32px rgba(0,0,0,.12); }
body.lv-pill-soft .btn { border-radius: 999px; }
body.lv-pill-soft .rtp-card { border-radius: 20px; }
body.lv-pill-soft .games-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
body.lv-pill-soft .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* ---------- 变体9 lv-sharp-hard：直角硬朗工业边框 ---------- */
body.lv-sharp-hard .game-card { border-radius: 0; box-shadow: none; border: 2px solid currentColor; }
body.lv-sharp-hard .article-card { border-radius: 0; box-shadow: none; border: 2px solid currentColor; }
body.lv-sharp-hard .btn { border-radius: 0; }
body.lv-sharp-hard .rtp-card { border-radius: 0; border: 2px solid currentColor; }
body.lv-sharp-hard .hero-title { text-transform: uppercase; letter-spacing: 2px; }
body.lv-sharp-hard .games-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
body.lv-sharp-hard .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------- 变体10 lv-dark-immersive：沉浸深色面板霓虹点缀 ---------- */
body.lv-dark-immersive { background: #0B0E1A; color: #D7DBEE; }
body.lv-dark-immersive .game-card { background: #141A2E; color: #E4E7F7; border: 1px solid #2A3356; }
body.lv-dark-immersive .article-card { background: #141A2E; color: #E4E7F7; border: 1px solid #2A3356; }
body.lv-dark-immersive .game-card .game-title a { color: #8FA8FF; }
body.lv-dark-immersive .article-card .article-title a { color: #8FA8FF; }
body.lv-dark-immersive .section-title { color: #F0F2FF; }
body.lv-dark-immersive .games-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
body.lv-dark-immersive .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- 变体11 lv-tight-lead：紧凑导览快速入口 ---------- */
body.lv-tight-lead .hero-section { padding-top: 32px; padding-bottom: 32px; }
body.lv-tight-lead .hero-title { font-size: 32px; margin-bottom: 10px; }
body.lv-tight-lead .hero-subtitle { margin-bottom: 14px; }
body.lv-tight-lead .hero-cta { margin-bottom: 18px; }
body.lv-tight-lead .hero-stats { gap: 12px; }
body.lv-tight-lead .games-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; }
body.lv-tight-lead .game-card { padding: 8px; }
body.lv-tight-lead .game-card .game-excerpt, body.lv-tight-lead .game-card .game-meta { display: none; }
body.lv-tight-lead .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
body.lv-tight-lead .article-card .article-excerpt { display: none; }

/* ---------- 变体12 lv-airy-spacious：大留白呼吸式布局 ---------- */
body.lv-airy-spacious .container { max-width: 1080px; }
body.lv-airy-spacious .hero-section { padding-top: 110px; padding-bottom: 110px; }
body.lv-airy-spacious .games-section { padding: 96px 0; }
body.lv-airy-spacious .seo-guide-section { padding: 96px 0; }
body.lv-airy-spacious .faq-section { padding: 96px 0; }
body.lv-airy-spacious .hero-title { font-size: 56px; line-height: 1.2; }
body.lv-airy-spacious .games-grid { grid-template-columns: repeat(3, 1fr); gap: 36px; }
body.lv-airy-spacious .articles-grid { grid-template-columns: repeat(3, 1fr); gap: 36px; }
body.lv-airy-spacious .game-card { padding: 22px; }
body.lv-airy-spacious .section-title { margin-bottom: 48px; }

/* ============================================================
   响应式收缩（变体在移动端退化为单列，避免布局溢出）
   ============================================================ */
@media (max-width: 1024px) {
    body.lv-dense-grid .games-grid, body.lv-tight-lead .games-grid,
    body.lv-left-aligned .games-grid { grid-template-columns: repeat(3, 1fr); }
    body.lv-left-aligned .articles-grid, body.lv-dense-grid .articles-grid { grid-template-columns: repeat(2, 1fr); }
    body.lv-tight-lead .games-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    body.lv-classic-center .games-grid, body.lv-classic-center .articles-grid,
    body.lv-left-aligned .games-grid, body.lv-left-aligned .articles-grid,
    body.lv-dense-grid .games-grid, body.lv-dense-grid .articles-grid,
    body.lv-split-duo .games-grid, body.lv-split-duo .articles-grid,
    body.lv-asymmetric .games-grid, body.lv-asymmetric .articles-grid,
    body.lv-editorial .articles-grid,
    body.lv-zigzag .games-grid, body.lv-zigzag .articles-grid,
    body.lv-pill-soft .games-grid, body.lv-pill-soft .articles-grid,
    body.lv-sharp-hard .games-grid, body.lv-sharp-hard .articles-grid,
    body.lv-dark-immersive .games-grid, body.lv-dark-immersive .articles-grid,
    body.lv-tight-lead .articles-grid,
    body.lv-airy-spacious .games-grid, body.lv-airy-spacious .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    body.lv-split-duo .game-card:has(.game-thumbnail), body.lv-split-duo .article-card:has(.article-thumbnail),
    body.lv-editorial .article-card:has(.article-thumbnail) { grid-template-columns: 1fr; }
    body.lv-asymmetric .games-grid .game-card:first-child,
    body.lv-asymmetric .articles-grid .article-card:first-child,
    body.lv-asymmetric .games-grid .game-card:nth-child(4) { grid-column: span 2; }
}
@media (max-width: 480px) {
    body.lv-classic-center .games-grid, body.lv-classic-center .articles-grid,
    body.lv-left-aligned .games-grid, body.lv-left-aligned .articles-grid,
    body.lv-dense-grid .games-grid, body.lv-dense-grid .articles-grid,
    body.lv-split-duo .games-grid, body.lv-split-duo .articles-grid,
    body.lv-asymmetric .games-grid, body.lv-asymmetric .articles-grid,
    body.lv-zigzag .games-grid, body.lv-zigzag .articles-grid,
    body.lv-pill-soft .games-grid, body.lv-pill-soft .articles-grid,
    body.lv-sharp-hard .games-grid, body.lv-sharp-hard .articles-grid,
    body.lv-dark-immersive .games-grid, body.lv-dark-immersive .articles-grid,
    body.lv-tight-lead .games-grid, body.lv-tight-lead .articles-grid,
    body.lv-airy-spacious .games-grid, body.lv-airy-spacious .articles-grid {
        grid-template-columns: 1fr;
    }
    body.lv-tight-lead .games-grid { grid-template-columns: repeat(2, 1fr); }
    body.lv-airy-spacious .hero-title { font-size: 38px; }
}

/* ---------- 空内容兜底：网格无卡片时占位提示，避免空白破版 ---------- */
.games-grid:empty, .articles-grid:empty { min-height: 140px; position: relative; }
.games-grid:empty::after, .articles-grid:empty::after {
    content: "\5f85\7e6e\5185\5bb9"; /* 待铺内容 */
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--text-low, #7D7391); font-size: 16px; letter-spacing: 0.5px;
    border: 1px dashed var(--line, rgba(178,75,255,.22)); border-radius: 8px;
}
