
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
  background: linear-gradient(135deg, #1e3c72 70%, #2a5298 70%); /* 主色调渐变背景 */
  color: #333;
  line-height: 1.6;
}

/* 响应式布局设置 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(10, 61, 98, 0.95); /* 深蓝色半透明背景 */
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.navbar a:hover {
  color: #ffa502; /* 亮橙色悬停效果 */
}

/* 英雄区域样式 */
.hero {
  height: 100vh;
  background: linear-gradient(135deg, #0a3d62, #1e3799);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  text-align: center;
  padding-top: 80px; /* 为固定导航栏预留空间 */
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
}

.cta-button {
  background-color: #ffa502; /* 亮橙色按钮 */
  color: #ffffff;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
  background-color: #e89e00;
  transform: scale(1.05);
}

/* 提示信息样式 */
.notice {
  background-color: #2a5298;
  color: #ffffff;
  padding: 10px 20px;
  text-align: center;
  font-size: 1em;
  position: relative;
  top: -20px;
  margin-bottom: -20px;
}

/* 面包屑导航样式 */
.breadcrumb {
  margin: 80px 0 20px 0;
  font-size: 0.9em;
  color: #555555;
}

.breadcrumb a {
  color: #1e3799;
  text-decoration: none;
  margin-right: 5px;
}

.breadcrumb a:hover {
  color: #ffa502;
}

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

article h2 {
  font-size: 2em;
  color: #0a3d62;
  margin-bottom: 10px;
}

article h3 {
  font-size: 1.6em;
  color: #1e3799;
  margin-top: 20px;
  margin-bottom: 10px;
}

article p {
  font-size: 1em;
  margin-bottom: 15px;
  color: #333333;
}

article pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

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

/* CSS代码示例样式 */
.code-example {
  background-color: #1e3799;
  color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  font-family: 'Courier New', Courier, monospace;
  margin: 20px 0;
  position: relative;
}

.code-example::before {
  content: "CSS 示例代码";
  position: absolute;
  top: -20px;
  left: 20px;
  background-color: #2a5298;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9em;
}

/* 卡片式布局 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 40px 0;
}

.card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.card img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid #e0e0e0;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  margin-top: 0;
  color: #1e3799;
}

.card-content p {
  color: #555555;
}

/* 图片样式 */
.image-decor {
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.image-decor:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 底部样式 */
.footer {
  background-color: #0a3d62;
  color: #ffffff;
  text-align: center;
  padding: 20px 0;
}

.footer a {
  color: #ffa502;
  text-decoration: none;
  margin: 0 10px;
}

.footer a:hover {
  text-decoration: underline;
}

/* 代码块样式 */
code {
  background-color: #f5f5f5;
  padding: 2px 4px;
  border-radius: 4px;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero h1 {
    font-size: 2.5em;
  }
  
  .cta-button {
    font-size: 1em;
    padding: 10px 20px;
  }
  
  .card-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .navbar a {
    margin: 10px 0;
  }
  
  .hero h1 {
    font-size: 2em;
  }
  
  .hero p {
    font-size: 1em;
  }
  
  .card-content h3 {
    font-size: 1.4em;
  }
}

