
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0d1b2a 70%, #1b263b 25%, #415a77 5%);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  letter-spacing: 0.5px;
  overflow-x: hidden;
}

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

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

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

/* 侧边导航菜单 */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 200px;
  height: calc(100% - 60px);
  background-color: rgba(26, 35, 126, 0.9);
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  overflow-y: auto;
}

.sidebar a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  margin: 10px 0;
  font-size: 16px;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: #ffaa00;
}

/* 主内容区样式 */
.main-content {
  margin-left: 220px;
  padding: 80px 40px 40px 40px;
  background-color: rgba(0, 0, 0, 0.5);
}

/* 章节导航提示 */
.header-note {
  text-align: center;
  font-size: 18px;
  margin-bottom: 40px;
  color: #00aaff;
}

/* 文章内容样式 */
article h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #00aaff;
}

article h3 {
  font-size: 20px;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #ffaa00;
}

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

/* 代码块样式 */
code {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  color: #ffeb3b;
}

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

pre code.language-css {
  color: #00e676;
}

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

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

/* 卡片式设计 */
.card {
  background-color: rgba(30, 42, 56, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  padding: 20px;
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* 按钮样式 */
.button {
  background-color: #00aaff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #ffaa00;
}

/* 动态粒子效果 */
.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: #00aaff;
  border-radius: 50%;
  animation: move 5s infinite;
}

@keyframes move {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(500px, 500px);
    opacity: 0;
  }
}

/* 固定导航栏 */
.fixed-top {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  z-index: 999;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main-content {
    margin-left: 0;
    padding: 80px 20px 20px 20px;
  }
  .navbar, .fixed-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .navbar a, .sidebar a {
    margin: 10px 0;
  }
}

