
/* =========================
   全局样式定义
   ========================= */
/* 使用box-sizing确保所有元素的padding和border都包含在元素的总宽度和高度中 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 设置基本的字体和背景颜色 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0A2D4F 70%, #E5E5E5 25%, #FF9900 5%);
  color: #333;
  line-height: 1.6;
}

/* 设置标题的字体和颜色 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lato', sans-serif;
  color: #0A2D4F;
  margin-bottom: 1rem;
}

/* 设置段落的间距 */
p {
  margin-bottom: 1.5rem;
  font-size: 16px;
}

/* 链接样式，内链添加nofollow */
a {
  color: #FF9900;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0A2D4F;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(10, 45, 79, 0.9);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar li {
  position: relative;
  margin: 0 15px;
}

.navbar li ul {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background-color: #fff;
  color: #000;
  list-style: none;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.navbar a {
  color: #fff;
  text-decoration: none;
  padding: 5px 0;
}

.navbar a:hover {
  color: #FF9900;
}

/* 主内容区域 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* 响应式布局 */
@media (min-width: 768px) {
  .container {
    grid-template-columns: 1fr 3fr;
  }
}

/* 文章样式 */
article {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

article h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

article h3 {
  font-size: 1.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

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

/* 代码块样式 */
article pre {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

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

img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 提示信息样式 */
.notice {
  background-color: #FF9900;
  color: #fff;
  padding: 10px 20px;
  text-align: center;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

/* 响应式字体大小调整 */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  p {
    font-size: 15px;
  }
}

/* 动画效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 按钮样式 */
.button {
  background-color: #FF9900;
  border: none;
  padding: 10px 20px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
}

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