
/* 全局变量设置 */
:root {
  --primary-color: #1A237E; /* 深蓝色 */
  --secondary-color: #424242; /* 灰色 */
  --accent-color: #FF9800; /* 亮橙色 */
  --highlight-color: #00E676; /* 亮绿色 */
  --background-gradient: linear-gradient(135deg, #2196F3, #9C27B0);
  --font-family: 'Roboto', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--primary-color);
  color: #FFFFFF;
  line-height: 1.6;
  overflow-x: hidden; /* 防止横向滚动条 */
}

/* 容器布局 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  padding: 40px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(26, 35, 126, 0.9);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.navbar.scrolled {
  background-color: var(--primary-color);
}

.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s ease;
}

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

/* 面包屑导航样式 */
.breadcrumb {
  display: flex;
  list-style: none;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  border-radius: 4px;
  margin: 80px 40px 20px 40px; /* 确保不被导航栏遮挡 */
}

.breadcrumb li + li:before {
  content: ">";
  padding: 0 8px;
  color: #FFFFFF;
}

.breadcrumb li a {
  color: var(--accent-color);
  text-decoration: none;
}

.breadcrumb li a:hover {
  text-decoration: underline;
}

/* 文章内容样式 */
article {
  background-color: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3, article h4 {
  color: var(--accent-color);
}

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

article h3 {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
}

article p {
  font-size: 16px;
  margin-bottom: 15px;
}

/* 代码块样式 */
article pre {
  background-color: #2E2E2E;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

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

/* 卡片样式 */
.card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 16px rgba(0, 0, 0, 0.2);
}

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

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

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

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

/* 悬浮数据点 */
.data-point {
  width: 10px;
  height: 10px;
  background-color: var(--highlight-color);
  border-radius: 50%;
  position: absolute;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.data-point:hover {
  transform: scale(1.5);
  background-color: var(--accent-color);
}

/* 动画效果 */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.background-gradient {
  background: var(--background-gradient);
  animation: gradientAnimation 10s ease infinite;
}

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

.load-animation {
  animation: fadeIn 1s ease forwards;
}

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

  .breadcrumb {
    margin: 100px 20px 10px 20px;
  }

  .container {
    padding: 20px;
  }
}

