/* 通用样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    /* 页面背景改为深绿色，模拟麻将桌布 */
    background-color: #006400;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 主容器，用于居中内容并设置内边距 */
.container {
    width: 90%;
    max-width: 600px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

img {
    height: 100px;
    border-radius: 6px;
}

/* 标题样式 */
.page-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff; /* 标题颜色与背景色搭配 */
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 主模块卡片样式 - 更大、更醒目 */
.main-module-card {
    width: 100%; /* 确保与下面的次要模块容器宽度一致 */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #1a5e20;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 25px; /* 添加底部间距 */
}

/* 主模块悬停效果 */
.main-module-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* 次要模块容器 - 使用flexbox和换行 */
.secondary-modules-container {
    width: 100%; /* 确保与主模块宽度一致 */
    display: flex;
    justify-content: space-between; /* 在卡片之间均匀分配空间 */
    flex-wrap: wrap;
    gap: 15px;
}

/* 次要模块卡片样式 */
.secondary-module-card {
    flex-grow: 1; /* 次要卡片自动填充空间 */
    flex-basis: calc(50% - 10px); /* 在小屏幕上，每行显示两个卡片，并考虑间距 */
    height: 100px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #444;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
}

/* 次要模块悬停效果 */
.secondary-module-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 标题和副标题样式 */
.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
    color: #666;
}

/* 图标样式 */
.card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    fill: currentColor;
    transition: fill 0.3s ease;
}

.secondary-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
}

/* 媒体查询，使卡片在小屏幕上垂直排列并适应宽度 */
@media (max-width: 480px) {
    .secondary-module-card {
        flex-basis: 100%; /* 在更小的屏幕上，每行显示一个卡片 */
    }
}
