:root {
    --primary: #046bd2;
    --primary-hover: #045cb4;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --bg-light: #f8fafc;
    --success: #00b371;
    --danger: #cf2e2e;
    --white: #ffffff;
}

* { box-sizing: border-box; } /* 关键：确保 padding 不会撑大容器 */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-muted);
    background-color: #e2e8f0;
    line-height: 1.7;
    margin: 0;
    padding: 20px 10px;
    -webkit-font-smoothing: antialiased;
}

.main-wrapper {
    max-width: 850px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    overflow: hidden;
}

header { text-align: center; padding: 40px 20px; background: var(--white); }
.logo { font-size: 32px; font-weight: 900; color: var(--primary); text-decoration: none; text-transform: uppercase; }

.container { padding: 30px; }

/* 按钮组 */
.btn-group { display: flex; justify-content: center; gap: 15px; margin: 30px 0; }
.btn {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 17px;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-login { background-color: #f472b6; }
.btn-register { background-color: var(--success); }

/* 游戏展示区 */
.game-container { background: #0f172a; padding: 30px; border-radius: 12px; margin: 40px 0; color: var(--white); text-align: center; }
.game-box { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 25px; 
    flex-wrap: wrap; /* 允许换行 */
}
.game-item { 
    flex: 1; 
    min-width: 250px; /* 保证桌面上能三个并排 */
    background: #2d3748; 
    padding: 20px; 
    border-radius: 10px; 
    border: 1px solid #334155;
}
.btn-game { 
    background: var(--primary); color: white; border: none; padding: 12px 20px; 
    border-radius: 5px; cursor: pointer; font-weight: 700; width: 100%; margin-top: 15px;
}

/* 翻牌游戏卡片 */
.card-box {
    width: 60px; height: 60px; background: #1e293b; border: 2px solid var(--primary);
    border-radius: 8px; margin: 15px auto; display: flex; align-items: center;
    justify-content: center; font-size: 24px; cursor: pointer; transition: all 0.3s;
}

/* SEO 内容模块 */
.hero-cta { text-align: center; margin-bottom: 40px; }
.hero-cta h1 { font-size: 2.2em; color: var(--text-dark); line-height: 1.2; margin-bottom: 20px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 20px 0; }
.guide-item { background: var(--bg-light); padding: 20px; border-radius: 8px; border-left: 4px solid var(--primary); }

/* 下载区域 */
.download-section { background: #fef2f2; padding: 30px; border-radius: 12px; text-align: center; margin: 40px 0; border: 1px dashed #fca5a5; }
.btn-download {
    display: block; background: var(--danger); padding: 18px; border-radius: 8px;
    color: white; text-decoration: none; font-weight: 800; font-size: 1.2em; margin-top: 15px;
}

footer { padding: 40px 20px; text-align: center; background: #f1f5f9; font-size: 14px; }

/* 移动端终极适配 */
@media (max-width: 600px) {
    .hero-cta h1 { font-size: 1.6em; }
    .btn-group { flex-direction: column; }
    .btn { width: 100%; }
    .game-item { min-width: 100%; } /* 手机端独占一行 */
}

.btn-details {
    display: block;
    margin-top: 10px;
    padding: 8px;
    background: transparent;
    color: #cbd5e0;
    border: 1px solid #4a5568;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
}
.btn-details:hover {
    background: #4a5568;
    color: #fff;
}
/* 图片展示区 */
.game-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 默认三列 */
    gap: 15px;
    margin: 30px 0;
}

.game-gallery img {
    width: 100%;
    height: 150px; /* 固定高度保持整齐 */
    object-fit: cover; /* 自动裁剪以填满容器，不会变形 */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 手机端适配：改为一列 */
@media (max-width: 600px) {
    .game-gallery {
        grid-template-columns: 1fr;
    }
    .game-gallery img {
        height: 200px;
    }
}
.trust-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 30px 0; }
.badge-card { background: var(--bg-light); padding: 10px; border-radius: 6px; text-align: center; border: 1px solid #e2e8f0; font-weight: 600; font-size: 0.9em; }
@media (min-width: 600px) { .trust-badges { grid-template-columns: repeat(4, 1fr); } }

.game-item img, .guide-item img, .badge-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}
.trust-badges .badge-card img { width: 30px; height: 30px; display: block; margin: 0 auto 5px; }


