* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "微软雅黑", sans-serif;
}

:root {
  --bg-main: #e9ecef;
  --bg-card: #ffffff;
  --text-title: #1d1d1f;
  --text-body: #6e6e73;
  --text-light: #86868b;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --divider-color: #e5e5e5;

  --btn-blue: #007aff;
  --btn-green: #34c759;
  --btn-orange: #ff9500;
  --btn-teal: #5ac8fa;
  --btn-purple: #9c27b0;
  --btn-gradient: linear-gradient(to right, #007aff, #5ac8fa);

  --btn-radius: 8px;
  --btn-padding: 12px;
  --btn-font-size: 15px;
  --btn-gap: 10px;
  --btn-height: 44px;
  --section-side-margin: 15px;
  --navbar-height: 56px;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  background-color: var(--bg-main);
  padding: 20px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--section-side-margin);
}

.navbar {
  background-color: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 0 auto 20px;
  padding: 0 20px;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  animation-delay: 0.05s;
  max-width: 1140px;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--navbar-height);
  gap: 0;
}

.nav-item {
  flex: 0 1 auto;
}

.nav-link {
  display: inline-block;
  padding: 10px 30px;
  color: var(--text-title);
  font-size: 16px;
  text-decoration: none;
  border-radius: var(--btn-radius);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-link.active {
  background-color: var(--btn-blue);
  color: #fff;
}

.nav-link.active:hover {
  background-color: #0066cc;
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header {
  background-color: #FFFFFF;
  color: var(--text-title);
  text-align: center;
  padding: 25px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 0 auto 20px;
  max-width: 1140px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  animation-delay: 0.1s;
}

.header h1 {
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.header h1 .h1-icon {
  width: 1em !important;
  height: 1em !important;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 12px !important;
}

.header p {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text-body);
}

.header .header-buttons {
  display: flex;
  justify-content: center;
  gap: 0 !important; /* 直接去掉容器的gap，只用按钮自身的margin控制间距，避免叠加 */
  flex-wrap: wrap;
  padding: 0 10px !important;
  margin: 0 !important; /* 清除容器自身的外边距 */
}

/* 替换为参考样式的social-box（原qq-box） */
.header .social-box {
  background: rgba(0, 0, 0, 0.08) !important;
  color: var(--text-title) !important;
  padding: 8px 16px !important; /* 把左右padding从18px减到16px，按钮更紧凑 */
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important; /* 图标和文字的间距保留6px，不变 */
  font-size: 16px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  /* 关键：只保留上下8px的margin，左右仅2px（参考代码的紧凑间距），避免叠加 */
  margin: 0 2px 8px !important; 
  border: none !important; /* 清除可能的边框导致的额外宽度 */
}


.header .social-box:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

/* 替换为参考样式的social-icon（原qq-icon） */
.social-icon {
  width: 1em !important;
  height: 1em !important;
  object-fit: cover;
  border-radius: 4px !important;
  flex-shrink: 0;
  margin-right: 6px;
}

.row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  flex: 1 1 300px;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  display: flex;
  flex-direction: column;
  margin: 0 var(--section-side-margin);
}

.download {
  animation-delay: 0.2s;
}

.root-tool {
  animation-delay: 0.3s;
}

.ad {
  animation-delay: 0.4s;
}

.community {
  animation-delay: 0.5s;
}

@media (max-width: 768px) {
  .section {
    flex: 1 1 100%;
    margin-bottom: 20px;
  }

  .row {
    margin-bottom: 0;
  }

  .header-buttons {
    gap: 5px;
  }

  .header .social-box {
    padding: 8px 12px;
    font-size: 14px;
    margin: 2px auto;
  }

  .navbar {
    --navbar-height: 48px;
  }

  .nav-link {
    padding: 8px 20px;
    font-size: 14px;
  }
}

.section-title {
  font-size: 19px;
  color: var(--text-title);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider-color);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background-size: cover;
  opacity: 0.8;
  filter: invert(18%) sepia(0%) saturate(0%) hue-rotate(90deg) brightness(95%) contrast(90%);
}

.download .section-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
}

.root-tool .section-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'%3E%3C/path%3E%3C/svg%3E");
}

.ad .section-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M16 8v8'%3E%3C/path%3E%3Cpath d='M8 8v8'%3E%3C/path%3E%3C/svg%3E");
}

.community .section-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='9' cy='7' r='4'%3E%3C/circle%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'%3E%3C/path%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'%3E%3C/path%3E%3C/svg%3E");
}

.download-file {
  font-size: 16px;
  color: var(--text-title);
  margin-bottom: 10px;
}

.download-content,
.root-tool-content {
  background: #f5f5f7;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
  flex-grow: 1;
}

.download .features-list,
.root-tool .features-list,
.ad .features-list {
  list-style: none;
  margin: 10px 0;
  padding-left: 5px;
}

.download .features-list li,
.root-tool .features-list li,
.ad .features-list li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: 6px;
}

.download .features-list li::before,
.root-tool .features-list li::before,
.ad .features-list li::before {
  content: "✓";
  color: var(--btn-green);
  font-weight: bold;
}

.img-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.img-group img {
  width: 1em;
  height: 1em;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 2px;
}

.btn-group {
  display: flex;
  gap: var(--btn-gap);
  margin-top: 15px;
  width: 100%;
}

.btn-group .btn {
  flex: 1;
  padding: var(--btn-padding);
  border: none;
  border-radius: var(--btn-radius);
  color: #fff;
  font-size: var(--btn-font-size);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-height);
  min-width: 0;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-xunlei {
  background: var(--btn-blue);
}

.btn-xunlei:hover {
  background: #0066cc;
}

.btn-tutorial {
  background: var(--btn-green);
}

.btn-tutorial:hover {
  background: #2db84e;
}

.icon-download {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
  background-size: cover;
  vertical-align: middle;
}

.btn-ad {
  background: var(--btn-orange);
}

.btn-ad:hover {
  background: #e88900;
}

.btn-ed {
  background: #0066cc;
}

.btn-ed:hover {
  background: #0052aa;
}

.btn-tool-download {
  background: var(--btn-purple);
}

.btn-tool-download:hover {
  background: #8b2299;
}

.btn-tool-guide {
  background: var(--btn-teal);
}

.btn-tool-guide:hover {
  background: #4aa8e0;
}

.btn-qq-group {
  background: var(--btn-gradient);
}

.btn-qq-group:hover {
  background: linear-gradient(to right, #0066cc, #4bb8e6);
}

.btn-telegram {
  background: var(--btn-teal);
}

.btn-telegram:hover {
  background: #4aa8e0;
}

.community p {
  margin-bottom: 15px;
  font-size: 15px;
  color: var(--text-body);
  flex-grow: 1;
}

.footer {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-top: 15px;
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
  animation-delay: 0.6s;
  padding: 0 var(--section-side-margin);
}
/* 弹窗遮罩层样式 */
.popup-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none; /* 默认隐藏 */
}

/* 弹窗容器样式 */
.popup-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 1000;
  display: none; /* 默认隐藏 */
  width: 80%;
  max-width: 300px; /* 限制弹窗最大宽度 */
  overflow: hidden;
}

/* 弹窗关闭按钮样式 */
.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-body);
  padding: 5px;
}
.popup-close:hover {
  color: var(--text-title);
}

/* 区域1：图片样式（自适应比例） */
.popup-area1 {
  width: 100%;
}
.popup-area1 img {
  width: 100%;
  height: auto;
  display: block;
}

/* 区域2+3：按钮容器（平分宽度） */
.popup-btn-group {
  display: flex;
  width: 100%;
}

/* 弹窗功能按钮样式 */
.popup-btn {
  flex: 1; /* 各占50%宽度 */
  padding: 12px;
  border: none;
  background: var(--btn-blue);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.popup-btn:hover {
  background: #0066cc;
}
/* 第二个按钮区分颜色 */
.popup-btn-group .popup-btn:nth-child(2) {
  background: var(--btn-green);
}
.popup-btn-group .popup-btn:nth-child(2):hover {
  background: #2db84e;
}