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

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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;
    line-height: 1.6;
    padding: 20px;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-family: 'Roboto Slab', serif;
    font-size: 24px;
    font-weight: 700;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

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

.navbar ul li a:hover {
    color: #ff6f61;
}

/* 主页头部 */
.header {
    background: radial-gradient(circle, rgba(255,87,34,0.8), transparent);
    padding: 100px 20px 60px 20px;
    text-align: center;
    animation: aurora-move 15s linear infinite;
}

.header h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 48px;
    margin-bottom: 20px;
}

.header p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.header .cta-button {
    padding: 10px 30px;
    background: #ff6f61;
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.header .cta-button:hover {
    background: #ff3b2e;
}

/* 动画关键帧 */
@keyframes aurora-move {
    0% { background: radial-gradient(circle, rgba(255,87,34,0.8), transparent); }
    50% { background: radial-gradient(circle, rgba(138,43,226,0.8), transparent); }
    100% { background: radial-gradient(circle, rgba(255,87,34,0.8), transparent); }
}

/* 主体内容 */
.main {
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-top: 20px;
}

.section-title {
    font-family: 'Roboto Slab', serif;
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
}

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

.card {
    background: #ffffff;
    color: #333333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 22px;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

.card-content a {
    text-decoration: none;
    color: #ff6f61;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-content a:hover {
    color: #ff3b2e;
}

/* 示例展示 */
.example-section {
    margin-top: 60px;
}

.example-section h2 {
    font-family: 'Roboto Slab', serif;
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.example-article {
    background: #f4f4f4;
    color: #333333;
    padding: 20px;
    border-radius: 10px;
    overflow: auto;
}

.example-article h2, 
.example-article h3, 
.example-article h4 {
    color: #1e3c72;
}

.example-article pre {
    background: #272727;
    color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

.example-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.example-article table, 
.example-article th, 
.example-article td {
    border: 1px solid #ddd;
}

.example-article th, 
.example-article td {
    padding: 12px;
    text-align: left;
}

.example-article th {
    background: #1e3c72;
    color: #ffffff;
}

/* 动态背景 */
.particle-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    animation: particle-animation 10s infinite;
}

@keyframes particle-animation {
    0% { transform: translateY(-100px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .header h1 {
        font-size: 42px;
    }
    .section-title {
        font-size: 26px;
    }
}

@media (max-width: 1200px) {
    .card img {
        height: 180px;
    }
}

@media (max-width: 1024px) {
    .navbar ul {
        display: none;
    }
    .header {
        padding: 80px 20px 40px 20px;
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .header h1 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 28px;
    }
    .card img {
        height: 150px;
    }
}

@media (max-width: 320px) {
    .header {
        padding: 60px 10px 30px 10px;
    }
    .header h1 {
        font-size: 24px;
    }
}

