
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2e8b57, #3cb371, #20b2aa);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px 0;
    text-align: center;
    position: relative;
}

header h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3em;
    color: #2e8b57;
    margin: 0;
}

header p {
    font-size: 1.2em;
    color: #555;
}

/* 导航栏 */
nav {
    margin-top: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #2e8b57;
    font-size: 1.1em;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #2e8b57;
    transition: width 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
}

nav ul li a:hover {
    color: #20b2aa;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 主内容区 */
main {
    margin: 40px 0;
}

article {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

article h2 {
    font-family: 'Pacifico', cursive;
    font-size: 2.5em;
    color: #2e8b57;
    margin-bottom: 20px;
    position: relative;
}

article h2::after {
    content: '';
    width: 50px;
    height: 4px;
    background: #2e8b57;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

article h3 {
    font-size: 1.8em;
    color: #3cb371;
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
}

article pre {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 按钮样式 */
button {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

button:hover {
    background: linear-gradient(to right, #2575fc, #6a11cb);
    transform: translateY(-5px);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loader {
    animation: fadeIn 2s ease-in-out;
    text-align: center;
    font-size: 1.5em;
    color: #666;
}

@keyframes aurora-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dynamic-background {
    background: radial-gradient(circle, rgb(34, 193, 195), transparent);
    animation: aurora-move 15s linear infinite;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

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

.code-block code {
    color: #00ff00;
    font-size: 1em;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #3cb371;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

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

    nav ul li a {
        font-size: 1em;
    }
}

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }

    article {
        padding: 20px;
    }

    article h2 {
        font-size: 2em;
    }
}

@media (max-width: 1024px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    button {
        width: 100%;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    article {
        padding: 15px;
    }

    article h2 {
        font-size: 1.8em;
    }

    article h3 {
        font-size: 1.5em;
    }
}

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

    nav ul li a {
        font-size: 0.9em;
    }

    button {
        padding: 8px;
        font-size: 0.9em;
    }

    .code-block {
        padding: 10px;
    }
}

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

    nav ul li a {
        font-size: 0.8em;
    }

    article h2 {
        font-size: 1.5em;
    }

    article h3 {
        font-size: 1.2em;
    }

    button {
        padding: 6px;
        font-size: 0.8em;
    }
}

