* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', sans-serif;
}

body {
  background-color: #f9f3e9;
  color: #333;
  line-height: 1.6;
}

header {
  background-color: #8b0000;
  color: #f8f1e1;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.container {
  width: 90%;
  max-width: 2000px;
  margin: 0 auto;
}

/* 基础字体大小调整 */
html {
  font-size: 16px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;/* 适配移动端 */
}

/* 适配移动端 */
nav {
  transition: all 0.3s ease;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #f8f1e1;
  text-shadow: 3px 3px 3px #000;
  font-family: 'STXingkai', cursive; /* 添加这一行 */
  margin-right: 2rem; /* 增加右边距 */
  display: flex;
  align-items: center;
}

/* 为每个导航项添加单独的类名 */
.nav-item a {
  font-family: '楷体', 'KaiTi', serif; /* 使用楷体 */
  font-size: 1.5rem; /* 调整字体大小 */
  color: #f8f1e1;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.logo img {
  height: 50px;
  width: auto;
  object-fit: contain; /* 确保图片不会失真 */
}

nav ul {
  display: flex;
  list-style: none;
  margin-left: 1rem; /* 导航栏向左靠 */
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: #f8f1e1;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

nav ul li a:hover {
  background-color: #a52a2a;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
  .top-bar {
      text-align: center;
      padding: 0.3rem 0;
  }
  
  .navbar {
      padding: 0.8rem 1rem;
  }
  
  .navbar-brand-text {
      font-size: 1.4rem;
  }
  
  .navbar-menu {
      gap: 0.8rem;
  }
  
  .navbar-link {
      padding: 0.3rem 0.6rem;
      font-size: 0.9rem;
  }
}
/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-container {
      flex-direction: column;
      padding: 1rem;
  }
  
  .navbar-brand {
      margin-bottom: 1rem;
  }
  
  .navbar-menu {
      flex-wrap: wrap;
      justify-content: center;
  }
  
  .navbar-item {
      margin: 0.5rem;
  }
}

/* 移动端样式 */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  
  nav.active {
    max-height: 500px;
    padding: 1rem 0;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav ul li {
    margin: 0.8rem 0;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .logo img {
    height: 40px;
  }
}


/* ai部分 */
.ai-entry {
  position: fixed;
  bottom: 20px; /* 距离底部的距离 */
  right: 20px; /* 距离右侧的距离 */
  z-index: 1000; /* 确保图片在页面其他内容之上 */
  width: 60px; /* 图片宽度 */
  height: 60px; /* 图片高度 */
  border-radius: 50%; /* 如果需要圆形图片 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
  transition: transform 0.3s ease; /* 添加悬停效果 */
  background-image: url('../img/logo.png'); /* 图片路径 */
  background-size: cover; /* 确保图片覆盖整个区域 */
  background-position: center; /* 确保图片居中 */
  cursor: pointer; /* 添加鼠标悬停时的手型光标 */
}

.ai-entry:hover {
  transform: scale(1.1); /* 鼠标悬停时放大图片 */
}

.ai-entry::after {
  content: "AI助手"; /* 添加提示文字 */
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  color: #333;
  background-color: white;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-entry:hover::after {
  opacity: 1; /* 鼠标悬停时显示提示文字 */
}

/* 如果需要在小屏幕上调整logo大小 */
@media (max-width: 768px) {
  .logo img {
      width: 80px; /* 在小屏幕上减小logo大小 */
  }
}

/* 页脚样式 */
.footer {
  background-color: #f0e6d2; /* 使用与图中类似的背景颜色 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 2rem;
  color: #333;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo-img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-links h4, .footer-social h4, .footer-subscribe, .footer-contact h4 {
  margin-bottom: 1rem;
  color: #D4AF37; /* 金色点缀 */
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #333;
  text-decoration: none;
}

.footer-links a:hover {
  color: #D4AF37;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  color: #333;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #D4AF37;
}

.subscribe-form {
  display: flex;
  margin-top: 1rem;
}

.subscribe-input {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 4px 0 0 4px;
}

.subscribe-button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #B22222;
  color: white;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.color-strip {
  height: 20px;
  background: linear-gradient(to right, 
      #1a2639, #1e3a2c, #2c4639, #3e5c43, #50724d, 
      #668858, #7d9e64, #94b470, #acb97c, #c2be88, 
      #d6c394, #e9d8a0, #f9e6a0, #f4d37c, #e9bf58, 
      #ddab34, #d19710, #c58300, #b96f00, #ae5b00, 
      #a24700, #963300, #8a1f00, #7e0b00, #660000);
  margin-top: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-container {
      flex-direction: column;
      padding: 1rem;
  }
  
  .navbar-brand {
      margin-bottom: 1rem;
  }
  
  .navbar-menu {
      flex-wrap: wrap;
      justify-content: center;
  }
  
  .navbar-item {
      margin: 0.5rem;
  }
  
  .hero {
      height: 400px;
  }

  .hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }
  
  .hero h1 {
      font-size: 2.5rem;
      margin-bottom: 1rem;
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}
  
  .footer-content {
      grid-template-columns: 1fr;
  }
  
  .subscribe-form {
      flex-direction: column;
  }
  
  .subscribe-input {
      border-radius: 4px;
      margin-bottom: 0.5rem;
  }
  
  .subscribe-button {
      border-radius: 4px;
  }
}

@media (max-width: 600px) {
  .footer-content {
      grid-template-columns: 1fr;
  }
  
  .footer-contact address p {
      font-size: 0.9rem;
  }
}