
/* 重置和全局样式 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: #F5F5F5;
    color: #2E86C1;
    line-height: 1.6;
    padding: 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #2E86C1, #F39C12);
    color: #FFFFFF;
    text-align: center;
    padding: 60px 20px;
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
}

/* 主要内容样式 */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-family: 'Roboto', sans-serif;
    color: #2E86C1;
    margin-bottom: 20px;
}

section p {
    margin-bottom: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.grid-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

button {
    background-color: #F39C12;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

button:hover {
    transform: scale(1.05);
    background-color: #2E86C1;
}

/* 文章样式 */
article {
    margin-top: 40px;
}

article h2,
article h3,
article h4 {
    font-family: 'Roboto', sans-serif;
    color: #2E86C1;
    margin-bottom: 20px;
}

article p {
    margin-bottom: 20px;
}

article pre {
    background: #F5F5F5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #F39C12;
}

ul {
    list-style: disc inside;
    margin-bottom: 20px;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* 按钮动画 */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 代码块样式 */
.code-block {
    background: #2E86C1;
    color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
}

.code-block code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    header h1 {
        font-size: 2.2em;
    }
}

@media (max-width: 1200px) {
    main {
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    header {
        padding: 40px 20px;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    section h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 320px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }
}

