
/* 基本样式设置 */
/* 设置全局字体、背景色和文字颜色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0d47a1 70%, #b0bec5 25%, #ff5722 5%);
    color: #ffffff;
    transition: all 0.3s ease;
}

/* 设置容器的最大宽度和居中显示 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.navbar a {
    color: #ffffff;
    margin: 0 15px;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff9800;
}

/* 主要内容区样式 */
.main-content {
    padding-top: 80px; /* 为固定导航栏留出空间 */
}

.article {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

/* 文章标题样式 */
.article h2, .article h3, .article h4 {
    color: #ffffff;
    margin-bottom: 15px;
}

/* 文章段落样式 */
.article p {
    color: #eceff1;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 代码块样式 */
.article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

/* 按钮样式 */
.button {
    background-color: #ff9800;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

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

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

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

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

/* 固定提示信息样式 */
.alert {
    background-color: rgba(255, 87, 34, 0.9);
    color: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 20px;
    border-radius: 5px;
    margin: 20px 0;
    animation: fadeIn 2s ease-in-out;
}

/* 章节导航样式 */
.chapter-nav {
    background: rgba(13, 71, 161, 0.8);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chapter-nav li {
    margin: 0;
}

.chapter-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
    background: #ff9800;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.chapter-nav a:hover {
    background: #ff5722;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.active, .collapsible:hover {
    background-color: #ff9800;
}

.content {
    padding: 0 18px;
    display: none;
    background-color: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 5px;
}

.content p {
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .chapter-nav ul {
        flex-direction: column;
    }

    .image-gallery {
        flex-direction: column;
        align-items: center;
    }

    .alert {
        font-size: 18px;
    }

    .article pre {
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

thead {
    background-color: #ff9800;
    color: #ffffff;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

tr:hover {
    background-color: rgba(255, 152, 0, 0.1);
}

/* 3D图表容器样式 */
.threejs-container {
    width: 100%;
    height: 600px;
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* 平滑过渡效果 */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

.slide-up {
    transform: translateY(20px);
    animation: slideUp 1s forwards;
}

