/* ============================================================
   小婷智能辅助 - 全站样式（v4 · 参考他山科技官网）
   纯白底 + 浅灰卡片 + 单一品牌蓝 + 大字排版 + 大量留白
   ============================================================ */

:root {
  --blue: #0073ff;
  --blue-deep: #005fd6;
  --bg: #ffffff;
  --bg-gray: #f7f7f8;
  --text: #111111;
  --text-mid: #00000099;
  --text-dim: #00000066;
  --line: #00000029;
  --line-light: #00000014;
  --num-gray: #cccccc;
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--blue);
  color: #fff;
}

a {
  color: var(--blue);
  text-decoration: none;
}

code {
  background: var(--bg-gray);
  border: 1px solid var(--line-light);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.86em;
  font-family: Consolas, monospace;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-light);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  color: var(--text-mid);
  font-size: 0.93rem;
  padding: 4px 0;
  position: relative;
  transition: color 0.18s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a.active {
  color: var(--text);
  font-weight: 700;
}

/* 下划线：悬停从左滑出，当前页常驻 */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: right 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  right: 0;
}

/* ---------- 顶部阅读进度条 ---------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--blue);
  z-index: 200;
  pointer-events: none;
}

/* ---------- 首页横幅 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 130px 20px 110px;
  border-bottom: 1px solid var(--line-light);
}

/* 背景巨型装饰字（参考大厂官网的超大浅灰元素），随滚动视差移动 */
.hero::before {
  content: "TOOLS";
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) translateY(var(--hero-shift, 0px));
  will-change: transform;
  font-size: clamp(160px, 28vw, 380px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #f2f3f5;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 24px;
  animation: fadeUp 0.7s ease both;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--blue);
  opacity: 0.5;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.3rem);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 1.2;
  margin-bottom: 18px;
  animation: fadeUp 0.7s ease 0.08s both;
}

.hero h1 .grad-text {
  color: var(--blue);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  animation: fadeUp 0.7s ease 0.16s both;
}

.hero .search-box {
  margin: 44px auto 0;
  max-width: 540px;
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.7s ease 0.24s both;
}

.hero .search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 115, 255, 0.12);
}

.hero .search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 26px;
  font-size: 0.98rem;
  color: var(--text);
  background: transparent;
}

.hero .search-box input::placeholder {
  color: var(--text-dim);
}

.hero .search-box .search-icon {
  display: flex;
  align-items: center;
  padding-right: 22px;
  color: var(--text-dim);
}

/* 大数字统计（他山官网标志性手法） */
.hero .hero-stats {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(40px, 8vw, 96px);
  margin: 64px auto 0;
  max-width: 720px;
  animation: fadeUp 0.7s ease 0.32s both;
}

.hero .stat-item {
  text-align: center;
}

.hero .stat-number {
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--num-gray);
  letter-spacing: -0.02em;
}

.hero .stat-item:first-child .stat-number {
  color: var(--blue);
}

.hero .stat-label {
  font-size: 0.86rem;
  color: var(--text-mid);
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 工具区标题 ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 72px 0 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.3;
}

.section-head .section-en {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ---------- 分类筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 6px;
}

.filter-bar button {
  border: none;
  background: var(--bg-gray);
  color: var(--text-mid);
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-bar button:hover {
  color: var(--text);
  background: #eeeff2;
}

.filter-bar button.active {
  background: var(--text);
  color: #fff;
  font-weight: 700;
}

/* ---------- 工具卡片 ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  margin: 26px 0 100px;
}

.tool-card {
  background: var(--bg-gray);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: fadeUp 0.55s ease both;
}

/* 聚光灯：跟随鼠标的淡蓝光晕（--mx/--my 由 JS 更新） */
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 115, 255, 0.09),
    transparent 65%
  );
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

.tool-card:hover::after {
  opacity: 1;
}

.tool-card .tool-icon {
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.1) rotate(-6deg);
}

.tool-card .card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.tool-card .tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
}

.tool-card .tool-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.tool-card .tool-summary {
  font-size: 0.9rem;
  color: var(--text-mid);
  flex: 1;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card .card-actions {
  display: flex;
  gap: 10px;
}

.empty-tip {
  text-align: center;
  color: var(--text-dim);
  padding: 80px 0;
  grid-column: 1 / -1;
  font-size: 0.95rem;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 115, 255, 0.3);
}

.btn-outline {
  border-color: var(--line);
  color: var(--text-mid);
  background: transparent;
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--text);
}

.btn-lg {
  padding: 14px 42px;
  font-size: 1rem;
  border-radius: 12px;
}

/* ---------- 详情页 ---------- */
.detail-wrap {
  margin: 46px 0 90px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--text-mid);
}

.breadcrumb a:hover {
  color: var(--blue);
}

.detail-card {
  background: var(--bg-gray);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 20px;
}

.detail-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.detail-head .tool-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.detail-head .head-info {
  flex: 1;
  min-width: 220px;
}

.detail-head h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.detail-head .tool-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  font-size: 0.76rem;
  color: var(--text-mid);
  background: #fff;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
}

.download-area {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.download-area .file-info {
  font-size: 0.85rem;
  color: var(--text-mid);
}

.detail-card h2 {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-card p {
  margin-bottom: 10px;
  color: var(--text-mid);
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 8px 0 8px 30px;
  position: relative;
  color: var(--text-mid);
}

.feature-list li::before {
  content: "✔";
  color: var(--blue);
  font-weight: 700;
  position: absolute;
  left: 5px;
}

.sha-box {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text-mid);
  margin-top: 8px;
}

.changelog-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-item .cl-head {
  font-weight: 700;
  margin-bottom: 4px;
}

.changelog-item .cl-date {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-left: 10px;
}

.changelog-item ul {
  padding-left: 22px;
  color: var(--text-mid);
  font-size: 0.9rem;
}

/* ---------- 内容页（帮助/关于） ---------- */
.page-title {
  text-align: center;
  padding: 76px 20px 18px;
}

.page-title h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 3px;
}

.page-title p {
  color: var(--text-mid);
  margin-top: 8px;
}

.faq-item {
  background: var(--bg-gray);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.faq-item h3 {
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-item p,
.faq-item li {
  font-size: 0.91rem;
  color: var(--text-mid);
}

.faq-item ol,
.faq-item ul {
  padding-left: 22px;
  margin-top: 6px;
}

.content-section {
  margin: 40px 0 90px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line-light);
  background: var(--bg-gray);
  color: var(--text-dim);
  text-align: center;
  padding: 36px 20px;
  font-size: 0.82rem;
  line-height: 2;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--text-mid);
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* .reveal 会覆盖悬停上浮，这里恢复 */
.faq-item.reveal.visible:hover {
  transform: translateY(-2px);
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  .hero {
    padding: 80px 18px 70px;
  }

  .hero h1 {
    letter-spacing: 3px;
  }

  .hero .hero-stats {
    gap: 28px;
  }

  .main-nav {
    gap: 16px;
  }

  .main-nav a {
    font-size: 0.86rem;
  }

  .detail-card {
    padding: 26px;
  }

  .download-area .btn-lg {
    width: 100%;
  }

  .section-head {
    margin-top: 48px;
  }
}
