
/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background: radial-gradient(circle, rgba(0, 51, 102, 1) 0%, rgba(255, 255, 255, 0) 70%);
    color: #333333;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    background: linear-gradient(135deg, #001f3f, #004080);
    color: #FFD700;
    padding: 40px 0;
    text-align: center;
    animation: aurora-move 15s linear infinite;
}

header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 3em;
    margin: 0;
    font-weight: bold;
}

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

/* 导航栏样式 */
nav {
    margin-top: 20px;
}

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

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #FFD700;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #34D399;
}

/* 主体内容样式 */
main {
    margin: 40px 0;
}

.section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 2em;
    color: #003366;
    margin-bottom: 20px;
    text-align: center;
}

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

.grid-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.grid-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 15px;
}

.grid-item h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5em;
    color: #003366;
    margin-bottom: 10px;
}

.grid-item p {
    font-size: 1em;
    color: #555555;
}

/* 示例展示样式 */
.sample-display {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sample-display h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2em;
    color: #7C3AED;
    margin-bottom: 20px;
    text-align: center;
}

.sample-display article {
    max-width: 800px;
    margin: 0 auto;
}

.sample-display h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5em;
    color: #003366;
    margin-top: 30px;
}

.sample-display p {
    font-size: 1em;
    color: #333333;
    margin-bottom: 15px;
}

.sample-display pre {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

.sample-display code {
    font-family: 'Courier New', Courier, monospace;
    background: #eef;
    padding: 2px 4px;
    border-radius: 3px;
}

.sample-display table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.sample-display table, .sample-display th, .sample-display td {
    border: 1px solid #cccccc;
}

.sample-display th, .sample-display td {
    padding: 10px;
    text-align: left;
}

.sample-display ul {
    list-style: disc inside;
    margin-bottom: 20px;
}

.sample-display li {
    margin-bottom: 10px;
}

/* 代码示例样式 */
.code-example {
    background: #1E3A8A;
    color: #FFD700;
    padding: 20px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-example code {
    color: #FFD700;
}

/* 页脚样式 */
footer {
    background: #001f3f;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

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

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

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

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

    nav ul li {
        margin: 10px 0;
    }
}

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

    header h1 {
        font-size: 2em;
    }

    .section-title {
        font-size: 1.8em;
    }
}

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

    .grid-item h3 {
        font-size: 1.2em;
    }

    .grid-item p {
        font-size: 0.9em;
    }
}

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

    nav ul li a {
        font-size: 0.9em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .grid-item {
        padding: 15px;
    }
}

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

