
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    background-color: #000000;
    background: linear-gradient(135deg, #0047AB, #8A2BE2, #00FF7F);
    background-size: 400% 400%;
    animation: gradient-flow 20s ease infinite;
}

@keyframes gradient-flow {
    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.6);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    color: #00FF7F;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00FF7F;
}

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

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    color: #8A2BE2;
    margin-bottom: 20px;
}

.section p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.article h2 {
    color: #00FF7F;
}

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

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

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

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

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

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #8A2BE2;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-size: 16px;
}

.button:hover {
    background-color: #00FF7F;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.button:hover::before {
    width: 200px;
    height: 200px;
    opacity: 0;
}

.footer {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px 40px;
    text-align: center;
    font-size: 14px;
}

.code-preview {
    background: #2d2d2d;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    color: #00FF7F;
    overflow-x: auto;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .main {
        padding: 120px 10px 30px 10px;
    }

    .section h2 {
        font-size: 28px;
    }

    .section p {
        font-size: 16px;
    }
}

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

    nav ul li a {
        font-size: 14px;
    }

    .section h2 {
        font-size: 24px;
    }

    .section p {
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 1440px) {
    .main {
        padding: 150px 60px 50px 60px;
    }

    .section h2 {
        font-size: 36px;
    }

    .section p {
        font-size: 20px;
    }
}

