﻿:root {
    --mobile-primary-color: #FFA07A; /* 更柔和的主色，适合卡通风格 */
    --mobile-secondary-color: #B0E0E6; /* 辅助色 */
    --mobile-text-color: #2F4F4F; /* 文本颜色 */
    --mobile-bg-color: #FFF8DC; /* 背景色 */
}

/* 整体布局 */
body.mobile {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 24px; /* 移动端更大基础字体 */
    background-color: var(--mobile-bg-color);
    color: var(--mobile-text-color);
    line-height: 1.8;
}

/* 头部调整 */
.header {
    padding: 1rem; /* 移动端减少内边距 */
}

/* 移动端标题优化 */
.header h1 {
    font-size: 5vw; /* 调整视口宽度单位比例，增大移动端标题字体 */
    line-height: 1.4;
    white-space: normal; /* 允许文字换行 */
    text-align: center;
    overflow: visible; /* 取消溢出隐藏 */
    max-width: 100%;
    min-height: 2.8rem; /* 预留足够高度避免内容挤压 */
}

/* 顶部功能按钮样式调整 */
.header-btn {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    text-align: center;
}

/* 游戏按钮文字防换行 */
.game-btn {
    font-size: 1.2rem;
    white-space: nowrap;
    text-align: center;
}

/* 模态框标题优化 */
.modal-header div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}
.modal-header div:first-child > div:first-child {
    font-size: 1.5rem;
    white-space: normal;
    margin-bottom: 10px;
}
.modal-header div:first-child > div:nth-child(2) {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.2rem;
}    text-align: left;
    max-width: 100%;
}
.modal-header div:first-child > div:last-child {
    display: flex;
    gap: 10px;
    font-size: 1rem;
}

/* 游戏卡片适配移动端 */
.card {
    width: 100%; /* 卡片占满宽度 */
    margin-bottom: 1.5rem;
    border-radius: 20px; /* 更圆润的边框 */
}

.card-img-top {
    height: 150px; /* 调整图片高度 */
}

.card-title {
    font-size: 1.9rem; /* 卡片标题字体增大 */
    color: var(--mobile-primary-color);
}

.card-text {
    font-size: 1.5rem; /* 卡片内容字体增大 */
    margin-bottom: 1rem;
}

/* 按钮优化 */
.game-btn {
    font-size: 1.4rem; /* 调整字体大小适配移动端 */
    padding: 0.8rem 1.5rem; /* 缩小内边距减少按钮尺寸 */
    border-radius: 15px; /* 保持圆润 */
    margin: 0.8rem 0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    white-space: nowrap;
    text-align: center; /* 防止文字换行 */
}

/* 卡通元素 */
.game-btn::before {
    content: ""; /* 可添加卡通图标 */
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: -18px;
    background-size: cover;
}

/* 高对比度模式（移动端增强） */
.mobile.high-contrast {
    --mobile-primary-color: #0052CC;
    --mobile-secondary-color: #663399;
    --mobile-text-color: #000000;
    --mobile-bg-color: #FFFFFF;
}

/* 大字模式（移动端进一步增大） */
.mobile.large-text {
    font-size: 28px;
}
.mobile.large-text .card-title {
    font-size: 2.3rem;
}
.mobile.large-text .card-text {
    font-size: 1.9rem;
}