/* =========================================================
 * main.css — AI 工具资源中心 · 展示端
 * 风格：深色科技感 · 简洁明了 · 网格底纹 · 霓虹光效
 * ========================================================= */

:root {
  --bg-0: #070b14;
  --bg-1: #0b1220;
  --bg-2: #101a2e;
  --card: rgba(16, 26, 46, 0.72);
  --line: rgba(120, 160, 255, 0.14);
  --line-strong: rgba(0, 229, 255, 0.45);
  --text-0: #eaf2ff;
  --text-1: #a7b6d4;
  --text-2: #6c7ba0;
  --cyan: #00e5ff;
  --blue: #4d7cfe;
  --violet: #8b5cf6;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --font-display: "Orbitron", "Rajdhani", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Rajdhani", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景氛围 ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 55% at 50% -12%, rgba(77, 124, 254, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 88% 108%, rgba(0, 229, 255, 0.10), transparent 62%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
}
.bg-fx::before {   /* 网格底纹 */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.bg-fx::after {    /* 噪点 */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}
.glow-orb.a { width: 340px; height: 340px; background: rgba(0, 229, 255, 0.16); top: 8%; left: -6%; }
.glow-orb.b { width: 420px; height: 420px; background: rgba(139, 92, 246, 0.13); bottom: 4%; right: -8%; }

::selection { background: rgba(0, 229, 255, 0.28); }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.3);
}
.logo-name {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-0);
}
.logo-name em { font-style: normal; color: var(--cyan); }
.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 3px;
  font-family: var(--font-display);
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--text-1);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  position: relative;
}
.nav a:hover { color: var(--text-0); background: rgba(0, 229, 255, 0.08); }
.nav a.active { color: var(--cyan); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.admin-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px;
  color: var(--cyan) !important;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.06);
}
.admin-link:hover { background: rgba(0, 229, 255, 0.14); box-shadow: 0 0 14px rgba(0, 229, 255, 0.25); }

/* ---------- 页头横幅 ---------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 40px;  /** padding: 64px 24px 40px; **/
  position: relative;
}
.hero .crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 26px;
}
.hero .crumbs a { color: var(--text-2); text-decoration: none; transition: color .2s; }
.hero .crumbs a:hover { color: var(--cyan); }
.hero .crumbs i { font-style: normal; color: var(--text-2); font-size: 12px; }
.hero .crumbs .here { color: var(--cyan); }

.hero h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.25;
  background: linear-gradient(120deg, #ffffff 20%, var(--cyan) 55%, var(--blue) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub {
  margin-top: 14px;
  color: var(--text-1);
  font-size: 15px;
  max-width: 720px;
}
.hero .sub b { color: var(--cyan); font-weight: 600; }
.hero-stats {
  margin-top: 26px;
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
}
.hero-stats .stat span {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-2);
}

/* ---------- 搜索区 ---------- */
.search-zone {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 18px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  transition: border-color .25s, box-shadow .25s;
}
.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12), 0 0 22px rgba(0, 229, 255, 0.12);
}
.search-box svg { flex: none; color: var(--text-2); }
.search-box input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  color: var(--text-0);
  font-size: 14px;
  font-family: var(--font-body);
  padding: 8px 0;
}
.search-box input::placeholder { color: var(--text-2); }
.search-box button {
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 22px;
  border-radius: 999px;
  color: #04121c;
  font-weight: 600;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transition: transform .15s, box-shadow .2s;
}
.search-box button:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(0, 229, 255, 0.35); }

/* ---------- 分类标签 ---------- */
.cat-tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cat-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-1);
  font-size: 13.5px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all .22s;
  user-select: none;
}
.cat-tab .dot { font-size: 13px; color: var(--text-2); }
.cat-tab:hover { border-color: rgba(0, 229, 255, 0.4); color: var(--text-0); }
.cat-tab.active {
  color: #04121c;
  font-weight: 600;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 4px 18px rgba(0, 229, 255, 0.28);
}
.cat-tab.active .dot { color: #04121c; }

/* ---------- 工具列表 ---------- */
.tool-zone {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 24px 70px;
}
.zone-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.zone-tip {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin: -6px 0 22px;
  letter-spacing: 0.5px;
}
.zone-head h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 1px;
}
.zone-head h2 b { color: var(--text-0); font-weight: 700; }
.zone-head .count {
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 860px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  gap: 18px;
  transition: transform .22s, border-color .22s, box-shadow .22s;
  overflow: hidden;
}
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 14px 36px rgba(2, 8, 20, 0.6), 0 0 0 1px rgba(0, 229, 255, 0.08);
}
.tool-card:hover::before { opacity: 1; }

.tool-icon {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 22px;
  color: var(--cyan);
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.14), rgba(77, 124, 254, 0.10));
  border: 1px solid rgba(0, 229, 255, 0.22);
}

.tool-body { flex: 1; min-width: 0; }
.tool-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.tool-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: .3px;
}
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 1px;
  flex: none;
  transform: translateY(1px);
}
.badge.hot { color: #04121c; background: linear-gradient(135deg, #fbbf24, #f97316); }
.badge.rec { color: #04121c; background: linear-gradient(135deg, var(--cyan), var(--blue)); }
.badge.os  { color: #d8f9ef; background: rgba(52, 211, 153, 0.16); border: 1px solid rgba(52, 211, 153, 0.4); }

.tool-desc {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-meta {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12.5px;
  color: var(--text-2);
}
.tool-meta b { color: var(--text-1); font-weight: 600; margin-right: 3px; }

.tool-foot {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed rgba(120, 160, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tool-updated { font-size: 12px; color: var(--text-2); }
.btn-download {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 9px;
  color: #04121c;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.22);
  transition: transform .15s, box-shadow .2s;
  font-family: var(--font-body);
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 229, 255, 0.35); }

/* 空状态 */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty .e-ico { font-size: 34px; display: block; margin-bottom: 10px; opacity: .7; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.9);
  padding: 44px 24px 30px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; gap: 26px; } }
.footer-inner h4 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-1);
  margin-bottom: 14px;
}
.footer-inner p, .footer-inner a {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 7px;
  transition: color .2s;
}
.footer-inner a:hover { color: var(--cyan); }
.footer-brand { font-size: 15px !important; color: var(--text-0) !important; font-weight: 600; margin-bottom: 10px !important; letter-spacing: 1px; }
/* 页脚二维码（左图右文） */
.footer-qr .qr-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-qr .qr-img {
  flex: none;
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 12px;
  padding: 5px;
  background: #fff;
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform .2s, box-shadow .25s;
}
.footer-qr .qr-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.16), 0 0 22px rgba(0, 229, 255, 0.35);
}
.footer-qr .qr-text {
  font-size: 12.5px !important;
  color: var(--text-1) !important;
  line-height: 1.9;
  margin: 0 !important;
}
.footer-bottom {
  max-width: 1200px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-2);
}
.footer-bottom > :first-child { justify-self: start; }
.footer-bottom > :last-child { justify-self: end; }

/* 备案信息（底部居中，ICP + 公安并排） */
.icp-records {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.icp-record {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 12.5px;
  transition: color .2s;
}
.icp-record:hover { color: var(--cyan); }
.icp-record svg { flex: none; }
/* 公安备案图片图标（警徽风格，按高度缩放与文字对齐） */
.icp-record img.icp-img {
  flex: none;
  height: 14px;
  width: auto;
  max-width: 16px;
  object-fit: contain;
  border-radius: 2px;
  align-self: center;
}
.icp-sep { color: var(--text-2); opacity: .5; }
@media (max-width: 860px) {
  .footer-bottom { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-bottom > :first-child,
  .footer-bottom > :last-child { justify-self: center; }
  .icp-records { justify-self: center; }
}
.footer-bottom .f-ai {
  color: var(--cyan);
  letter-spacing: 2px;
  font-family: var(--font-display);
  font-size: 11px;
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(80px);
  background: rgba(10, 18, 34, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--text-0);
  font-size: 13.5px;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: all .3s;
  z-index: 99;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 入场动画 */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: riseIn .5s ease both; }

/* 下载量 +1 跳动反馈 */
.dl-count {
  color: var(--cyan);
  font-weight: 600;
  display: inline-block;
  transition: color .2s;
}
@keyframes dlBump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); color: #fff; text-shadow: 0 0 14px rgba(0, 229, 255, 0.9); }
  100% { transform: scale(1); }
}
.dl-bump { animation: dlBump .5s ease; }
