
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    background: linear-gradient(135deg, #2E8B57, #6A5ACD);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

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

header {
    text-align: center;
    padding: 50px 0;
    background: radial-gradient(circle, rgba(34,193,195,1) 0%, rgba(253,187,45,1) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    animation: aurora-move 15s linear infinite;
}

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

header p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.navbar a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    position: relative;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.navbar a:hover::after {
    width: 100%;
}

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

section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.article-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.article-content h2 {
    font-family: 'Poppins', sans-serif;
    color: #2E8B57;
    margin-bottom: 20px;
}

.article-content h3 {
    font-family: 'Roboto Mono', monospace;
    color: #6A5ACD;
    margin-top: 30px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content code {
    background: #f4f4f4;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.article-content pre {
    background: #333;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.article-content table, th, td {
    border: 1px solid #ddd;
}

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

.article-content th {
    background-color: #2E8B57;
    color: white;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

.code-preview {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    margin-top: 20px;
    overflow-x: auto;
}

.notice {
    text-align: center;
    font-size: 1.2em;
    color: #ffeb3b;
    margin-top: 20px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

.footer {
    background: #2E8B57;
    color: white;
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.footer p {
    margin: 0;
}

@media (max-width: 1440px) {
    header h1 {
        font-size: 2.5em;
    }
    .section-title {
        font-size: 2em;
    }
}

@media (max-width: 1200px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .article-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 30px 0;
    }
    .article-content h2 {
        font-size: 2em;
    }
}

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

@media (max-width: 320px) {
    .container {
        padding: 10px;
    }
    .article-content {
        padding: 15px;
    }
}

