html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(to bottom, #0f172a, #1e293b);
  min-height: 100vh;
  padding-bottom: 60px; /* 为移动端固定底部栏预留空间 */
  /* 防止字体加载导致的布局跳动 */
  font-display: swap;
  /* 防止内容闪烁 */
  visibility: visible;
  opacity: 1;
  transition: none;
}

/* PC端不需要底部间距 */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.stats-gradient {
  background: linear-gradient(
    45deg,
    rgba(99, 102, 241, 0.1),
    rgba(79, 70, 229, 0.1)
  );
}

input:focus {
  outline: none;
}

/* 防止布局跳动的全局规则 */
* {
  box-sizing: border-box;
  /* 强制禁用所有元素的文本自动缩放 */
  -webkit-text-size-adjust: none !important;
  -ms-text-size-adjust: none !important;
  text-size-adjust: none !important;
}

/* 立即禁用iOS Safari文本自动缩放，防止字体跳动 */
* {
    -webkit-text-size-adjust: none !important;
    -ms-text-size-adjust: none !important;
    text-size-adjust: none !important;
}
html, body {
    -webkit-text-size-adjust: none !important;
    -ms-text-size-adjust: none !important;
    text-size-adjust: none !important;
}

img {
  max-width: 100%;
  height: auto;
  /* 防止图片加载导致的跳动 */
  display: block;
}

/* 防止字体加载导致的跳动 */
@font-face {
  font-display: swap;
}

/* 确保容器有固定尺寸 */
.container, .max-w-7xl {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* 移动端防跳动优化 */
@media (max-width: 768px) {
  body {
    /* 完全禁用iOS Safari的文本自动缩放 */
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
    /* 防止触摸时的高亮 */
    -webkit-tap-highlight-color: transparent;
    /* 确保固定布局 */
    position: relative;
    overflow-x: hidden;
  }
  
  /* 防止图片和内容跳动 */
  img, video, iframe {
    width: 100%;
    height: auto;
    vertical-align: top;
  }
}

/* 移动端优化样式 */
@media (max-width: 768px) {
  .mobile-nav-menu {
    display: none;
  }
  .mobile-nav-menu.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 1);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
  }
  .mobile-nav-menu a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
  }
  .mobile-nav-menu a:last-child {
    border-bottom: none;
  }
}

/* 移动端合作伙伴logo样式优化 */
@media (max-width: 480px) {
  .partner-logo {
    padding: 0 !important;
    height: 3rem !important;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .partner-logo {
    padding: 0.75rem !important;
  }
}

/* 蜂窝图样式 */
.honeycomb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  height: 100%;
  justify-content: center;
  gap: 15px;
}

.honeycomb-row {
  display: flex;
  gap: 20px;
}

.row-2 {
  margin: -15px 0;
}

.hexagon {
  width: 120px;
  height: 104px;
  background: var(--color);
  position: relative;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.hexagon:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.center-hex {
  transform: scale(1.1);
  z-index: 2;
}

.center-hex:hover {
  transform: scale(1.15);
}

.hexagon-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
}

.hexagon .number {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hexagon .label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
  line-height: 1.2;
}

.hexagon .sublabel {
  font-size: 12px;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.center-hex .number {
  font-size: 20px;
}

.center-hex .label {
  font-size: 16px;
}

/* 蜂窝图响应式设计 */
@media (max-width: 768px) {
  .hexagon {
    width: 115px;
    height: 100px;
  }
  
  .hexagon .number {
    font-size: 20px;
  }
  
  .hexagon .label {
    font-size: 12px;
    text-align: center;
    line-height: 1.1;
  }
  
  .hexagon .sublabel {
    font-size: 10px;
  }
  
  .center-hex .number {
    font-size: 24px;
  }
  
  .center-hex .label {
    font-size: 14px;
  }
  
  .honeycomb-row {
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .hexagon {
    width: 110px;
    height: 95px;
  }
  
  .hexagon .number {
    font-size: 16px;
    margin-bottom: 2px;
  }
  
  .hexagon .label {
    font-size: 10px;
    line-height: 1.1;
    margin-bottom: 1px;
    text-align: center;
  }
  
  .hexagon .sublabel {
    font-size: 8px;
  }
  
  .center-hex .number {
    font-size: 18px;
  }
  
  .center-hex .label {
    font-size: 11px;
  }
  
  .honeycomb-row {
    gap: 8px;
  }
  
  .honeycomb-container {
    gap: 10px;
  }
}

#kf-layer {
  position: fixed;
  width: 38px;
  height: 116px;
  right: 0;
  top: 50%;
  margin-top: -58px;
  z-index: 999;
}

#kf-layer > div {
  height: 38px;
  margin-bottom: 1px;
  background: url(/images/kf.png) no-repeat;
  position: relative;
}

#kf-layer > div.last {
  margin-bottom: 0;
}

#kf-layer .kf-phone {
  background-position: 0 0;
}

#kf-layer .kf-phone > div {
  height: 38px;
  width: 160px;
  overflow: hidden;
  line-height: 38px;
  padding: 0 7px;
  background: #3da7c1;
  color: #ffffff;
  position: absolute;
  right: 39px;
  display: none;
}

#kf-layer .kf-phone:hover {
  background-position: -38px 0;
}

#kf-layer .kf-phone:hover > div {
  display: block;
}

#kf-layer .kf-wx {
  background-position: 0 -38px;
}

#kf-layer .kf-wx > div {
  width: 98px;
  text-align: center;
  position: absolute;
  right: 39px;
  bottom: 0;
  background: #3da7c1;
  padding-top: 10px;
  padding-bottom: 5px;
  display: none;
}

#kf-layer .kf-wx img {
  width: 77px;
  height: 77px;
  margin-left: 9px;
}

#kf-layer .kf-wx p {
  color: #ffffff;
  font-size: 11px;
}

#kf-layer .kf-wx:hover {
  background-position: -38px -38px;
}

#kf-layer .kf-wx:hover > div {
  display: block;
}

#kf-layer .kf-top {
  background-position: 0 -77px;
}

#kf-layer .kf-top:hover {
  background-position: -38px -77px;
  cursor: pointer;
}