
/* 页面整体样式设计 */

/* 设置全局字体和背景 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 正文字体 */
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec); /* 主色调渐变背景 */
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.sidebar {
    position: fixed; /* 固定在左侧 */
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background: #2C3E50; /* 主色调 */
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.sidebar a {
    color: #ECF0F1; /* 导航链接颜色 */
    text-decoration: none;
    margin: 15px 0;
    transition: color 0.3s ease;
    rel: "nofollow";
}

.sidebar a:hover {
    color: #4CAF50; /* 点缀色悬停效果 */
}

/* 主内容区域样式 */
.main-content {
    margin-left: 270px; /* 留出导航栏空间 */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 响应式网格布局 */
@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* 文章样式 */
article {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

article h2, article h3 {
    font-family: 'Roboto Slab', serif; /* 标题字体 */
    color: #2C3E50;
}

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

article h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    font-size: 16px;
    color: #555555;
    margin-bottom: 15px;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 10px 0;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #4CAF50, #2196F3);
    border: none;
    border-radius: 25px;
    color: #fff;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.5s ease;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: linear-gradient(45deg, #2196F3, #4CAF50);
}

/* 代码块样式 */
pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
    position: relative;
    margin-bottom: 20px;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #2C3E50;
}

pre code::before {
    content: "代码示例";
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

/* 卡片式布局 */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
}

/* 段落独立成块 */
.section-block {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    min-width: 500px;
}

/* 提示信息样式 */
.notice {
    background: #FFFAE6;
    border-left: 6px solid #FFEB3B;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 16px;
    color: #665c00;
}

/* 动画效果 */
@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.leaf {
    position: absolute;
    top: -50px;
    animation: fall 5s infinite;
}

/* 按需追加更多样式以确保页面美观与响应式 */

