
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', sans-serif; /* 使用现代无衬线字体 */
  background: linear-gradient(135deg, #0d1b2a, #1b263b); /* 渐变背景，营造深色科技感 */
  color: #ffffff;
  line-height: 1.6;
  scroll-behavior: smooth; /* 平滑滚动效果 */
}

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

.navbar a {
  color: #00d2ff;
  text-decoration: none;
  font-size: 16px;
  padding: 10px 15px;
  transition: background 0.3s, color 0.3s;
}

.navbar a:hover {
  background-color: #00d2ff;
  color: #0d1b2a;
  border-radius: 5px;
}

/* 主要内容容器 */
.container {
  display: grid;
  grid-template-areas:
    'header'
    'main'
    'footer';
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding-top: 70px; /* 留出导航栏高度 */
}

/* 头部样式 */
.header {
  grid-area: header;
  text-align: center;
  padding: 40px 20px;
  background: rgba(27, 38, 59, 0.8);
}

.header h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.header p {
  font-size: 18px;
  color: #cfd8dc;
}

/* 文章内容样式 */
article {
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

article h2, article h3, article h4 {
  color: #00d2ff;
}

article pre {
  background: rgba(0, 210, 255, 0.1);
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px 0;
}

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

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

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

/* 代码块样式 */
.code-example {
  background: rgba(27, 38, 59, 0.9);
  padding: 20px;
  border-left: 5px solid #00d2ff;
  margin: 20px 0;
  border-radius: 5px;
}

.code-example code {
  display: block;
  white-space: pre-wrap;
  font-size: 14px;
  color: #ffeb3b;
}

/* 导航系统样式 */
.toc {
  position: fixed;
  top: 100px;
  right: 20px;
  background: rgba(27, 38, 59, 0.8);
  padding: 15px;
  border-radius: 8px;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc li {
  margin: 10px 0;
}

.toc a {
  color: #00d2ff;
  text-decoration: none;
  transition: color 0.3s;
}

.toc a:hover {
  color: #ffeb3b;
}

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

@media (max-width: 480px) {
  .header h1 {
    font-size: 28px;
  }
  
  .navbar a {
    font-size: 14px;
    padding: 8px 10px;
  }
}

/* 动态几何图形样式 */
.geometric-shape {
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(0, 210, 255, 0.2);
  border-radius: 50%;
  animation: moveShape 10s infinite alternate;
}

@keyframes moveShape {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(500px, 300px) rotate(360deg); }
}

/* 悬停动画效果 */
.button {
  background-color: #00d2ff;
  color: #0d1b2a;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.button:hover {
  background-color: #ffeb3b;
  transform: translateY(-5px);
}

/* 加载动画样式 */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #00d2ff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(27, 38, 59, 0.9);
}

thead {
  background-color: #00d2ff;
  color: #0d1b2a;
}

th, td {
  padding: 12px 15px;
  text-align: left;
}

tr:nth-child(even) {
  background-color: rgba(0, 210, 255, 0.1);
}

tr:hover {
  background-color: rgba(0, 210, 255, 0.2);
}

/* 折叠区域样式 */
.collapsible {
  background-color: rgba(27, 38, 59, 0.8);
  color: #00d2ff;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
}

.active, .collapsible:hover {
  background-color: #00d2ff;
  color: #0d1b2a;
}

.content {
  padding: 0 18px;
  display: none;
  background-color: rgba(27, 38, 59, 0.6);
  overflow: hidden;
}


