
/* 整体页面背景采用冷色调渐变，传递科技感与信任感 */
body {
  background: linear-gradient(135deg, #0f4c81, #1e88e5);
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  transition: background 0.5s ease-in-out;
}

/* 顶部导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 76, 129, 0.9);
  padding: 15px 30px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  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: #00c6ff;
}

/* 主内容区布局 */
.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  padding: 100px 30px 30px 30px;
}

/* 栅格系统中的单独模块 */
.grid-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.grid-item:hover {
  transform: scale(1.02);
  background: rgba(30, 136, 229, 0.2);
}

/* 标题样式 */
h2, h3 {
  font-family: 'Roboto', sans-serif;
  color: #ffffff;
  margin-bottom: 15px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

/* 段落文字样式 */
p {
  font-size: 16px;
  line-height: 1.6;
  color: #f0f0f0;
}

/* 代码块样式，与正文区分 */
pre {
  background: rgba(0, 0, 0, 0.8);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  margin-bottom: 20px;
}

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

/* 按钮样式 */
.button, .toggle-button, .key-button {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.button:hover, .toggle-button:hover, .key-button:hover {
  background: linear-gradient(45deg, #0072ff, #00c6ff);
  transform: scale(1.05);
}

/* 图片样式，圆角、阴影及悬浮效果 */
img {
  width: 100%;
  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:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 响应式设计：调整栅格布局 */
@media (max-width: 1200px) {
  .grid-item {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .grid-item {
    grid-column: span 12;
  }
}

/* 隐藏式内容的展开与收起 */
.hidden-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.hidden-content.open {
  max-height: 1000px;
}

/* 导航按钮样式 */
.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .navbar a {
    display: none;
  }
  .nav-toggle {
    display: block;
    cursor: pointer;
    color: #ffffff;
    font-size: 24px;
  }
  .navbar.active a {
    display: block;
    margin: 10px 0;
  }
}

/* 代码示例样式 */
.language-css {
  color: #00c6ff;
}

/* 页面过渡效果 */
.page-transition {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.page-transition.active {
  opacity: 1;
}

/* 强调按钮样式 */
.key-button {
  background-color: #ff9800;
  border-radius: 30px;
  padding: 12px 25px;
  font-size: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.key-button:hover {
  background-color: #fb8c00;
  transform: translateY(-2px);
}

.key-button:active {
  transform: translateY(0);
}

