body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    /* 添加以下属性以禁止微信浏览器调整字体大小 */
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
}

header {
    background-color: #005a9e;
    color: white;
    text-align: center;
    padding: 1rem;
}

h1 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

main {
    padding: 0 15px;  /* 增加左右内边距 */
}

section {
    margin-bottom: 1rem;
}

section:first-child {
    margin-top: 10px;  /* 添加一些顶部边距 */
}

h2 {
    font-size: 1.2rem;
    color: #005a9e;
    margin-bottom: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

h2[data-main-competition="true"] {
    font-weight: bold;
    color: #003366;
}

.competition-content {
    display: none; /* 确保这里不是 'display: none;' */
    padding: 0.5rem;
    background-color: #f4f4f4;
    border-radius: 5px;
    font-size: 0.9rem;
}

.competition-content.active {
    display: block;
}

.quote {
    display: inline;
    font-size: 0.9em;
    margin-top: 0.2em;
}

.competition-content a {
    color: #005a9e;
    text-decoration: none;
    font-weight: bold;
}

.competition-content a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    #introduction, main {
        margin-left: 10px;
        margin-right: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #introduction p, h2 {
        font-size: 1rem;
    }

    section:first-child {
        margin-top: 15px;  /* 在移动端增加更多顶部边距 */
    }

    h1 {
        font-size: 1.2rem;
    }

    h2, #introduction p {
        font-size: 1rem;
    }

    .competition-content {
        font-size: 0.9rem;
    }

    .quote {
        font-size: 0.8em;
    }

    #qawenwen-link {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .toolkit-button, .qawenwen-button {
        margin: 5px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1rem;
    }

    h2, #introduction p {
        font-size: 0.9rem;
    }

    .competition-content {
        font-size: 0.8rem;
    }
}

#introduction {
    margin: 15px 15px 20px;  /* 增加左右边距，调整上下边距 */
    padding: 15px;  /* 增加内边距 */
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#introduction p {
    margin: 0;
    font-size: 1.1rem;  /* 稍微调小字体大小 */
    line-height: 1.6;
    color: #333;
}

#introduction strong {
    font-weight: bold;
    margin-right: 5px;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #f4f4f4;
    margin-top: 2rem;
}

footer p {
    margin: 0;
    font-size: 0.8rem;  /* 稍微减小字体大小 */
    color: #666;
}

#qawenwen-link {
    text-align: center;
    margin: 20px 0;
}

.button-group {
    margin-bottom: 15px;  /* 增加按钮组之间的间距 */
}

/* 统一所有按钮的基础样式 */
.toolkit-button, .qawenwen-button {
    display: inline-block;
    padding: 8px 12px;
    margin: 5px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 允许按钮换行 */
    gap: 10px; /* 按钮之间的间距 */
    padding: 0 10px;
}


/* 移动端和微信浏览器的特殊处理 */
@media screen and (max-width: 768px) {
    .toolkit-button, .qawenwen-button {
        padding: 8px 10px;
        font-size: 0.9rem;
        flex-grow: 1; /* 让按钮在需要时可以拉伸填充空间 */
        text-align: center;
    }

    .button-group {
        justify-content: center;
    }
}

/* 超小屏幕的处理 */
@media screen and (max-width: 320px) {
    .toolkit-button, .qawenwen-button {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}