
/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Poppins', sans-serif;
    background: radial-gradient(circle at top right, #6C5CE7, #007AFF);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

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

header h1 {
    font-size: 24px;
    color: #fff;
    font-weight: bold;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #FFD700;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #2ECC71;
}

.main-content {
    padding: 120px 40px 40px 40px;
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

section {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

section:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

section h2, section h3 {
    color: #FFD700;
    margin-bottom: 15px;
}

section p {
    color: #fff;
    margin-bottom: 20px;
}

pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    color: #2ECC71;
    font-family: 'Courier New', Courier, monospace;
}

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

button {
    background: #2ECC71;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

button:hover {
    background: #27AE60;
    transform: scale(1.05);
}

footer {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    text-align: center;
    color: #fff;
}

img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

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

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

@media (min-width: 480px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 2fr 1fr;
    }

    header {
        padding: 20px 80px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 3fr 2fr;
    }
}

@media (min-width: 1200px) {
    body {
        background: radial-gradient(circle at center, #6C5CE7, #007AFF);
    }

    header {
        padding: 20px 120px;
    }

    .main-content {
        padding: 140px 120px 40px 120px;
    }
}

@media (min-width: 1440px) {
    header h1 {
        font-size: 28px;
    }

    section {
        padding: 40px;
    }

    button {
        padding: 12px 24px;
    }
}

/* 动画效果 */
@keyframes aurora-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(-45deg, #6C5CE7, #007AFF, #2ECC71, #FFD700);
    background-size: 400% 400%;
    animation: aurora-move 15s ease infinite;
}

/* 响应式字体 */
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 24px;
}

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

    nav a {
        margin-left: 10px;
        font-size: 14px;
    }

    .main-content {
        padding: 100px 20px 20px 20px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    header {
        justify-content: center;
    }
}

a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2ECC71;
}

.card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle at bottom left, #000000, #333333);
        color: #fff;
    }

    header {
        background: rgba(0, 0, 0, 0.5);
    }

    section {
        background: rgba(50, 50, 50, 0.5);
    }

    footer {
        background: rgba(0, 0, 0, 0.5);
    }

    nav a {
        color: #FFD700;
    }

    nav a:hover {
        color: #2ECC71;
    }

    .gallery img {
        filter: brightness(0.8);
    }

    pre {
        background: rgba(0, 0, 0, 0.8);
        color: #2ECC71;
    }

    code {
        color: #FFD700;
    }
}

