
/* 页面整体样式设置，采用现代响应式布局，确保在各种设备上的兼容性和美观性 */
/* 主体使用柔和的复古色调与亮眼的现代点缀色，营造复古与科技融合的氛围 */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif; /* 设置全局字体 */
    background: linear-gradient(135deg, #F5E6C0 70%, #FFD700 25%, #FF5E00 5%); /* 背景渐变色 */
    color: #333;
    line-height: 1.6;
}

/* 固定顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(51, 51, 51, 0.9); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* 阴影效果 */
    z-index: 1000;
}

/* 导航栏中的链接样式 */
.navbar a {
    color: #F5E6C0;
    text-decoration: none;
    margin: 0 15px;
    position: relative;
    transition: color 0.3s ease;
}

/* 导航栏链接悬停效果，颜色渐变与下划线动画 */
.navbar a:hover {
    color: #FF5E00;
}
.navbar a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, #FF5E00, #F5E6C0);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}
.navbar a:hover::after {
    width: 100%;
}

/* 搜索框样式 */
.search-box input {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    outline: none;
}

/* 主内容容器，使用CSS Grid布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    padding: 100px 30px 30px 30px; /* 顶部留出导航栏空间 */
}

/* 侧边栏样式 */
.sidebar {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 主内容区样式 */
.main-content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 图片样式，添加圆角、阴影和悬浮效果 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* 文章标题样式 */
article h2, article h3, article h4 {
    color: #FF5E00;
    font-family: 'Playfair Display', serif;
    margin-top: 20px;
}

/* 正文段落样式 */
article p {
    font-size: 16px;
    margin: 15px 0;
}

/* 表格样式，区别于正文 */
article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
article table, article th, article td {
    border: 1px solid #F5E6C0;
}
article th, article td {
    padding: 10px;
    text-align: left;
    font-family: 'Courier New', monospace;
    background-color: #FFF8E1;
}
article pre {
    background-color: #F5E6C0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}
article code {
    font-family: 'Courier New', monospace;
    color: #D84315;
}

/* 按钮样式 */
.button {
    background: linear-gradient(to right, #FFA500, #FF4500);
    border: none;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    text-decoration: none;
}
.button:hover {
    background: linear-gradient(to right, #FF6347, #FFD700);
}

/* 提示信息样式 */
.prompt {
    text-align: center;
    font-size: 18px;
    color: #FF5E00;
    margin: 20px 0;
}

/* 折叠内容样式 */
.collapsible {
    background-color: #FF5E00;
    color: white;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    margin: 10px 0;
}
.active, .collapsible:hover {
    background-color: #FF8C00;
}
.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #FFF8E1;
    border-radius: 5px;
    margin-bottom: 10px;
}
.content p {
    margin: 10px 0;
}

/* 代码示例部分的特殊样式 */
.code-example {
    background-color: #F0F0F0;
    padding: 15px;
    border-left: 5px solid #FF5E00;
    margin: 20px 0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

