/* 全局基础设置 */
html {
    min-height: 100%;
}

body {
    background-color: #f4f7f6;
    margin: 0;
    padding: max(14px, env(safe-area-inset-top)) 20px max(14px, env(safe-area-inset-bottom));
    font-family: "Microsoft YaHei", "Helvetica Neue", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 28px;
    margin-top: 12px;
}

h1 { color: #2d3436; margin-bottom: 8px; font-size: 2.3rem; }
p { color: #636e72; font-size: 1.05rem; margin: 0; }

/* 游戏卡片网格布局 */
.game-grid {
    display: grid;
    /* 自动适应屏幕宽度，每列最小160px */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 22px;
    width: 100%;
    max-width: 1000px;
    padding: 14px;
    flex: 1; /* 让内容撑开，把页脚挤到底部 */
    box-sizing: border-box;
}

/* 单个卡片样式 */
.game-card {
    background: white;
    border-radius: 20px;
    padding: 26px 18px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #eee;
}

/* 鼠标悬停动画 */
.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
    border-color: #007bff;
}

.game-card .icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.game-card h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

/* 底部页脚样式 */
.site-footer {
    margin-top: 36px;
    padding: 22px 0;
    width: 100%;
    text-align: center;
    background-color: transparent;
    font-size: 14px;
    color: #b2bec3;
    border-top: 1px solid #dfe6e9;
}

.counter {
    margin-bottom: 8px;
}

.divider {
    margin: 0 12px;
    color: #dfe6e9;
}

.beian a {
    color: #b2bec3;
    text-decoration: none;
    transition: color 0.3s;
}

.beian a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 手机端适配 */
@media (max-width: 600px) {
    body { padding: 12px; }
    header { margin-top: 6px; margin-bottom: 16px; }
    h1 { font-size: 1.65rem; }
    p { font-size: 0.95rem; }
    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 8px; }
    .game-card { border-radius: 16px; padding: 18px 10px; }
    .game-card .icon { font-size: 42px; margin-bottom: 8px; }
    .game-card h3 { font-size: 1rem; }
    .site-footer { margin-top: 24px; padding: 18px 0; }
    .counter span { display: block; margin: 5px 0; }
    .divider { display: none; }
}
