
/* 全局样式初始化 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 设置网页背景及字体 */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #1B263B; /* 主色调深蓝 */
  color: #E8EAED; /* 文字颜色浅灰 */
  line-height: 1.6;
  padding: 20px;
  transition: background-color 0.3s, color 0.3s;
}

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1B263B; /* 深蓝背景 */
  padding: 15px 30px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .logo {
  height: 50px;
}

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

.navbar .nav-links a {
  color: #E8EAED;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s, transform 0.3s;
}

.navbar .nav-links a:hover {
  color: #00BCD4; /* 点缀色电光蓝 */
  transform: scale(1.05);
}

/* 章节导航系统 */
.chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 80px; /* 留出导航栏空间 */
  position: fixed;
  top: 100px;
  left: 20px;
}

.chapter-nav a {
  color: #00BCD4;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.chapter-nav a:hover {
  color: #2E7D32; /* 辅色墨绿 */
}

/* 主内容区布局 */
.container {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  grid-gap: 20px;
  margin-left: 250px; /* 预留章节导航空间 */
  margin-top: 100px; /* 预留导航栏空间 */
}

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

@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
    margin-left: 20px;
  }
}

/* 文章内容样式 */
article {
  background-color: #2E7D32; /* 墨绿背景 */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3, article h4 {
  color: #00BCD4;
  margin-bottom: 15px;
}

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

article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

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

article th, td {
  padding: 10px;
  text-align: left;
}

article pre {
  background-color: #1B263B;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

article code {
  color: #00BCD4;
}

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

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

.image-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0,0,0,0.5);
}

/* 提示信息样式 */
.prominent-message {
  background: linear-gradient(45deg, #2E7D32, #00BCD4);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  margin-bottom: 30px;
}

/* 折叠区域样式 */
.collapsible {
  background-color: #1B263B;
  color: #E8EAED;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  transition: background-color 0.3s;
}

.collapsible:hover {
  background-color: #2E7D32;
}

.content {
  padding: 0 15px;
  display: none;
  background-color: #2E7D32;
  overflow: hidden;
}

.content.show {
  display: block;
}

/* CSS3 示例代码样式 */
.css-example {
  background-color: #1B263B;
  padding: 20px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.css-example code {
  color: #00BCD4;
}

/* 环形进度条 */
.progress-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#00BCD4 0% 70%, #F5F5F5 70% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rotate 2s linear infinite;
  margin: 20px 0;
}

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

/* 数据安全遮罩 */
.secure-data {
  position: relative;
  color: transparent;
  background: linear-gradient(90deg, #00BCD4, #1B263B);
  -webkit-background-clip: text;
  background-clip: text;
}

.secure-data::after {
  content: '****';
  position: absolute;
  left: 0;
  top: 0;
  color: #1B263B;
  background-color: rgba(27, 38, 59, 0.5);
  width: 100%;
  height: 100%;
  mask: linear-gradient(to right, transparent, black);
  pointer-events: none;
}

/* 背景几何元素 */
.background-geometry {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.geometry-line {
  stroke: #00BCD4;
  stroke-width: 1;
  opacity: 0.2;
  animation: move 10s linear infinite;
}

@keyframes move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* 响应式图像调整 */
@media (max-width: 800px) {
  .chapter-nav {
    display: none;
  }
  .navbar .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

