
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用无衬线现代字体 */
    background: #F5F5F5; /* 中性灰白背景色 */
    color: #333333; /* 主文本颜色 */
    line-height: 1.6;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(90deg, #81C784, #1E88E5); /* 绿色到深蓝色渐变背景 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 导航栏阴影 */
}

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

.navbar a:hover {
    color: #F5F5F5; /* 悬停时颜色变化 */
}

/* 主容器样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 响应式网格布局 */
    gap: 20px;
    padding: 100px 20px 20px 20px; /* 顶部留出导航栏空间 */
    background-color: #F5F5F5;
}

/* 卡片组件样式 */
.card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 卡片阴影 */
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* 悬停时阴影加深 */
    transform: translateY(-5px); /* 悬停时轻微上移 */
}

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

article h2, article h3 {
    color: #1E88E5; /* 标题颜色 */
}

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

article code {
    color: #D84315; /* 代码颜色 */
    font-family: 'Courier New', Courier, monospace;
}

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

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

/* 图片样式 */
.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img {
    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;
}

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

/* 页脚样式 */
.footer {
    background-color: #F5F5F5;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #E0E0E0;
    margin-top: 40px;
}

.footer a {
    color: #1E88E5;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #81C784;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .container {
        grid-template-columns: 1fr;
        padding: 120px 10px 10px 10px;
    }
}

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

