
/* 
  页面整体样式设计
  本样式采用未来科技感为核心，通过冷色调与高饱和度色彩的结合，营造专业且具有未来感的视觉效果。
*/

/* 颜色变量定义 */
:root {
  --primary-color: #1a1a2e; /* 主色调 - 深蓝 */
  --secondary-color: #0f3460; /* 辅助色调 - 灰黑 */
  --accent-color: #e94560; /* 点缀色 - 亮橙色 */
  --background-gradient: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(15, 52, 96, 0.8));
  --text-color: #ffffff; /* 文字颜色 - 白色 */
  --highlight-color: #0ff; /* 高亮色 - 荧光绿 */
  --border-color: rgba(255, 255, 255, 0.1); /* 边框颜色 */
}

/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  background: var(--background-gradient);
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26, 26, 46, 0.9);
  padding: 15px 30px;
  z-index: 1000;
  transition: background 0.5s ease;
}

.navbar:hover {
  background: rgba(15, 52, 96, 1);
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.navbar ul li {
  position: relative;
}

.navbar ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
}

.navbar ul li ul {
  display: none;
  position: absolute;
  top: 35px;
  left: 0;
  background: var(--secondary-color);
  padding: 10px;
  border-radius: 5px;
}

.navbar ul li:hover ul {
  display: block;
}

.navbar ul li ul li {
  margin: 5px 0;
}

.navbar ul li ul li a {
  font-size: 14px;
}

/* 主容器样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px auto; /* 顶部预留导航栏空间 */
  padding: 20px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* 主要内容区块 */
.main-content {
  width: 65%;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 侧边栏区块 */
.sidebar {
  width: 30%;
  padding: 20px;
  background: rgba(15, 52, 96, 0.7);
  border-left: 2px solid var(--accent-color);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 模块样式 */
.module {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.module::before {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  margin-bottom: 10px;
}

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

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

/* 标题样式 */
h1, h2, h3, h4 {
  color: var(--highlight-color);
}

h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

/* 文章内容样式 */
article {
  margin-bottom: 40px;
}

article h2 {
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
}

article pre {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
}

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

/* 导航系统样式 */
.nav-system {
  position: fixed;
  right: 20px;
  top: 150px;
  background: rgba(26, 26, 46, 0.9);
  padding: 10px;
  border-radius: 10px;
}

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

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

.nav-system ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-system ul li a:hover {
  color: var(--accent-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .container {
    flex-direction: column;
  }

  .main-content, .sidebar {
    width: 100%;
  }

  .nav-system {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    gap: 10px;
  }

  .navbar ul li ul {
    position: static;
  }
}

/* 动画效果 */
@keyframes flow {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.data-flow {
  animation: flow 10s linear infinite;
}

/* CSS3代码块样式 */
.css-example {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 5px;
  margin: 20px 0;
  font-family: 'Courier New', Courier, monospace;
  color: #00ffcc;
}

/* 按钮样式 */
.button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
}

.button:hover {
  background: var(--highlight-color);
}

/* 点缀元素 */
.decorative-line {
  height: 2px;
  background: var(--accent-color);
  margin: 20px 0;
}

/* 卡片样式 */
.card {
  max-height: 100px;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background: rgba(15, 52, 96, 0.8);
  padding: 10px;
  border-radius: 5px;
}

.card.expanded {
  max-height: 500px;
}

.card-toggle {
  cursor: pointer;
  color: var(--highlight-color);
  text-align: right;
  padding: 5px 0;
}

/* 背景模糊效果 */
.main-background {
  background: var(--background-gradient);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
}

