
/* 定义根变量，便于主题颜色的统一管理 */
:root {
  --primary-color: #1E3A8A; /* 主色调，深蓝色，象征科技与专业 */
  --secondary-color: #D0D6F9; /* 辅色，银灰色，增加现代感 */
  --accent-color: #4F9EFF; /* 点缀色，霓虹蓝，用于强调元素 */
  --background-color: #F0F4FF; /* 页面背景色，避免纯白，提供温和的视觉体验 */
  --text-color: #333333; /* 主要文本颜色，确保可读性 */
  --card-bg-color: rgba(255, 255, 255, 0.1); /* 卡片背景，半透明 */
  --card-border: rgba(255, 255, 255, 0.2); /* 卡片边框颜色 */
  --shadow-color: rgba(0, 0, 0, 0.1); /* 阴影颜色，用于增加层次感 */
}

/* 全局样式设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  overflow-x: hidden; /* 防止水平滚动条 */
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  box-shadow: 0 2px 4px var(--shadow-color);
  z-index: 1000;
}

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

.navbar a:hover {
  color: var(--accent-color);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--primary-color);
  min-width: 160px;
  box-shadow: 0px 8px 16px var(--shadow-color);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: #ffffff;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: var(--accent-color);
}

.language-switch {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.language-switch:hover {
  transform: scale(1.1);
}

/* 主要内容区域的模块化布局 */
.modules {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 150px 50px 50px 50px; /* 顶部留出导航栏空间 */
}

.card {
  background-color: var(--card-bg-color);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  width: 300px;
  margin: 20px;
  padding: 20px;
  box-shadow: 0 4px 6px var(--shadow-color);
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  color: var(--accent-color);
  margin-bottom: 15px;
  font-size: 18px;
}

.card p {
  color: #ffffff;
  line-height: 1.6;
  font-size: 16px;
}

/* 动态背景样式 */
.background {
  position: relative;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(208, 214, 249, 0.8));
  overflow: hidden;
}

.background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: url('https://images.gptkong.com/demo/sample1.png') repeat;
  animation: moveBackground 10s linear infinite;
  opacity: 0.3;
}

@keyframes moveBackground {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-50%, -50%); }
  100% { transform: translate(0, 0); }
}

.dynamic-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, transparent, rgba(79, 158, 255, 0.5));
  animation: flowLines 15s linear infinite;
}

@keyframes flowLines {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

/* 图像样式处理 */
img.decorative {
  width: 320px;
  height: 320px;
  border-radius: 15px;
  box-shadow: 0 4px 8px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式 */
pre code {
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  display: block;
  font-family: 'Courier New', Courier, monospace;
  position: relative;
}

pre code::before {
  content: '代码示例';
  position: absolute;
  top: -20px;
  left: 0;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .modules {
    padding: 100px 30px 30px 30px;
  }

  .card {
    width: 45%;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 20px;
  }

  .modules {
    flex-direction: column;
    align-items: center;
    padding: 80px 20px 20px 20px;
  }

  .card {
    width: 80%;
  }

  .background {
    height: auto;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 10px 15px;
  }

  .navbar a {
    margin: 5px 0;
    font-size: 14px;
  }

  .dropdown-content {
    min-width: 120px;
  }
}

/* 提示信息的显著样式 */
.notice {
  text-align: center;
  padding: 20px;
  background-color: var(--accent-color);
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
}

/* 过渡效果优化 */
.fade-in {
  animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 图标微交互 */
.icon {
  width: 50px;
  height: 50px;
  background-image: url('https://images.gptkong.com/demo/sample2.png');
  background-size: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.icon:hover {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 10px var(--accent-color));
}

/* 仪表盘样式 */
.dashboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 50px;
  background-color: rgba(30, 58, 138, 0.9);
  border-radius: 15px;
}

.metric {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 10px;
  width: 200px;
  height: 150px;
  margin: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  box-shadow: 0 4px 8px var(--shadow-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.metric h4 {
  margin-bottom: 10px;
  font-size: 1.2em;
}

.metric p {
  font-size: 2em;
  font-weight: bold;
}

