/* =========================================================
 *  图了个豆工具箱 · 聚合站样式
 *
 *  视觉基调对齐 iOS：系统色板、连续大圆角、毛玻璃、
 *  轻描边 + 柔和多层投影，交互带一点点回弹。
 * ========================================================= */

:root {
  --bg: #f5f5f7;
  --bg2: #ffffff;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --line: rgba(60, 60, 67, .12);
  --line2: rgba(60, 60, 67, .06);

  --tx: #1c1c1e;
  --tx2: rgba(60, 60, 67, .62);
  --tx3: rgba(60, 60, 67, .34);

  --brand: #0a84ff;
  --brand-d: #0071e3;
  --brand-soft: rgba(10, 132, 255, .1);
  --ok: #34c759;
  --err: #ff3b30;
  --gold: #ff9f0a;

  --r: 20px;
  --r-sm: 12px;
  --r-lg: 28px;

  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 20px 50px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.32, .72, 0, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC",
        "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.01em;
}

/* 背景上铺两团很淡的光晕，比纯灰底有空气感 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 32rem at 18% -8%, rgba(10, 132, 255, .1), transparent 62%),
    radial-gradient(48rem 28rem at 92% 4%, rgba(255, 159, 10, .08), transparent 60%);
}

button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

/* 手绘图标统一尺寸，跟着文字颜色走 */
.ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -.14em;
  flex: none;
}

/* ---------------- 顶栏 ---------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 54px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 245, 247, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line2);
}
.logo { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; }
.logo-ic {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, #4aa4ff, var(--brand));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(10, 132, 255, .32);
}

.top-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--tx2); }
.top-nav > a { transition: color .2s; }
.top-nav > a:hover { color: var(--tx); }

.btn-primary {
  padding: 7px 17px;
  border: 0;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: transform .25s var(--ease), background .2s, box-shadow .2s;
  box-shadow: 0 2px 10px rgba(10, 132, 255, .26);
}
.btn-primary:hover { background: var(--brand-d); }
.btn-primary:active { transform: scale(.96); }
.btn-primary.big { width: 100%; padding: 13px; font-size: 16px; border-radius: 15px; }
.btn-primary:disabled { opacity: .5; box-shadow: none; cursor: default; transform: none; }

.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  font-size: 13px;
}

.me { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.me img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.me-ic {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(120, 120, 128, .14);
  color: var(--tx2);
  font-size: 17px;
}
.me-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 159, 10, .16);
  color: #b26a00;
  font-size: 12px;
  font-weight: 500;
}

/* ---------------- 面包屑（小工具页） ---------------- */

.crumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 0;
  color: var(--tx3);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.crumb a { color: var(--tx2); transition: color .2s; }
.crumb a:hover { color: var(--brand); }

/* ---------------- 小工具页的常见问题 ---------------- */

.tool-faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 32px;
}
.tool-faq h2 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.tf-item {
  padding: 16px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  background: var(--card);
}
.tf-item:last-child { margin-bottom: 0; }
.tf-item h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.tf-item p { margin: 0; color: var(--tx2); font-size: 13.5px; line-height: 1.65; }

/* ---------------- 首屏 ---------------- */

/* 工具会越来越多，首屏不留大标题，直接把工具列表顶上来 */
.hero { padding: 30px 20px 0; text-align: center; }

/* 标题给搜索引擎和第一次来的人交代一句，视觉上不抢戏 */
.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.022em;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 20px;
  color: var(--tx2);
  font-size: 15px;
  line-height: 1.6;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--tx2);
  font-size: 13px;
}
.hero-tags .ic { font-size: 15px; color: var(--brand); }

/* ---------------- 工具卡片 ---------------- */

.tools, .pricing { max-width: 1000px; margin: 0 auto; padding: 44px 20px; }
.tools h2, .pricing h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.pricing .sub { margin: 0 0 26px; color: var(--tx2); font-size: 15px; }
.tools h2 { margin-bottom: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 标题旁边的小注（如「不用登录 · 不限次数」） */
.h2-tag {
  padding: 4px 11px;
  border-radius: 99px;
  background: rgba(52, 199, 89, .12);
  color: #1f8a3d;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
}
/* 付费工具区的说明标签：同样式换蓝色，和免费小工具区做区分 */
.h2-tag.paid {
  background: rgba(10, 132, 255, .1);
  color: #0a6fd8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tool:not(.soon):hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool:not(.soon):active { transform: translateY(-1px) scale(.995); }

.tool-ic {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(10, 132, 255, .14), rgba(10, 132, 255, .06));
  color: var(--brand);
  font-size: 27px;
}
/* 免费小工具用绿色，和收费大工具的蓝色区分开 */
.tool-ic.mini {
  background: linear-gradient(160deg, rgba(52, 199, 89, .16), rgba(52, 199, 89, .06));
  color: #2aa14a;
}
.tool-name { margin-top: 15px; font-size: 17px; font-weight: 600; }
.tool-tag { margin-top: 6px; flex: 1; color: var(--tx2); font-size: 13.5px; line-height: 1.55; }
.tool-go {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 500;
}
.tool-go .go { font-size: 15px; transition: transform .35s var(--ease); }
.tool:hover .go { transform: translateX(4px); }

.tool.soon { opacity: .55; }
.tool.soon .tool-ic { background: rgba(120, 120, 128, .1); color: var(--tx2); }
.tool.soon .tool-go { color: var(--tx3); }

/* ---------------- 会员 ---------------- */

.price-card {
  max-width: 400px;
  padding: 34px 28px;
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow);
  text-align: center;
}
.price-num { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.price-num i { font-style: normal; font-size: 22px; font-weight: 600; }
.price-num b { font-size: 54px; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.price-num span { color: var(--tx2); font-size: 15px; }

.price-feat {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  text-align: left;
  color: var(--tx2);
  font-size: 14.5px;
}
.price-feat li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.price-feat .tick {
  width: 20px; height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: rgba(52, 199, 89, .14);
  color: var(--ok);
  font-size: 20px;
}

.price-tip { margin: 14px 0 0; color: var(--ok); font-size: 13px; }
.price-note { margin: 20px 0 0; color: var(--tx3); font-size: 13px; }

/* ---------------- 常见问题 ---------------- */

.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.faq-item {
  padding: 20px 22px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: var(--card);
}
.faq-item h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 600; }
.faq-item p { margin: 0; color: var(--tx2); font-size: 14px; line-height: 1.65; }

/* ---------------- 页脚 ---------------- */

.foot {
  padding: 36px 20px 48px;
  border-top: 1px solid var(--line2);
  color: var(--tx3);
  font-size: 13px;
  text-align: center;
}
.foot p { margin: 5px 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.foot-links a { transition: color .2s; }
.foot-links a:hover { color: var(--brand); }

/* ---------------- 弹窗 ---------------- */

.mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .24s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 370px;
  padding: 30px 26px;
  border-radius: var(--r-lg);
  background: var(--card-solid);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: pop .38s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.modal h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.modal-sub { margin: 0 0 20px; color: var(--tx2); font-size: 13.5px; }
.modal-tip { margin: 16px 0 0; color: var(--tx3); font-size: 12.5px; }

.close {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(120, 120, 128, .1);
  color: var(--tx2);
  font-size: 16px;
  transition: background .2s;
}
.close:hover { background: rgba(120, 120, 128, .2); }

/* iOS 分段控件 */
.months {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  padding: 2px;
  border-radius: 12px;
  background: rgba(120, 120, 128, .12);
}
.months button {
  flex: 1;
  padding: 8px 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--tx2);
  font-size: 14px;
  transition: background .25s var(--ease), color .2s;
}
.months button.on {
  background: #fff;
  color: var(--tx);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.qr { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.qr img { width: 200px; height: 200px; border-radius: 14px; }
.pay { min-height: 52px; }
.err { color: var(--err); font-size: 13px; }

.spin {
  width: 26px; height: 26px;
  border: 2.5px solid rgba(120, 120, 128, .18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 提示条 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 11px 20px;
  border-radius: 99px;
  background: rgba(28, 28, 30, .86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: pop .38s var(--ease);
}

/* ---------------- 深色模式 ---------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg2: #1c1c1e;
    --card: rgba(28, 28, 30, .72);
    --card-solid: #1c1c1e;
    --line: rgba(84, 84, 88, .5);
    --line2: rgba(84, 84, 88, .3);
    --tx: #f5f5f7;
    --tx2: rgba(235, 235, 245, .62);
    --tx3: rgba(235, 235, 245, .32);
  }
  .top { background: rgba(0, 0, 0, .66); }
  .months button.on { background: #48484a; color: #fff; }
  .close { background: rgba(120, 120, 128, .24); }
  .toast { background: rgba(58, 58, 60, .92); }
}

/* ---------------- 移动端 ---------------- */

/* 平板到窄桌面：顶栏先把间距收一收 */
@media (max-width: 820px) {
  .top { padding: 0 18px; }
  .top-nav { gap: 14px; }
}

@media (max-width: 640px) {
  .top {
    height: 52px;
    /* 刘海屏横屏时左右会被切掉，用安全区兜住 */
    padding: 0 max(14px, env(safe-area-inset-left)) 0 max(14px, env(safe-area-inset-right));
    gap: 10px;
  }
  .logo { font-size: 15px; min-width: 0; }
  .logo-ic { width: 28px; height: 28px; font-size: 17px; }
  .logo-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 顶栏塞不下三个锚点 + 登录按钮，锚点收掉。
     本身就是单页，往下滚就能看到各区块，页脚也有全部入口 */
  .top-nav { gap: 10px; flex: none; }
  .top-nav > a { display: none; }
  /* 小工具页顶栏没有登录按钮，两个链接留着，方便返回 */
  .top-nav.slim { gap: 14px; font-size: 13.5px; }
  .top-nav.slim > a { display: inline; }
  .btn-primary { padding: 7px 14px; font-size: 13.5px; }
  .me { gap: 6px; font-size: 13px; }
  .me-name { max-width: 72px; }

  .hero { padding: 20px 16px 0; }
  .hero h1 { font-size: 23px; }
  .hero-sub { margin-bottom: 16px; font-size: 14px; }
  .hero-tags { gap: 8px; }
  .hero-tags span { padding: 6px 12px; font-size: 12px; }

  .faq { grid-template-columns: 1fr; gap: 12px; }
  .faq-item { padding: 17px 18px; }
  .faq-item h3 { font-size: 15px; }
  .faq-item p { font-size: 13.5px; }

  .crumb { padding: 12px 16px 0; font-size: 12.5px; }

  .tool-faq { padding: 4px 16px 24px; }
  .tool-faq h2 { font-size: 17.5px; }
  .tf-item { padding: 14px 15px; }
  .tf-item h3 { font-size: 14px; }
  .tf-item p { font-size: 13px; }

  .grid { grid-template-columns: 1fr; gap: 12px; }
  .tool { padding: 18px; }
  .tool-ic { width: 44px; height: 44px; border-radius: 13px; font-size: 24px; }
  .tool-name { margin-top: 13px; font-size: 16px; }
  .tool-tag { font-size: 13px; }

  .tools, .pricing { padding: 26px 16px; }
  .tools h2, .pricing h2 { font-size: 21px; }
  .tools h2 { gap: 8px; margin-bottom: 18px; }
  .h2-tag { padding: 3px 9px; font-size: 11.5px; }
  .pricing .sub { font-size: 14px; }

  .price-card { padding: 26px 20px; border-radius: 22px; }
  .price-num b { font-size: 44px; }

  /* 弹窗在窄屏留够边距，二维码也小一点，别顶出屏幕 */
  .mask { padding: 16px; }
  .modal { padding: 26px 20px; border-radius: 22px; }
  .qr { min-height: 176px; }
  .qr img { width: 176px; height: 176px; }
  .months button { font-size: 13px; }

  .foot {
    padding: 30px 16px calc(34px + env(safe-area-inset-bottom));
  }
  .foot-links { gap: 12px 16px; }

  /* 提示条抬高一点，避开 iOS Safari 底部工具栏 */
  .toast { bottom: calc(28px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); }
}
