/* ===== 基础 reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family:
    "PingFang SC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  background: #f0f2f5;
  color: #1e293b;
  line-height: 1.7;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #e2e8f0;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ===== 顶部栏（手机端）===== */
#mobileHeader {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
#mobileHeader span {
  font-weight: 700;
  font-size: 1rem;
}
#mobileMenuBtn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  color: #fff;
  cursor: pointer;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  display: none;
}
.sidebar-overlay.show {
  display: block;
}

/* ===== 侧边栏 ===== */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #0f172a;
  color: #cbd5e1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 50;
  border-right: 1px solid #1e293b;
}
.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #1e293b;
}
.sidebar-brand {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}
.sidebar-subtitle {
  color: #64748b;
  font-size: 0.72rem;
  margin-top: 4px;
}
#sidebarNav {
  padding: 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
}
.nav-link.active {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
}
.nav-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
  opacity: 0.7;
  min-width: 14px;
  text-align: center;
}
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid #1e293b;
  font-size: 0.72rem;
  color: #475569;
}
.sidebar-footer a {
  color: #64748b;
  text-decoration: none;
}
.sidebar-footer a:hover {
  color: #94a3b8;
  text-decoration: underline;
}

/* ===== 主内容区 ===== */
#main {
  margin-left: 260px;
  min-height: 100vh;
  background: #f0f2f5;
}
.content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

/* ===== 封面区 ===== */
.hero {
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #9333ea);
  border-radius: 16px;
  padding: 48px 40px;
  color: #fff;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hero p {
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.88;
  position: relative;
  z-index: 1;
}

/* ===== 文章内容样式 ===== */
.content-wrap h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  line-height: 1.3;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.content-wrap h2 .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.content-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

/* ===== 步骤卡片 ===== */
.step-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.step-card:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}
.step-card p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== 提示框 ===== */
.tip-box {
  border-radius: 10px;
  padding: 16px 20px;
  margin: 14px 0;
  font-size: 0.88rem;
  line-height: 1.7;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tip-box .tip-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.tip-green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.tip-red {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.tip-yellow {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.tip-blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* ===== 链接按钮 ===== */

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* ===== 图片容器 ===== */
.img-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}
.img-wrap:hover {
  transform: translateY(-2px);
}
.img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== 视频容器 ===== */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== 方案卡片（海外）===== */
.solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.solution-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.solution-card:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}
.solution-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.solution-card p {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.6;
}

/* ===== 回到顶部按钮 ===== */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  z-index: 60;
}
#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
}
#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5);
}
#backToTop svg {
  width: 20px;
  height: 20px;
}

/* ===== 右上角 思酷素材 按钮（大屏固定定位）===== */
.top-right-btn {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 55;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.top-right-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.5);
}
/* 小屏时隐藏大屏版按钮 */
@media (max-width: 1023px) {
  .top-right-btn {
    display: none !important;
  }
}

/* ===== mobileHeader 内的 🏠 按钮（小屏专用）===== */
#mobileHomeBtn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
#mobileHomeBtn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ===== 页脚 ===== */
.page-footer {
  text-align: center;
  padding: 32px 20px;
  color: #94a3b8;
  font-size: 0.8rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 48px;
}
.page-footer a {
  color: #4f46e5;
  text-decoration: none;
}
.page-footer a:hover {
  text-decoration: underline;
}

/* ===== 响应式 ===== */
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #main {
    margin-left: 0 !important;
  }
  .content-wrap {
    padding: 20px 18px 60px;
  }
  #mobileHeader {
    display: flex !important;
  }
  .hero {
    padding: 32px 24px;
  }
  .hero h1 {
    font-size: 1.4rem;
  }
  .solution-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1024px) {
  #mobileHeader {
    display: none !important;
  }
}
@media (max-width: 1023px) {
  #main {
    padding-top: 56px;
  }
}
