/* ============================================================
   图改大小 · 网站版样式（桌面优先 / Desktop First）
   ------------------------------------------------------------
   设计目标：PC 上打开就是「一个正经网站」，不是放大的手机页面。
     · 容器 1240px，四列工具卡
     · 全宽渐变 Hero + 居中大搜索框
     · 分类吸顶条（导航下方 72px 处）
     · 四栏页脚
   配色沿用小程序：主色 #6366F1 → #8B5CF6，页面底 #F7F8FC
   断点：960（平板）/ 720（手机）
   ============================================================ */

:root {
  --brand: #6366F1;
  --brand-2: #8B5CF6;
  --brand-soft: #EEF2FF;
  --bg: #F7F8FC;
  --card: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --line: #E9EDF5;
  --nav-h: 72px;
  --shadow: 0 1px 2px rgba(30, 41, 59, .04), 0 4px 14px rgba(30, 41, 59, .05);
  --shadow-hover: 0 10px 28px rgba(99, 102, 241, .16);
}

* { box-sizing: border-box; }

/* 🔴 hidden 属性必须真的隐藏。
   UA 样式表里的 [hidden]{display:none} 是「浏览器默认样式」，
   作者样式表里的 .file-row{display:flex} 会直接盖掉它 ——
   于是 <div class="file-row" hidden> 照样显示。必须用 !important 压住。 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== 顶部导航 ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 34px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .28);
}

.logo-text { font-size: 18px; font-weight: 700; letter-spacing: .5px; }

.menu { display: flex; gap: 28px; }
.menu a {
  font-size: 14.5px;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .16s, border-color .16s;
}
.menu a:hover { color: var(--brand); border-bottom-color: var(--brand); }

.nav-cta {
  margin-left: auto;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color .16s, color .16s, background .16s;
}
.nav-cta:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ==================== Hero ==================== */
.hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 62px 0 66px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  pointer-events: none;
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -190px; }
.hero::after  { width: 260px; height: 260px; left: -110px; bottom: -150px; }

.hero-inner { position: relative; z-index: 2; text-align: center; }

.hero-title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.25;
}

.hero-slogan {
  margin: 14px 0 0;
  font-size: 16.5px;
  opacity: .93;
}

/* 居中大搜索框 */
.hero-search {
  position: relative;
  max-width: 580px;
  margin: 30px auto 0;
  display: flex;
  align-items: center;
}

.hs-icon {
  position: absolute;
  left: 18px;
  width: 19px; height: 19px;
  color: #94A3B8;
  pointer-events: none;
}

.hero-search input {
  width: 100%;
  height: 54px;
  padding: 0 46px 0 50px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  font-size: 15.5px;
  color: var(--text);
  outline: none;
  box-shadow: 0 10px 30px rgba(30, 27, 75, .18);
  font-family: inherit;
}
.hero-search input::placeholder { color: #9AA6B8; }
.hero-search input::-webkit-search-cancel-button { display: none; }

.hs-clear {
  position: absolute;
  right: 14px;
  width: 24px; height: 24px;
  border: 0;
  border-radius: 50%;
  background: #DDE3EE;
  color: #64748B;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.hero-hot {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.hot-label { opacity: .8; margin-right: 2px; }

.hot-tag {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 13.5px;
  padding: 5px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.hot-tag:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .6); }

/* ==================== 分类吸顶条 ==================== */
.tabs {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}

.tabs-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 54px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  color: var(--muted);
  padding: 7px 15px;
  border-radius: 999px;
  transition: color .16s, background .16s;
  white-space: nowrap;
}
.tab:hover { color: var(--brand); background: var(--brand-soft); }
.tab.is-on { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

.tab-n {
  font-size: 11.5px;
  font-weight: 600;
  opacity: .7;
}
.tab.is-on .tab-n { opacity: .9; }

/* ==================== 分组 ==================== */
.group { scroll-margin-top: 140px; }

.sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 46px 0 18px;
}

.sec-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.sec-emoji { font-size: 17px; margin-right: 2px; }

.sec-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 10px;
  border-radius: 999px;
}

.sec-sub {
  margin-left: auto;
  font-size: 13px;
  color: #A8B3C4;
}

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

/* ==================== 工具卡片 ==================== */
.card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #C7D2FE;
  box-shadow: var(--shadow-hover);
}

.card:active { transform: translateY(-1px); }

.card-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
  line-height: 1;
}

.card-body { min-width: 0; padding-top: 1px; }
.card-name { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: .2px; }
.card-desc {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 六类图标底色 */
.si-ai     { background: #F3E8FF; }
.si-size   { background: #DBEAFE; }
.si-deco   { background: #FCE7F3; }
.si-doc    { background: #CCFBF1; }
.si-beauty { background: #FEF3C7; }
.si-av     { background: #E0E7FF; }

/* ==================== 最近使用 ==================== */
.recent .sec-head { margin-top: 36px; }
.recent-row { display: flex; flex-wrap: wrap; gap: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: border-color .16s, transform .16s;
  cursor: pointer;
}
.chip:hover { border-color: #C7D2FE; transform: translateY(-2px); }
.chip-icon { font-size: 16px; }

/* ==================== 空状态 ==================== */
.empty { margin: 80px auto; text-align: center; }
.empty-icon { font-size: 44px; }
.empty-title { margin: 14px 0 6px; font-size: 17px; font-weight: 600; }
.empty-desc { margin: 0; font-size: 14px; color: var(--muted); }

/* ==================== 页脚 ==================== */
.footer {
  margin-top: 72px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 42px;
  padding: 48px 24px 42px;
}

.f-brand .logo { margin-bottom: 14px; }
.f-desc { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; max-width: 320px; }

.f-col h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.f-col a {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  padding: 4px 0;
  transition: color .16s;
}
.f-col a:hover { color: var(--brand); }

.footer-bottom { border-top: 1px solid var(--line); }
.fb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  font-size: 13px;
  color: #94A3B8;
}
.fb-inner a { color: #94A3B8; }
.fb-inner a:hover { color: var(--brand); }

/* ==================== 响应式 ==================== */

/* 平板：3 列，Hero 收一点 */
@media (max-width: 960px) {
  .hero-title { font-size: 34px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .f-brand { grid-column: 1 / -1; }
}

/* 手机：2 列紧凑卡，导航收纳 */
@media (max-width: 719px) {
  :root { --nav-h: 58px; }

  .wrap { padding: 0 16px; }

  .menu { display: none; }
  .nav-cta { padding: 7px 14px; font-size: 13px; }

  .hero { padding: 38px 0 42px; }
  .hero-title { font-size: 24px; }
  .hero-slogan { font-size: 14px; margin-top: 10px; }
  .hero-search { margin-top: 22px; }
  .hero-search input { height: 48px; font-size: 15px; padding: 0 42px 0 44px; }
  .hs-icon { left: 15px; width: 17px; height: 17px; }
  .hero-hot { margin-top: 16px; gap: 8px; }
  .hot-tag { font-size: 12.5px; padding: 4px 12px; }

  .tabs-inner { height: 48px; gap: 4px; }
  .tab { font-size: 13.5px; padding: 6px 12px; }

  .sec-head { margin: 30px 0 14px; }
  .sec-title { font-size: 17px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 12px; gap: 10px; border-radius: 14px; }
  .card-icon { width: 38px; height: 38px; font-size: 19px; border-radius: 11px; }
  .card-name { font-size: 13.5px; }
  .card-desc { font-size: 11.5px; margin-top: 3px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; padding: 34px 16px 28px; }
  .fb-inner { flex-direction: column; gap: 6px; text-align: center; padding: 16px; }
}

/* 超窄：只留图标和名称 */
@media (max-width: 399px) {
  .card-desc { display: none; }
  .card { align-items: center; }
}
