
/* 整体样式设置，包括字体、颜色和基础布局 */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0074D9 70%, #F5F5F5 25%, #FFA500 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar ul {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    list-style: none;
    margin: 0;
}

.navbar li {
    margin: 0 15px;
}

.navbar a {
    text-decoration: none;
    color: #0074D9;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFA500;
}

/* 首屏内容样式 */
.header {
    position: relative;
    background: #0074D9;
    color: #FFFFFF;
    padding: 100px 20px;
    text-align: center;
    overflow: hidden;
    margin-top: 80px; /* 预留导航栏空间 */
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3) 25%, transparent 25%) -50px 0,
                linear-gradient(225deg, rgba(255, 165, 0, 0.3) 25%, transparent 25%) -50px 0,
                linear-gradient(315deg, rgba(255, 165, 0, 0.3) 25%, transparent 25%),
                linear-gradient(45deg, rgba(255, 165, 0, 0.3) 25%, transparent 25%);
    background-size: 100px 100px;
    animation: moveBackground 20s linear infinite;
    opacity: 0.5;
}

@keyframes moveBackground {
    from {
        transform: translateX(0) translateY(0);
    }
    to {
        transform: translateX(100px) translateY(100px);
    }
}

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

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

/* 内容块布局 */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 40px 20px;
}

.card {
    flex: 1 1 calc(25% - 20px);
    background-color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.card img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

.card h3 {
    font-size: 1.5em;
    margin: 15px 0 10px;
    color: #0074D9;
}

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

/* 导航系统样式 */
.nav-links {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links a {
    display: block;
    margin: 10px 0;
    color: #0074D9;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #FFA500;
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

article h2, article h3 {
    color: #0074D9;
}

article h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

article h3 {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
}

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

article pre {
    background-color: #F5F5F5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 15px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #0074D9;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .card {
        flex: 1 1 calc(33.33% - 20px);
    }
}

@media (max-width: 800px) {
    .card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 500px) {
    .card {
        flex: 1 1 100%;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar li {
        margin: 10px 0;
    }

    .nav-links {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
    }
}

