
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用Roboto无衬线字体确保可读性 */
    color: #2c3e50; /* 主文本颜色为深蓝色，体现专业感 */
    background: linear-gradient(135deg, #2c3e50, #3498db); /* 渐变背景，增强视觉深度 */
    line-height: 1.6;
}

/* 响应式容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 固定导航栏样式 */
.fixed-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.9); /* 半透明背景 */
    padding: 10px 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fixed-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

.fixed-nav li {
    margin-left: 20px;
}

.fixed-nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.fixed-nav a:hover {
    color: #feb47b; /* 悬停时颜色变为橙色，吸引注意 */
}

/* 章节导航样式 */
.chapter-nav {
    margin-top: 80px; /* 避免被固定导航栏遮挡 */
    background: rgba(236, 240, 241, 0.8);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.chapter-nav li {
    margin-right: 15px;
}

.chapter-nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #3498db; /* 悬停时颜色变为蓝色，突出显示 */
}

/* 主要内容区域 */
main {
    margin-top: 20px;
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3, article h4 {
    color: #34495e; /* 标题颜色较深，突出显示 */
}

article p {
    margin-bottom: 1em;
    font-size: 16px;
}

article pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
    border-left: 4px solid #3498db;
}

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

/* 强调与高亮 */
.highlight {
    background-color: #f1c40f;
    padding: 2px 4px;
    border-radius: 3px;
    color: #2c3e50;
}

.emphasize {
    font-weight: bold;
    color: #e74c3c;
}

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

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

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 25px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.button:hover {
    background: linear-gradient(45deg, #feb47b, #ff7e5f);
}

/* 卡片式布局 */
.info-card {
    background: #ffffff;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 网格布局容器 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* 图表容器 */
.chart-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.chart-item {
    flex: 1 1 45%;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

/* 媒体查询以确保响应式 */
@media (max-width: 768px) {
    .chart-item {
        flex: 1 1 100%;
    }
    .fixed-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    .fixed-nav li {
        margin-left: 0;
        margin-bottom: 10px;
    }
}

/* 加载动画 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: auto;
    display: block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 150px;
    background-color: #34495e;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%; 
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 虚拟现实与增强现实卡片 */
.vr-ar-container {
    perspective: 1000px;
    margin: 20px 0;
}

.vr-ar-card {
    width: 100%;
    height: 200px;
    background: #2980b9;
    border-radius: 10px;
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.vr-ar-container:hover .vr-ar-card {
    transform: rotateY(180deg);
}

.vr-ar-front, .vr-ar-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    color: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vr-ar-back {
    background: #e74c3c;
    transform: rotateY(180deg);
}

/* 提示信息 */
.reference-note {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(44, 62, 80, 0.8);
    color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
}

