
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-logo {
    font-size: 24px;
    color: #fff;
    font-weight: bold;
}

.navbar-menu {
    display: flex;
    gap: 20px;
}

.navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-menu a:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #ff9800;
    bottom: -5px;
    left: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    .hamburger {
        display: block;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}

/* 主内容区域 */
.main-content {
    padding: 100px 40px 40px 40px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.sidebar h3 {
    color: #ff9800;
    margin-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: #ff9800;
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

article h2, article h3, article h4 {
    color: #ff9800;
}

article p {
    color: #fff;
    margin-bottom: 15px;
}

article pre {
    background: #2a5298;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

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

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

/* 提示信息样式 */
.reference-note {
    background: rgba(255, 152, 0, 0.2);
    padding: 10px;
    border-left: 5px solid #ff9800;
    margin: 20px 0;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
}

/* 按钮样式 */
.btn-primary {
    background-color: #ff9800;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #fb8c00;
}

/* 代码示例样式 */
.code-example {
    background: #1e3c72;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.code-example code {
    color: #ff9800;
    font-family: 'Courier New', Courier, monospace;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 滚动触发 */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 样式引用部分 */
.highlight {
    color: #4caf50;
    font-weight: bold;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table, th, td {
    border: 1px solid #ff9800;
}

th, td {
    padding: 10px;
    text-align: left;
    color: #fff;
}

th {
    background-color: #0d47a1;
}

td pre {
    background: #2a5298;
    padding: 10px;
    border-radius: 4px;
}

