
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #ffffff);
    color: #333333;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    background: linear-gradient(135deg, #4CAF50, #03A9F4);
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
}

header p {
    margin-top: 10px;
    font-size: 1.2em;
    color: #f0f0f0;
}

/* 导航栏样式 */
nav {
    background: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #03A9F4;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

nav ul li a:hover {
    color: #FF9800;
}

/* 主要内容样式 */
main {
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: -30px;
    position: relative;
    z-index: 1;
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 2em;
    color: #4CAF50;
    margin-bottom: 20px;
    border-bottom: 2px solid #03A9F4;
    display: inline-block;
}

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

section pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

section code {
    color: #d32f2f;
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.95em;
}

/* 示例展示样式 */
.example-section {
    background: #e8f5e9;
    padding: 30px;
    border-left: 5px solid #4CAF50;
    border-radius: 8px;
}

.example-section h2 {
    color: #388E3C;
}

.example-section article {
    margin-top: 20px;
}

.example-section img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    margin: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.button {
    display: inline-block;
    background-color: #4CAF50;
    color: #ffffff;
    padding: 10px 25px;
    border: none;
    border-radius: 24px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    text-decoration: none;
}

.button:hover {
    background-color: #388E3C;
    transform: scale(1.05);
}

/* 图片与插图样式 */
img.rounded-image {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

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

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

.animated-background {
    background: radial-gradient(circle, rgb(255, 87, 34), transparent);
    animation: aurora-move 15s linear infinite;
}

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

@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 1024px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    main {
        padding: 30px 15px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 30px 15px;
    }

    section h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    nav ul li {
        margin: 8px 0;
    }

    header h1 {
        font-size: 2em;
    }

    .button {
        padding: 8px 20px;
        font-size: 0.9em;
    }
}

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

    section h2 {
        font-size: 1.5em;
    }

    .button {
        padding: 6px 15px;
        font-size: 0.8em;
    }
}

/* 内部链接样式 */
a[rel="nofollow"] {
    color: #03A9F4;
    text-decoration: none;
    border-bottom: 1px dashed #03A9F4;
}

a[rel="nofollow"]:hover {
    color: #FF9800;
    border-bottom: 1px dashed #FF9800;
}

/* 代码块样式 */
pre code {
    display: block;
    padding: 15px;
    background: #f0f0f0;
    border-left: 5px solid #4CAF50;
    border-radius: 4px;
    overflow-x: auto;
}

pre code .keyword {
    color: #d32f2f;
    font-weight: bold;
}

pre code .string {
    color: #1976D2;
}

pre code .comment {
    color: #757575;
    font-style: italic;
}

/* 提示信息样式 */
.notice {
    background: #FFF3E0;
    border-left: 5px solid #FF9800;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 页脚样式 */
footer {
    background: #f5f5f5;
    color: #757575;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

