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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #4b0082, #00ff7f);
    color: #ffffff;
    line-height: 1.6;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 20px;
    background: radial-gradient(circle, rgba(255,87,34,0.8), transparent);
    border-radius: 15px;
    margin-bottom: 40px;
    animation: aurora-move 15s linear infinite;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

header p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
}

/* 导航栏样式 */
nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #00ff7f;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

nav a:hover {
    color: #00ff7f;
}

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

/* 主体内容样式 */
main {
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 60px;
}

section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ff5722;
}

section p {
    font-size: 1em;
    margin-bottom: 15px;
}

section pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

section code {
    font-family: 'Courier New', Courier, monospace;
    color: #00ff7f;
}

/* 模块化网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.module {
    background: linear-gradient(135deg, #0074d9, #01ff70);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s, background 0.3s;
}

.module:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #01ff70, #0074d9);
}

.module img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.module h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.module p {
    font-size: 0.95em;
}

/* 示例展示样式 */
.sample-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.sample-display h2 {
    color: #ffca28;
    margin-bottom: 20px;
}

.sample-display p {
    margin-bottom: 15px;
}

.sample-display pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
}

.sample-display img {
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
    border-radius: 5px;
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 30px 20px;
    background: radial-gradient(circle, rgba(255,87,34,0.8), transparent);
    border-radius: 15px;
    margin-top: 40px;
}

footer p {
    font-size: 1em;
}

/* 动画效果 */
@keyframes aurora-move {
    0% { background: radial-gradient(circle, rgba(255,87,34,0.8), transparent); }
    50% { background: radial-gradient(circle, rgba(0,255,127,0.8), transparent); }
    100% { background: radial-gradient(circle, rgba(255,87,34,0.8), transparent); }
}

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

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

@media (max-width: 1024px) {
    nav {
        flex-direction: column;
        gap: 15px;
    }

    header {
        padding: 40px 15px;
    }
}

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

    section h2 {
        font-size: 1.8em;
    }

    .module h3 {
        font-size: 1.3em;
    }
}

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

    nav a {
        font-size: 1em;
    }

    .module {
        padding: 15px;
    }

    .sample-display h2 {
        font-size: 1.5em;
    }
}

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

    nav a {
        font-size: 0.9em;
    }

    .module h3 {
        font-size: 1.1em;
    }

    .sample-display h2 {
        font-size: 1.3em;
    }
}

