
/* 页面整体样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #2c3e50, #34495e); /* 背景渐变 */
    color: #ecf0f1; /* 正文字体颜色 */
}

/* 固定顶部导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(44, 62, 80, 0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 1000;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation a {
    color: #ecf0f1;
    margin: 0 15px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navigation a:hover {
    color: #e67e22;
}

/* 主要容器样式 */
.container {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    grid-gap: 20px;
    padding: 100px 30px 30px 30px; /* 顶部留出导航栏空间 */
}

/* 侧边栏样式 */
.sidebar {
    grid-column: 1 / 2;
    background-color: #2c3e50;
    padding: 20px;
    border-radius: 8px;
}

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

.sidebar img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.4);
}

/* 主内容区样式 */
.main-content {
    grid-column: 2 / 3;
    background-color: #34495e;
    padding: 20px;
    border-radius: 8px;
}

.main-content h2, .main-content h3 {
    color: #ecf0f1;
    margin-bottom: 10px;
}

.main-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #ecf0f1;
}

/* 高亮部分样式 */
.highlight-section {
    grid-column: 3 / 4;
    background-color: #16a085;
    padding: 20px;
    border-radius: 8px;
    animation: pulse 2s infinite; /* 脉冲动画效果 */
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 图片展示样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.4);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr 2fr;
    }

    .highlight-section {
        grid-column: 2 / 3;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar, .highlight-section {
        display: none;
    }
}

@media (max-width: 480px) {
    .navigation a {
        margin: 0 10px;
        font-size: 14px;
    }

    .main-content p {
        font-size: 15px;
    }
}

/* 按钮样式 */
.button-primary {
    background-color: #27ae60;
    border: none;
    padding: 10px 20px;
    color: #fff;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.button-primary:hover {
    background-color: #2ecc71;
}

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

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

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #16a085;
    color: #ecf0f1;
}

tr:nth-child(even) {
    background-color: #2c3e50;
}

tr:hover {
    background-color: #34495e;
}

/* 代码块样式 */
pre {
    background-color: #2c3e50;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

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

/* 工具提示样式 */
.tooltip {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translate(-50%, 20px);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
}

/* 交互动画 */
.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

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

/* 导航系统样式 */
.chapter-navigation {
    position: fixed;
    top: 60px;
    right: 30px;
    background-color: rgba(44, 62, 80, 0.9);
    padding: 15px;
    border-radius: 8px;
}

.chapter-navigation a {
    display: block;
    color: #ecf0f1;
    margin-bottom: 10px;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.chapter-navigation a:hover {
    color: #e67e22;
}

/* 结束语样式 */
.footer {
    background-color: #34495e;
    padding: 20px;
    text-align: center;
    color: #bdc3c7;
    position: relative;
    bottom: 0;
    width: 100%;
}

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