
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e3c72, #2a5298);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
  color: #ffffff;
  line-height: 1.6;
}

/* 渐变动画关键帧 */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(30, 60, 114, 0.9);
  display: flex;
  justify-content: space-around;
  padding: 15px 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar li {
  position: relative;
  margin: 0 15px;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  transition: background 0.3s ease, color 0.3s ease;
}

.navbar a:hover {
  background: rgba(255, 126, 95, 0.2);
  border-radius: 5px;
}

/* 多级菜单样式 */
.navbar li:hover > ul {
  display: block;
}

.navbar ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(30, 60, 114, 0.9);
  padding: 10px 0;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.navbar ul ul li {
  width: 150px;
  margin: 0;
}

.navbar ul ul a {
  padding: 10px 20px;
  display: block;
}

.navbar ul ul a:hover {
  background: rgba(255, 126, 95, 0.3);
}

/* 页面主体容器 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 20px;
}

/* 章节导航系统 */
.chapter-nav {
  position: fixed;
  top: 70px;
  right: 20px;
  background: rgba(30, 60, 114, 0.8);
  padding: 10px;
  border-radius: 5px;
}

.chapter-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-nav li {
  margin: 10px 0;
}

.chapter-nav a {
  color: #ff9472;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.chapter-nav a:hover {
  color: #ffffff;
}

/* 模块化展示容器 */
.modules-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* 每个模块的样式 */
.module {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.module:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.2);
}

/* 图片样式设置 */
.image {
  width: 100%;
  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:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0,0,0,0.5);
}

/* 标题样式 */
h2, h3, h4 {
  color: #ff7e5f;
  margin-top: 20px;
  font-weight: 700;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 18px;
}

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

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

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

/* 按钮与链接样式 */
.button, .link {
  background: linear-gradient(45deg, #ff7e5f, #feb47b);
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
}

.button:hover, .link:hover {
  background: linear-gradient(45deg, #ff9472, #ff7e5f);
  transform: scale(1.05);
}

/* 加载进度条样式 */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 5px;
  background: #ff7e5f;
  animation: loadProgress 3s forwards;
  z-index: 1001;
}

@keyframes loadProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* 面包屑导航样式 */
.breadcrumb {
  margin: 20px 0;
  font-size: 14px;
}

.breadcrumb a {
  color: #feb47b;
  text-decoration: none;
  margin-right: 5px;
}

.breadcrumb a::after {
  content: '>';
  margin-left: 5px;
}

/* 折叠区域样式 */
.collapsible {
  background-color: rgba(255, 126, 95, 0.2);
  color: white;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  border-radius: 5px;
  margin: 10px 0;
  transition: background 0.3s ease;
}

.collapsible:hover {
  background-color: rgba(255, 126, 95, 0.3);
}

.content {
  padding: 0 15px;
  display: none;
  background-color: rgba(255, 126, 95, 0.1);
  overflow: hidden;
  border-radius: 5px;
  transition: max-height 0.3s ease;
}

/* 样式示例代码块 */
.example-code {
  background: rgba(0,0,0,0.8);
  padding: 10px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
  color: #00ff00;
  margin: 20px 0;
}

/* 代码块内的代码高亮 */
.example-code code {
  display: block;
  white-space: pre-wrap;
}

/* 强调文本样式 */
strong, .highlight {
  font-weight: 700;
  color: #ff7e5f;
}

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

/* 动态数据可视化图表动画 */
@keyframes grow {
  to { width: 80%; }
}

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

@keyframes fillGauge {
  from { background: conic-gradient(#2a5298 0%, #ff7e5f 0%); }
  to { background: conic-gradient(#2a5298 75%, #ff7e5f 0%); }
}

/* 滚动动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
}

.scroll-section {
  min-height: 100vh;
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-section:nth-child(even) {
  background: rgba(30, 60, 114, 0.8);
}

/* 仪表盘自定义功能样式 */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.dashboard-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-item.dragging {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 推荐系统样式 */
.recommendation {
  opacity: 0;
  transform: translateX(50px);
  animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.recommendation:hover {
  background: rgba(255, 126, 95, 0.2);
  transition: background 0.3s ease;
}

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

thead {
  background: #2a5298;
  color: #fff;
}

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

tbody tr:hover {
  background: rgba(255, 126, 95, 0.1);
}

/* 动态载入效果 */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 60, 114, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeOut 2s forwards;
  z-index: 1002;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

