
/* 全局样式 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0000FF, #8A2BE2, #FF4500, #32CD32);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    animation: backgroundMove 15s linear infinite;
}

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

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: #FF4500;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #32CD32;
}

.main {
    padding: 100px 20px 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2, h3 {
    color: #FF4500;
    margin-top: 40px;
}

p {
    margin: 20px 0;
}

pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #32CD32;
}

.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.item {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button {
    background-color: #FF4500;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: scale(0.9);
}

.article-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
}

.article-section h2 {
    color: #32CD32;
}

.article-section pre {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 5px;
}

footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    width: 100%;
    bottom: 0;
    color: #ffffff;
}

@media (max-width: 1440px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    nav a {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }
    nav a {
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    .main {
        padding: 100px 10px 40px 10px;
    }
}

