/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;

  /* 1920px设计稿自适应辅助函数 */
  /* 使用方法: px值转换为rem = 设计稿px值 / 100 */
  /* 例如: 设计稿64px = 0.64rem, 设计稿16px = 0.16rem */
  /* 计算公式: rem = px / 100 (因为在1920px下 1rem = 100px) */
}

html {
  scroll-behavior: smooth;
  /* 基于1920px设计稿的自适应方案 */
  /* 计算公式: font-size = (100vw / 1920) * 100 */
  /* 在1920px下: 1rem = 100px, 设计稿1px = 0.01rem */
  /* 使用clamp限制范围：最小50px(960px屏幕)，最大100px(1920px屏幕) */
  font-size: clamp(50px, 5.208333vw, 100px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #000000;
}

/* 图片优化样式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

/* 图片懒加载占位符 */
img:not(.loaded) {
  opacity: 0;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

img.loaded {
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

img.error {
  opacity: 0.9;
  background-color: rgba(255, 255, 255, 0.1);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 优化图片加载性能 */
img[loading="lazy"] {
  content-visibility: auto;
}

/* 首屏图片优先加载 */
img:not([loading]) {
  fetchpriority: high;
}




.title {
  font-weight: 700;
  font-size: 0.64rem;
  line-height: 100%;
  letter-spacing: 0.02rem;

}

/* 顶部栏 */
.top-bar {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-icon {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.search-icon:hover {
  color: #fff;
}

.user-icon {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: var(--transition);
}

.user-icon:hover {
  color: #fff;
}

/* 导航栏样式 */
.navbar {
  background-color: rgba(0, 0, 0, 0.9);
  position: sticky;
  top: 0;
  z-index: 1000;
  /* padding: 1rem 0; */
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo-placeholder {
  color: #fff;
  /* font-size: 1.5rem; */
  font-weight: bold;
  /* padding: 0 1rem; */
}

.nav-menu {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  list-style: none;
  width: 100%;
}

.nav-menu li {
  width: 1.6rem;
  height: 0.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 0.6rem;
  text-align: center;
}

.nav-link {
  width: 1.6rem;
  height: 0.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  /* padding: 0.5rem 1.5rem; */
  display: block;
  transition: var(--transition);
  font-size: 0.22rem;
  position: relative;

}

.nav-link:hover {
  color: #7a7a7a;
  background-color: #d9d9d9;
}

.nav-link.active {
  color: #7a7a7a;
  background-color: #d9d9d9;
}

/* .nav-link.active::after {} */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  gap: 4px;
  position: absolute;
  right: 20px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: var(--transition);
}



/* 渐变 */
.middle-bg1 {
  position: absolute;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(255, 255, 255, 0.1));
  background-image: url('../assets/shouye/shouye-mask1.png');
  background-size: cover;
  /* background-position: center; */
  background-repeat: no-repeat;
  top: 0;
}

.middle-bg2 {
  position: absolute;
  width: 100%;
  height: 116px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(255, 255, 255, 0.1));
  background-image: url('../assets/shouye/shouye-mask2.png');
  background-size: cover;
  /* background-position: center; */
  background-repeat: no-repeat;
  bottom: 0;
}

/* 悬浮高亮 */
.hover-highlight:hover {
  border: 1px solid #bdf2ef;
  box-shadow: 0 0 20px 0 rgba(169, 244, 240, 0.5);
  cursor: pointer;
}

/* 悬浮变大 */
.hover-bigger:hover {
  scale: 1.05;
  transition: scale 0.3s ease;
  cursor: pointer;
}

.hover-highlight-font:hover {
  color: #bdf2ef;
  cursor: pointer;
}

.green-mask-top {
  background-image: url('../assets/shouye/shouye-mask3.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 2rem;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.green-mask-bottom {
  background-image: url('../assets/shouye/shouye-mask4.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 2rem;
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
}

/* QR码和服务部分 */
.footer-qr-section {
  background-color: #ffffff;
  text-align: center;
  box-sizing: border-box;
  padding: 1rem 0 1.2rem;
  position: relative;
  height: 5.57rem;
}

.footer-qr-section .container {

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

}

.qr-title {
  font-size: 0.4rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.1rem;
}

.qr-subtitle {
  font-size: 0.28rem;
  color: #000;
  font-weight: 300;
  margin-bottom: 0.6rem;
}


.qr-code-img {
  width: 1.17rem;
  height: 1.17rem;
  min-width: 60px;
  min-height: 60px;
  margin-bottom: 0.15rem;
}


.qr-text {
  font-size: 0.16rem;
  color: #000;
}

.black-footer .container {
  height: 1.57rem;
}

/* ==================== 移动端响应式样式 ==================== */
@media (max-width: 768px) {

  /* 调整根字体大小，移动端使用更小的基准值 */
  html {
    font-size: clamp(37.5px, 10vw, 50px);
  }

  /* 容器内边距调整 */
  .container {
    padding: 0 0.4rem;
  }

  /* 导航栏移动端样式：与 PC 基本一致，保持横向排列，可滚动 */
  .navbar {
    padding: 0.12rem 0;
  }

  .nav-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu {
    position: static;
    width: auto;
    max-width: 100%;
    height: auto;
    background: transparent;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    padding: 0.1rem 0;
    box-shadow: none;
    left: 0;
    transition: none;
  }

  .nav-menu li {
    width: auto;
    height: auto;
    padding: 0;
    border: none;
  }

  .nav-link {
    width: 1rem;
    height: auto;
    padding: 0.2rem 0.1rem;
    font-size: 0.2rem;
    text-align: center;
    border: none;
    background: transparent;
  }

  /* 隐藏移动端汉堡按钮，直接展示导航 */
  .mobile-menu-toggle {
    display: none !important;
  }

  /* 顶部栏移动端 */
  .top-bar {
    padding: 0.1rem 0;
  }

  /* 页脚移动端 */
  .footer-section ul {
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
  }

  .footer-section ul li {
    font-size: 0.2rem;
  }

  /* QR码区域移动端 */
  .footer-qr-section {
    padding: 0.8rem 0 1rem;
    height: auto;
  }

  .qr-title {
    font-size: 0.32rem;
  }

  .qr-subtitle {
    font-size: 0.24rem;
    margin-bottom: 0.4rem;
  }

  .qr-code-img {
    width: 0.8rem;
    height: 0.8rem;
    min-width: 80px;
    min-height: 80px;
  }

  .qr-text {
    font-size: 0.14rem;
  }

  /* 通用：所有横向布局在移动端改为纵向 */
  .container {
    max-width: 100%;
  }
}