/* ============ ai1234.vip — 全局样式 ============ */
:root {
  --bg: #0a0b10;
  --bg-soft: #101219;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --text-dim: #9aa1b2;
  --text-faint: #6b7280;
  --accent: #7c6cff;
  --accent-2: #3ec5ff;
  --accent-3: #ff5ca8;
  --grad: linear-gradient(135deg, #7c6cff 0%, #3ec5ff 100%);
  --grad-warm: linear-gradient(135deg, #ff5ca8 0%, #ff9d5c 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-card: rgba(17, 20, 40, 0.03);
  --bg-card-hover: rgba(17, 20, 40, 0.06);
  --border: rgba(17, 20, 40, 0.1);
  --border-strong: rgba(17, 20, 40, 0.18);
  --text: #16181f;
  --text-dim: #565d6e;
  --text-faint: #8b93a5;
  --shadow: 0 8px 32px rgba(20, 24, 60, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* 背景光效 */
.aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 720px; height: 720px; border-radius: 50%;
  filter: blur(140px); opacity: 0.35;
}
html[data-theme="light"] .aurora::before,
html[data-theme="light"] .aurora::after { opacity: 0.16; }
.aurora::before { background: radial-gradient(circle, #7c6cff, transparent 65%); top: -280px; left: -160px; }
.aurora::after { background: radial-gradient(circle, #2a8fff, transparent 65%); top: -200px; right: -200px; }

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

/* ============ 导航栏 ============ */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 900;
  box-shadow: 0 4px 16px rgba(124, 108, 255, 0.4);
}
.logo span.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 6px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--text-dim);
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-card); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-dim); display: grid; place-items: center;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.menu-toggle { display: none; }

/* ============ Hero ============ */
.hero { padding: 84px 0 56px; text-align: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-card);
  font-size: 13px; color: var(--text-dim); margin-bottom: 24px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.18; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.sub { margin: 18px auto 0; max-width: 560px; color: var(--text-dim); font-size: 16px; }

.hero-search {
  margin: 32px auto 0; max-width: 640px; display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 20px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px); transition: border 0.2s, box-shadow 0.2s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.15); }
.hero-search svg { flex-shrink: 0; color: var(--text-faint); }
.hero-search input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-size: 15px; font-family: inherit; min-width: 0;
}
.hero-search input::placeholder { color: var(--text-faint); }
.hero-search button {
  border: none; border-radius: 999px; padding: 11px 26px; font-size: 14px; font-weight: 600;
  background: var(--grad); color: #fff; transition: transform 0.15s, box-shadow 0.2s;
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124, 108, 255, 0.45); }
.hero-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-tags button {
  border: 1px solid var(--border); background: transparent; color: var(--text-faint);
  padding: 5px 14px; border-radius: 999px; font-size: 13px; transition: all 0.2s;
}
.hero-tags button:hover { color: var(--text); border-color: var(--accent); }

/* ============ 区块通用 ============ */
section { padding: 44px 0; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.sec-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.sec-head .more { margin-left: auto; font-size: 14px; color: var(--text-dim); transition: color 0.2s; }
.sec-head .more:hover { color: var(--accent-2); }

/* ============ 精选轮播 ============ */
.featured { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.featured::-webkit-scrollbar { display: none; }
.f-card {
  scroll-snap-align: start; position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 26px; min-height: 180px;
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  transition: transform 0.25s, border-color 0.25s;
}
.f-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.f-card .f-bg { position: absolute; inset: 0; opacity: 0.5; z-index: -1; transition: opacity 0.25s; }
.f-card:hover .f-bg { opacity: 0.75; }
.f-card .f-tag { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.f-card h3 { font-size: 22px; font-weight: 700; }
.f-card p { font-size: 13.5px; color: var(--text-dim); }
.f-card .f-hot {
  position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--grad-warm); color: #fff;
}

/* ============ 分类快捷 ============ */
.cat-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 12px; }
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 6px; border-radius: var(--radius-sm); border: 1px solid transparent;
  color: var(--text-dim); font-size: 13px; transition: all 0.2s; text-align: center;
}
.cat-item:hover { background: var(--bg-card); border-color: var(--border); color: var(--text); transform: translateY(-2px); }
.cat-item .cat-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--accent-2);
}
.cat-item small { color: var(--text-faint); font-size: 11px; }

/* ============ 工具筛选与网格 ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim);
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.t-card {
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  backdrop-filter: blur(8px); transition: all 0.22s; position: relative; overflow: hidden;
}
.t-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 108, 255, 0.12), transparent 45%);
}
.t-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); box-shadow: var(--shadow); }
.t-card:hover::before { opacity: 1; }
.t-head { display: flex; align-items: center; gap: 12px; }
.t-logo {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; font-weight: 800; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c1, #7c6cff), var(--c2, #3ec5ff));
}
.t-head h3 { font-size: 16px; font-weight: 700; }
.price-tag { margin-left: auto; font-size: 11px; padding: 3px 9px; border-radius: 999px; font-family: var(--mono); }
.price-tag.free { color: #3ddc84; border: 1px solid rgba(61, 220, 132, 0.4); }
.price-tag.freemium { color: var(--accent-2); border: 1px solid rgba(62, 197, 255, 0.4); }
.price-tag.paid { color: #ffb45c; border: 1px solid rgba(255, 180, 92, 0.4); }
.t-card p { font-size: 13px; color: var(--text-dim); flex: 1; }
.t-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-foot .tag { font-size: 11.5px; color: var(--text-faint); padding: 3px 9px; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border); }
.t-foot .visit { margin-left: auto; font-size: 13px; color: var(--accent-2); display: inline-flex; align-items: center; gap: 4px; }
.t-card:hover .visit { text-decoration: underline; }
.empty-tip { grid-column: 1/-1; text-align: center; color: var(--text-faint); padding: 48px 0; }

/* ============ 动态预览 ============ */
.news-preview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.n-item {
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card);
  padding: 18px 20px; transition: all 0.2s; display: block;
}
.n-item:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); }
.n-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-faint); margin-bottom: 8px; }
.n-meta .n-date { font-family: var(--mono); }
.n-meta .n-tag { padding: 2px 9px; border-radius: 999px; background: rgba(124, 108, 255, 0.14); color: var(--accent); font-size: 11.5px; }
.n-item h3 { font-size: 15px; font-weight: 600; line-height: 1.5; }
.n-item p { margin-top: 6px; font-size: 13px; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ 页脚 ============ */
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 36px 0 48px; color: var(--text-faint); font-size: 13.5px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.foot-inner .foot-links { margin-left: auto; display: flex; gap: 20px; }
.foot-links a:hover { color: var(--text); }

/* ============ 动态页 ============ */
.news-hero { padding: 56px 0 8px; }
.news-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.news-hero p { color: var(--text-dim); margin-top: 8px; }
.pick-card {
  margin: 28px 0 8px; border-radius: 20px; padding: 30px; position: relative; overflow: hidden;
  border: 1px solid var(--border-strong); background: linear-gradient(135deg, rgba(124,108,255,0.14), rgba(62,197,255,0.08));
}
.pick-card .pick-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-2); font-family: var(--mono); }
.pick-card h2 { margin-top: 10px; font-size: 22px; font-weight: 700; }
.pick-card p { margin-top: 10px; color: var(--text-dim); max-width: 760px; }
.pick-card .n-meta { margin-top: 16px; margin-bottom: 0; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 10px; }
.timeline { margin-top: 16px; }
.tl-day { font-family: var(--mono); font-size: 14px; color: var(--text-faint); padding: 26px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.tl-day::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.load-more { display: block; margin: 34px auto; padding: 11px 34px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-dim); font-size: 14px; transition: all 0.2s; }
.load-more:hover { color: var(--text); border-color: var(--accent); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 12px 16px 16px; gap: 4px;
  }
  .menu-toggle { display: grid; }
  .hero { padding: 56px 0 36px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .news-preview { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-item { padding: 12px 4px; }
  .cat-item small { display: none; }
  .featured { grid-auto-columns: 82%; }
  section { padding: 30px 0; }
  .pick-card { padding: 22px; }
}
@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
  .hero-search button { padding: 10px 18px; }
}
