
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1E272E, #8BE9FD); /* 主色调渐变背景 */
  color: #BDC3C7; /* 辅色文字颜色 */
  transition: background 0.5s ease;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(30, 39, 46, 0.9); /* 半透明深蓝色背景 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 20px;
  margin: 0;
}

.navbar li {
  position: relative;
}

.navbar a {
  color: #8BE9FD; /* 辅助色链接颜色 */
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #BD93F9; /* 点缀色悬停效果 */
}

/* 多级菜单样式 */
.navbar li ul {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  background-color: #1E272E;
  padding: 10px;
  border-radius: 5px;
}

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

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

.navbar li ul li a {
  color: #BDC3C7;
}

/* 容器样式 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 100px 50px 50px 50px; /* 顶部留出导航栏空间 */
}

/* 卡片样式 */
.card {
  background: #2C3A47;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  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.2);
}

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

img:hover {
  transform: scale(1.05);
}

/* 按钮样式 */
.button {
  background: #8BE9FD;
  border: none;
  padding: 15px 30px;
  color: #1E272E;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.button:hover {
  box-shadow: 0 0 20px #8BE9FD;
  transform: scale(1.05);
}

/* 代码块样式 */
code {
  background: #1E272E;
  color: #8BE9FD;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
}

pre code {
  display: block;
  padding: 20px;
  background: #1E272E;
  border-radius: 10px;
  overflow-x: auto;
  position: relative;
}

/* CSS3 示例代码块样式 */
.code-block {
  background: #2C3A47;
  padding: 15px;
  border-radius: 8px;
  color: #8BE9FD;
  font-family: 'Courier New', Courier, monospace;
}

/* 渐变与动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 2s ease-in-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: center;
  }

  .navbar li ul {
    position: static;
    background: none;
    padding: 0;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 100px 20px 20px 20px;
  }

  .card {
    padding: 15px;
  }

  .button {
    width: 100%;
    text-align: center;
  }
}

/* 视觉引导区样式 */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  color: #BDC3C7;
  background: linear-gradient(135deg, #1E272E, #8BE9FD);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.gptkong.com/demo/sample1.png') center center / cover no-repeat;
  opacity: 0.1;
}

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

.active, .collapsible:hover {
  background-color: #1E272E;
}

.content {
  padding: 0 18px;
  display: none;
  background-color: #34495E;
  overflow: hidden;
}

.content.show {
  display: block;
}

/* 点缀色强调 */
.highlight {
  color: #BD93F9;
}

/* 链接样式 */
a {
  color: #8BE9FD;
  text-decoration: none;
}

a:hover {
  color: #BD93F9;
}

/* 包含CSS3代码示例的样式区分 */
.code-snippet {
  background: #1E272E;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  color: #8BE9FD;
  font-family: 'Courier New', Courier, monospace;
  margin: 20px 0;
}

/* 按钮悬停特效 */
.button:hover {
  box-shadow: 0 0 10px #8BE9FD;
  transform: translateY(-5px);
}

/* 过渡效果 */
.transition-elem {
  transition: all 0.3s ease-in-out;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  color: #BD93F9;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* 段落样式 */
p {
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 16px;
}

/* 列表样式 */
ul, ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

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

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

th {
  background-color: #1E272E;
  color: #8BE9FD;
}

/* 表单元素样式（若有） */
input, textarea, select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #BDC3C7;
  border-radius: 5px;
  background-color: #2C3A47;
  color: #BDC3C7;
  font-size: 16px;
}

input:focus, textarea:focus, select:focus {
  border-color: #8BE9FD;
  outline: none;
}

