
/* 整体页面样式 */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1A237E 70%, #4CAF50 25%, #FFC107 5%);
    color: #333333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(26, 35, 126, 0.9);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(26, 35, 126, 1);
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

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

/* 主内容区样式 */
.main {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 100px 50px 50px 50px;
    flex: 1;
}

/* 侧边栏样式 */
.sidebar {
    grid-column: span 3;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

/* 主内容区模块样式 */
.content {
    grid-column: span 9;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.section img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.section h2 {
    font-size: 24px;
    color: #1A237E;
    margin-bottom: 10px;
}

.section p {
    font-size: 16px;
    line-height: 1.6;
    color: #424242;
}

/* 按钮样式 */
.button {
    background-color: #4CAF50;
    border: none;
    padding: 10px 20px;
    color: #FFFFFF;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .main {
        grid-template-columns: repeat(12, 1fr);
        padding: 100px 30px 30px 30px;
    }
    .sidebar {
        grid-column: span 4;
    }
    .content {
        grid-column: span 8;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar a {
        margin: 10px 0;
    }
    .main {
        grid-template-columns: 1fr;
        padding: 100px 20px 20px 20px;
    }
    .sidebar, .content {
        grid-column: span 1;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section {
    animation: fadeIn 1s ease-in-out;
}

/* 代码块样式 */
code.language-css {
    display: block;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #d32f2f;
}

