/* ============================================================
   工具狗 v4 - labup 风格设计系统
   主色 #42b983 / 辅色 #35a6d6 / 白卡片 + 浅灰边框
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg2: #f8fbfa;
  --ink: #2c3e50;
  --muted: #53645b;
  --rule: #e8ecef;
  --accent: #42b983;
  --accent2: #35a6d6;
  --accent-soft: rgba(66, 185, 131, .1);
  --danger: #e74c3c;
  --grad: linear-gradient(135deg, #42b983, #35a6d6);
  --shadow-card: 0 2px 14px rgba(44, 62, 80, .08);
  --shadow-pop: 0 12px 36px rgba(16, 87, 58, .16);
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --bg: #10231c;
  --bg2: #0d1b16;
  --ink: #e4efe9;
  --muted: #9db3a8;
  --rule: #22382f;
  --accent-soft: rgba(66, 185, 131, .16);
  --shadow-card: 0 2px 14px rgba(0, 0, 0, .35);
  --shadow-pop: 0 12px 36px rgba(0, 0, 0, .5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* 保证 hidden 属性不被 display:flex 等样式覆盖（修复loading/占位元素隐藏失效） */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.75;
  min-height: 100vh;
  position: relative;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 480px at 85% -5%, rgba(66, 185, 131, .09), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgba(53, 166, 214, .07), transparent 60%);
  pointer-events: none;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: Consolas, 'Courier New', monospace; font-size: .88em; }
.text-vip { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-income { color: var(--accent); font-weight: 700; }
.text-expense { color: var(--danger); font-weight: 700; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* WCAG 2.4.7 键盘可达 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; text-decoration: none !important; line-height: 1.4;
  transition: all .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #37996d; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(66, 185, 131, .35); }
.btn-grad { background: var(--grad); color: #fff; }
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(66, 185, 131, .4); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: .88rem; }
.btn-xs { padding: 3px 10px; font-size: .8rem; border-radius: 3px; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ============ 头部 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
[data-theme="dark"] .site-header { background: rgba(16, 35, 28, .85); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad); color: #fff; font-size: 1rem;
}
.main-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border: 0; background: none;
  color: var(--ink); font-size: .95rem; font-weight: 500;
  font-family: var(--font); cursor: pointer; border-radius: var(--radius-sm);
}
.nav-link:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.caret { font-size: .7em; opacity: .6; }

.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s ease; z-index: 120;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a, .dropdown-menu .dropdown-logout {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: .92rem; text-decoration: none;
}
.dropdown-menu a:hover, .dropdown-menu .dropdown-logout:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.dropdown-count { font-size: .78rem; color: var(--muted); background: var(--bg2); padding: 1px 8px; border-radius: 10px; }
.dropdown-right { left: auto; right: 0; }
.dropdown-logout { width: 100%; border: 0; background: none; cursor: pointer; font-family: var(--font); }

.header-search { flex: 1; max-width: 420px; }
.search-form { position: relative; display: flex; }
.search-form input {
  width: 100%; padding: 9px 44px 9px 16px;
  border: 1px solid var(--rule); border-radius: 22px;
  background: var(--bg2); color: var(--ink); font-size: .92rem; font-family: var(--font);
  transition: all .18s ease;
}
.search-form input:focus { outline: none; border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--accent-soft); cursor: pointer; font-size: .9rem;
}
.search-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop); padding: 6px; z-index: 130;
}
.search-suggest a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink); font-size: .92rem;
}
.search-suggest a:hover { background: var(--accent-soft); text-decoration: none; }
.suggest-icon { font-size: 1.1em; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.theme-toggle {
  width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%;
  background: var(--bg2); cursor: pointer; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); }
.user-link { gap: 8px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: .82rem; font-weight: 700;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.3rem; }
.user-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ Hero ============ */
.hero { text-align: center; padding: 72px 0 48px; }
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }
.hero-sub { color: var(--muted); font-size: 1.05rem; margin: 14px 0 32px; }
.hero-search {
  display: flex; gap: 10px; max-width: 620px; margin: 0 auto 22px;
}
.hero-search input {
  flex: 1; padding: 15px 24px; font-size: 1.02rem;
  border: 1.5px solid var(--rule); border-radius: var(--radius-md);
  background: var(--bg); color: var(--ink); font-family: var(--font);
  box-shadow: var(--shadow-card); transition: all .2s ease;
}
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.chip-label { color: var(--muted); font-size: .88rem; }
.chip {
  padding: 6px 16px; border: 1px solid var(--rule); border-radius: 18px;
  background: var(--bg); color: var(--ink); font-size: .88rem;
  transition: all .18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* ============ 首页区块 ============ */
.home-section { margin: 40px 0; }
.section-title { font-size: 1.35rem; font-weight: 700; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.section-title a { color: var(--ink); text-decoration: none; }
.section-title a:hover { color: var(--accent); }
.section-more { font-size: .88rem; font-weight: 400; color: var(--muted) !important; }
.section-more:hover { color: var(--accent) !important; }
.vip-banner { margin: 56px 0; }
.vip-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 32px 36px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(66, 185, 131, .12), rgba(53, 166, 214, .1));
  border: 1px solid rgba(66, 185, 131, .25); flex-wrap: wrap;
}
.vip-banner-inner p { color: var(--muted); margin-top: 4px; }

/* ============ 卡片与工具网格 ============ */
.card {
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
}
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px; margin-top: 20px;
}
.tool-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; background: var(--bg);
  border: 1px solid var(--rule); border-radius: var(--radius-md);
  color: var(--ink); text-decoration: none;
  transition: all .2s ease;
}
.tool-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-pop);
  border-color: rgba(66, 185, 131, .45); text-decoration: none;
}
.tool-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--accent-soft); font-size: 1.4rem; flex-shrink: 0;
}
.tool-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tool-name { font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tool-desc {
  color: var(--muted); font-size: .84rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-badges { display: inline-flex; gap: 4px; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: .72rem; font-weight: 600; line-height: 1.6;
}
.badge-free { background: var(--accent-soft); color: var(--accent); }
.badge-vip { background: var(--grad); color: #fff; }
.badge-paid { background: #fdf0d5; color: #b45309; }
[data-theme="dark"] .badge-paid { background: rgba(245, 158, 11, .15); color: #fbbf24; }
.badge-new { background: rgba(53, 166, 214, .14); color: var(--accent2); }
.badge-hot { background: rgba(231, 76, 60, .1); color: var(--danger); }
.badge-muted { background: var(--bg2); color: var(--muted); }

/* ============ 面包屑 ============ */
.breadcrumb { display: flex; align-items: center; gap: 10px; padding: 20px 0 4px; color: var(--muted); font-size: .88rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ============ 分类页布局 ============ */
.category-layout { display: grid; grid-template-columns: 232px 1fr; gap: 32px; align-items: start; padding-bottom: 48px; }
.category-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.side-title { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.side-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: .92rem;
}
.side-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-count { font-size: .78rem; color: var(--muted); }
.side-vip { padding: 18px; background: var(--grad); border-radius: var(--radius-md); color: #fff; }
.side-vip b { font-size: 1rem; }
.side-vip p { font-size: .82rem; opacity: .9; margin: 6px 0 12px; }
.side-vip .btn { background: #fff; color: var(--accent); }
.side-vip .btn:hover { background: #f0faf6; }
.category-head h1 { font-size: 1.6rem; font-weight: 800; }
.category-head p { color: var(--muted); margin: 6px 0 8px; }
.empty-tip { color: var(--muted); }
.empty-tip a { color: var(--accent); }

/* ============ 分页 ============ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 36px 0; flex-wrap: wrap; }
.page-item {
  display: inline-block; padding: 8px 18px;
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  color: var(--ink); font-size: .92rem; background: var(--bg);
}
.page-item:hover:not(.disabled) { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-item.disabled { opacity: .45; }
.page-info { color: var(--muted); font-size: .9rem; }
.pagination .pagination { margin: 0; }
.pagination a, .pagination span { color: var(--ink); }
.pagination svg { display: none; }

/* ============ 工具详情页 ============ */
.tool-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; padding-bottom: 48px; }
.tool-main { padding: 26px; }
.tool-head { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.tool-icon-lg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: var(--radius-lg);
  background: var(--accent-soft); font-size: 2rem; flex-shrink: 0;
}
.tool-head h1 { font-size: 1.5rem; font-weight: 800; }
.tool-head .tool-desc { color: var(--muted); margin: 6px 0; }
.tool-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta-item { color: var(--muted); font-size: .84rem; }

.tool-placeholder { text-align: center; padding: 64px 24px; }
.placeholder-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.tool-placeholder h2 { font-size: 1.2rem; }
.tool-placeholder p { color: var(--muted); margin: 8px 0; }
.placeholder-tip a { font-weight: 600; }

.tool-paywall {
  margin-top: 24px; border-radius: var(--radius-md); overflow: hidden;
  background: linear-gradient(135deg, rgba(66, 185, 131, .08), rgba(53, 166, 214, .06));
  border: 1px dashed rgba(66, 185, 131, .4);
}
.paywall-inner { text-align: center; padding: 48px 24px; }
.paywall-icon { font-size: 2.6rem; display: block; margin-bottom: 8px; }
.paywall-inner h2 { font-size: 1.25rem; }
.paywall-inner > p { color: var(--muted); margin: 8px 0 20px; }
.paywall-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ============ 工具使用说明 ============ */
.tool-doc { margin-top: 30px; border-top: 1px solid var(--rule); padding-top: 22px; }
.tool-doc > h2 { font-size: 1.15rem; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.tool-doc-body { line-height: 1.85; font-size: .95rem; color: var(--ink); }
.tool-doc-body > :first-child { margin-top: 0; }
.tool-doc-body > :last-child { margin-bottom: 0; }
.tool-doc-body p { margin: 0 0 12px; }
.tool-doc-body h3 { font-size: 1rem; margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--accent); line-height: 1.4; }
.tool-doc-body ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tool-doc-body ul li { position: relative; padding-left: 24px; }
.tool-doc-body ul li::before { content: ''; position: absolute; left: 4px; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tool-doc-body ol { margin: 0 0 14px; padding-left: 20px; }
.tool-doc-body ol li { margin-bottom: 6px; }
.tool-doc-body a { color: var(--accent); font-weight: 600; }
.tool-doc-body pre {
  max-width: 100%; box-sizing: border-box;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .83rem; line-height: 1.75;
}
.tool-doc-body pre code { font-family: inherit; }
.tool-doc-body table { max-width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
@media (max-width: 600px) {
  .tool-doc-body { font-size: .92rem; line-height: 1.8; }
}

/* ============ 工具 FAQ ============ */
.tool-faq { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 20px; }
.tool-faq h2 { font-size: 1.15rem; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.tool-faq-list { display: flex; flex-direction: column; gap: 8px; }
.tool-faq-item { border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.tool-faq-item summary {
  cursor: pointer; list-style: none; padding: 11px 14px; font-weight: 600;
  color: var(--ink); display: flex; align-items: center; gap: 8px; font-size: .95rem;
}
.tool-faq-item summary::-webkit-details-marker { display: none; }
.tool-faq-item summary::before { content: "Q"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tool-faq-item[open] summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.tool-faq-item:not([open]) summary::after { content: "▸"; margin-left: auto; color: var(--muted); }
.tool-faq-item p { padding: 0 14px 12px 44px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.tool-faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.tool-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 20px; }
.side-card h2 { font-size: 1rem; margin-bottom: 12px; }
.benefit-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.benefit-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.benefit-list small { width: 100%; color: var(--muted); }
.related-list { display: flex; flex-direction: column; gap: 4px; }
.related-item {
  display: flex; gap: 10px; align-items: center; padding: 9px 10px;
  border-radius: var(--radius-sm); color: var(--ink);
}
.related-item:hover { background: var(--accent-soft); text-decoration: none; }
.related-icon { font-size: 1.2rem; }
.related-item b { display: block; font-size: .92rem; line-height: 1.4; }
.related-item small { color: var(--muted); font-size: .8rem; }
.side-safe p { color: var(--muted); font-size: .88rem; }

/* ============ 搜索页 ============ */
.search-head { text-align: center; padding: 28px 0 8px; }
.search-head h1 { font-size: 1.5rem; }
.search-head p { color: var(--muted); }
.search-page-form { display: flex; gap: 10px; max-width: 520px; margin: 18px auto 0; }
.search-page-form input {
  flex: 1; padding: 11px 18px; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-family: var(--font);
}
.search-page-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.empty-result { grid-column: 1 / -1; text-align: center; padding: 48px 0; }

/* ============ 认证页 ============ */
.auth-wrap { display: flex; justify-content: center; padding: 48px 0 72px; }
.auth-card { width: 100%; max-width: 420px; overflow: hidden; }
.auth-head {
  background: var(--grad); color: #fff;
  padding: 34px 32px 26px; text-align: center;
}
.auth-head h1 { font-size: 1.4rem; }
.auth-head p { opacity: .92; font-size: .92rem; }
.auth-form { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: .88rem; font-weight: 600; }
.form-field input {
  padding: 11px 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  background: var(--bg2); color: var(--ink); font-size: .95rem; font-family: var(--font);
  transition: all .18s ease;
}
.form-field input:focus { outline: none; border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-field input:disabled { opacity: .65; }
.field-error { color: var(--danger); font-size: .82rem; }
.form-row { display: flex; align-items: center; justify-content: space-between; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.auth-switch { text-align: center; font-size: .9rem; color: var(--muted); }
.auth-oauth { padding: 0 32px 28px; text-align: center; }
.auth-oauth p { color: var(--muted); font-size: .82rem; margin-bottom: 12px; }
.oauth-buttons { display: flex; justify-content: center; gap: 10px; }

/* ============ 用户中心 ============ */
.user-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; padding-bottom: 56px; }
.user-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.user-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; }
.user-card b { font-size: 1rem; }
.user-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.user-nav a {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: .94rem;
}
.user-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.user-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.user-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.page-title { font-size: 1.35rem; font-weight: 800; }
.user-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat-card { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: var(--muted); font-size: .84rem; }
.stat-value { font-size: 1.45rem; font-weight: 800; }
.stat-card small a { color: var(--accent); }
.form-card { padding: 26px; }
.form-card h2 { font-size: 1.08rem; margin-bottom: 16px; }
.form-card .btn { align-self: flex-start; }

.balance-hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 30px; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(66, 185, 131, .1), rgba(53, 166, 214, .08));
  border: 1px solid rgba(66, 185, 131, .25);
}
.balance-num { font-size: 2rem; font-weight: 800; display: block; }

/* ============ 表格 ============ */
.table-card { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; white-space: nowrap; }
.data-table th {
  color: var(--muted); font-weight: 600; font-size: .82rem;
  border-bottom: 1px solid var(--rule);
}
.data-table tr td { border-bottom: 1px solid var(--rule); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: var(--bg2); }
.empty-card { padding: 48px 24px; text-align: center; color: var(--muted); }

/* ============ VIP 定价 ============ */
.vip-head { text-align: center; padding: 32px 0 8px; }
.vip-head h1 { font-size: 1.7rem; font-weight: 800; }
.vip-head > p { color: var(--muted); margin-top: 8px; }
.vip-current { color: var(--accent); font-weight: 600; }
.vip-level-block { margin: 32px 0; }
.vip-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 16px; }
.vip-plan { position: relative; padding: 26px 24px; display: flex; flex-direction: column; gap: 12px; }
.vip-plan-best {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--grad) border-box;
  box-shadow: var(--shadow-pop);
}
.plan-tag {
  position: absolute; top: -11px; right: 16px;
  color: #fff; font-size: .74rem; font-weight: 700;
  padding: 2px 12px; border-radius: 10px;
}
.vip-plan h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 2px; }
.plan-currency { font-size: 1rem; font-weight: 700; }
.plan-price { font-size: 2rem; font-weight: 800; }
.plan-unit { font-size: .85rem !important; color: var(--muted); font-weight: 400; }
.plan-eq { color: var(--muted); font-size: .84rem; }
.plan-benefits { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; margin-bottom: 6px; }
.vip-faq { margin: 48px 0 64px; padding: 26px; }
.vip-faq h2 { font-size: 1.15rem; margin-bottom: 14px; }
.vip-faq details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.vip-faq summary { font-weight: 600; cursor: pointer; }
.vip-faq p { color: var(--muted); font-size: .92rem; padding: 8px 0 4px; }

/* ============ 充值 / 收银台 ============ */
.recharge-layout, .pay-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 24px;
  align-items: start; padding-bottom: 56px;
}
.recharge-card, .pay-card { padding: 28px; }
.recharge-card h1, .pay-card h1 { font-size: 1.35rem; margin-bottom: 8px; }
.recharge-balance { color: var(--muted); }
.recharge-balance b { color: var(--accent); font-size: 1.1rem; }
.recharge-section { font-size: 1rem; margin: 22px 0 12px; }
.recharge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.recharge-option {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 18px 12px; border: 1.5px solid var(--rule); border-radius: var(--radius-md);
  background: var(--bg); cursor: pointer; font-family: var(--font);
  transition: all .18s ease;
}
.recharge-option:hover { border-color: var(--accent); transform: translateY(-2px); }
.recharge-option.selected {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ro-price { font-size: 1.3rem; font-weight: 800; }
.ro-bonus { font-size: .8rem; color: var(--danger); font-weight: 600; }
.ro-bonus-none { visibility: hidden; }
.recharge-note { margin: 20px 0; color: var(--muted); font-size: .88rem; }
.recharge-side, .pay-tips { padding: 22px; position: sticky; top: 88px; }
.recharge-side h2, .pay-tips h2 { font-size: 1rem; margin-bottom: 14px; }

.pay-summary { border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 6px 18px; margin: 14px 0 22px; }
.pay-item { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.pay-item:last-child { border-bottom: 0; }
.pay-item span { color: var(--muted); }
.pay-item b { text-align: right; }
.pay-amount { color: var(--danger); font-size: 1.4rem; font-weight: 800; }
.gateway-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.gateway-option {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  border: 1.5px solid var(--rule); border-radius: var(--radius-md);
  cursor: pointer; transition: all .18s ease;
}
.gateway-option:hover { border-color: var(--accent); }
.gateway-option:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.gateway-option input { accent-color: var(--accent); width: 17px; height: 17px; }
.gw-icon { font-size: 1.3rem; }
.gw-info { display: flex; flex-direction: column; }
.gw-info small { color: var(--muted); }

.pay-done { max-width: 560px; margin: 56px auto; text-align: center; padding: 48px 32px; }
.done-icon { font-size: 3.2rem; }
.done-amount { font-size: 2.2rem; font-weight: 800; color: var(--accent); margin: 10px 0 4px; }
.done-subject { font-size: 1.05rem; font-weight: 600; }
.done-tip { color: var(--muted); font-size: .88rem; margin: 12px 0 26px; }
.done-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ============ 提示条 ============ */
.alert { padding: 12px 18px; border-radius: var(--radius-md); margin: 14px 0 0; font-size: .92rem; }
.alert-success { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(66, 185, 131, .3); }
.alert-info { background: rgba(53, 166, 214, .1); color: #2c8ab8; border: 1px solid rgba(53, 166, 214, .3); }
.alert-warning { background: #fdf6e3; color: #9a7d0a; border: 1px solid #f5e6b8; }
.alert-error { background: rgba(231, 76, 60, .08); color: var(--danger); border: 1px solid rgba(231, 76, 60, .25); padding: 12px 18px; margin: 0 0 18px; }
[data-theme="dark"] .alert-info { color: #7fc5e8; }
[data-theme="dark"] .alert-warning { background: rgba(245, 158, 11, .1); color: #fbbf24; }

/* ============ 页脚 ============ */
.site-footer {
  margin-top: 64px; border-top: 1px solid var(--rule);
  background: var(--bg2); padding: 44px 0 0;
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 1.05rem; }
.footer-brand p { font-weight: 400; color: var(--muted); font-size: .88rem; }
.footer-col h3 { font-size: .92rem; margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: .88rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center; padding: 18px 0; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .84rem;
}

/* ============ 反馈 FAB ============ */
.feedback-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 200;
  width: 54px; height: 54px; border: 0; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 1.35rem;
  cursor: pointer; box-shadow: var(--shadow-pop);
  transition: transform .2s ease;
}
.feedback-fab:hover { transform: scale(1.08); }
.feedback-panel {
  position: fixed; right: 26px; bottom: 92px; z-index: 200;
  width: min(320px, calc(100vw - 40px));
  background: var(--bg); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  padding: 20px; backdrop-filter: blur(10px);
}
.feedback-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.feedback-head button { border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); line-height: 1; }
.feedback-tip { color: var(--muted); font-size: .86rem; margin-bottom: 10px; }
.feedback-panel textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink);
  font-family: var(--font); resize: vertical; margin-bottom: 12px;
}
.feedback-panel textarea:focus { outline: none; border-color: var(--accent); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-side { position: static; }
  .recharge-layout, .pay-layout { grid-template-columns: 1fr; }
  .recharge-side, .pay-tips { position: static; }
}

@media (max-width: 860px) {
  .category-layout { grid-template-columns: 1fr; }
  .category-side { position: static; flex-direction: row; overflow-x: auto; }
  .side-nav { flex-direction: row; }
  .side-nav a { white-space: nowrap; }
  .user-layout { grid-template-columns: 1fr; }
  .user-side { position: static; flex-direction: row; align-items: center; }
  .user-nav { flex-direction: row; overflow-x: auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .header-inner { gap: 10px; height: 58px; }
  .brand-name, .main-nav, .user-name { display: none; }
  .header-search { max-width: none; }
  .hero { padding: 40px 0 32px; }
  .hero-search { flex-direction: column; }
  .btn { min-height: 44px; }
  .tool-card, .form-card, .tool-main, .recharge-card, .pay-card { padding: 16px; }
  .auth-form { padding: 20px; }
  .auth-oauth { padding: 0 20px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .paywall-actions .btn, .done-actions .btn { width: 100%; }
  .data-table th:nth-child(n+5), .data-table td:nth-child(n+5) { display: none; }
}


/* ============ Tabler Icons 适配 ============ */
.tool-icon i { font-size: 1.35rem; color: var(--accent); }
.tool-icon-lg i { font-size: 1.9rem; color: var(--accent); }
.placeholder-icon i { font-size: 3.4rem; color: var(--accent); }
.related-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--accent-soft); flex-shrink: 0; }
.related-icon i { font-size: 1.05rem; color: var(--accent); }

.dropdown-menu a, .dropdown-menu .dropdown-logout { justify-content: flex-start; }
.dropdown-count { margin-left: auto; }
.dd-icon { font-size: 1rem; color: var(--accent); margin-right: 2px; }
.theme-toggle i { font-size: 1.05rem; }
.search-form button { color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.search-form button i { font-size: 1rem; }
.suggest-icon { color: var(--accent); font-size: 1.05rem; }

.section-title { align-items: center; }
.section-title > i { font-size: 1.15rem; color: var(--accent); }
.section-title a { display: inline-flex; align-items: center; gap: 8px; }
.cat-icon { font-size: 1.15rem; color: var(--accent); }
.bc-icon { font-size: .95rem; color: var(--accent); margin-right: 4px; }
.h1-icon { font-size: 1.3rem; color: var(--accent); margin-right: 6px; vertical-align: -0.12em; }

.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip i { font-size: 1rem; color: var(--accent); }

.side-nav a { gap: 8px; }
.side-nav-icon { font-size: 1rem; color: var(--accent); }
.user-nav a { gap: 8px; }
.user-nav a i { font-size: 1rem; color: var(--accent); }
.user-nav a.active i, .side-nav a.active .side-nav-icon { color: var(--accent); }

.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item i { font-size: .95rem; }

.gw-icon i { color: var(--accent); font-size: 1.3rem; }
.done-icon i { color: var(--accent); font-size: 3.2rem; }
.paywall-icon i { color: var(--accent); }
.plan-benefits li { display: flex; align-items: baseline; gap: 8px; }
.plan-benefits i { color: var(--accent); font-size: 1rem; flex-shrink: 0; }
.recharge-note p, .side-safe p { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.recharge-note i, .side-safe i { color: var(--accent2); flex-shrink: 0; }
.side-vip b { display: inline-flex; align-items: center; gap: 6px; }
.side-vip b i { color: #ffd43b; }
.empty-result p, .empty-tip-line { display: flex; align-items: center; justify-content: center; gap: 8px; }
.empty-result i { color: var(--muted); font-size: 1.3rem; }
.user-empty { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.user-empty i { font-size: 1.2rem; color: var(--accent); }
.benefit-list b i { color: var(--accent); margin-right: 2px; }


/* ============ 工具运行页 ============ */
.tool-run { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.tool-run-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.tool-run-title { display: flex; gap: 14px; align-items: center; }
.tool-run-title h1 { font-size: 1.5rem; margin: 0 0 4px; }
.tool-run-title p { margin: 0; color: var(--muted); font-size: .92rem; }
/* 桌面端运行页顶部操作按钮（工具介绍/收藏）：紧邻成组、垂直居中 */
.tool-run-header > .btn { flex-shrink: 0; }
.tool-run-header > .btn + .btn { margin-left: 2px; }

/* 二维码生成器 */
.qr-run-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.qr-panel { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px; }
.qr-section { margin-bottom: 18px; }
.qr-section:last-child { margin-bottom: 0; }
.qr-section h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .95rem; margin: 0 0 12px; color: var(--ink); }
.qr-section h3 > span { display: inline-flex; align-items: center; gap: 6px; }
.qr-section h3 i { color: var(--accent); }
.qr-type-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-type-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg2); color: var(--muted); font-size: .88rem; cursor: pointer; transition: all .15s ease; }
.qr-type-btn i { font-size: .95rem; }
.qr-type-btn:hover { border-color: var(--accent); color: var(--accent); }
.qr-type-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.qr-form-group { margin-bottom: 14px; }
.qr-form-group:last-child { margin-bottom: 0; }
.qr-form-group label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.qr-form-group input[type="url"], .qr-form-group input[type="text"], .qr-form-group input[type="email"], .qr-form-group input[type="tel"], .qr-form-group textarea, .qr-form-group select { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: .9rem; box-sizing: border-box; }
.qr-form-group input:focus, .qr-form-group textarea:focus, .qr-form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.qr-form-group input[type="range"] { width: 100%; accent-color: var(--accent); }
.qr-color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qr-color-group { display: flex; gap: 8px; }
.qr-color-group input[type="color"] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; }
.qr-color-group input[type="text"] { flex: 1; min-width: 0; }
.qr-preview-box { min-height: 380px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border: 1px dashed var(--rule); border-radius: var(--radius-sm); padding: 20px; }
.qr-preview-tip { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.qr-preview-tip i { font-size: 1.2rem; color: var(--accent); }
.qr-actions { display: flex; gap: 10px; margin-top: 16px; }
.qr-actions .btn { flex: 1; justify-content: center; }

/* 图片压缩 */
.ic-run-grid { display: grid; grid-template-columns: 400px 1fr; gap: 20px; align-items: start; }
.ic-panel { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px; }
.ic-section { margin-bottom: 18px; }
.ic-section:last-child { margin-bottom: 0; }
.ic-section h3 { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin: 0 0 12px; }
.ic-section h3 i { color: var(--accent); }
.ic-upload { border: 2px dashed var(--rule); border-radius: var(--radius-md); padding: 34px 16px; text-align: center; cursor: pointer; transition: all .2s ease; background: var(--bg2); }
.ic-upload:hover, .ic-upload.dragover { border-color: var(--accent); background: var(--accent-soft); }
.ic-upload i:first-child { font-size: 2.2rem; color: var(--accent); }
.ic-upload p { margin: 10px 0 6px; font-weight: 600; color: var(--ink); }
.ic-hint { font-size: .8rem; color: var(--muted); }
.ic-form-row { margin-bottom: 14px; }
.ic-form-row > label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.ic-form-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.ic-form-row select { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: .9rem; }
.ic-slider-hints { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.ic-mode-tabs { display: flex; gap: 6px; }
.ic-mode-tab { flex: 1; padding: 8px 4px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg2); color: var(--muted); font-size: .85rem; cursor: pointer; transition: all .15s ease; }
.ic-mode-tab:hover { border-color: var(--accent); }
.ic-mode-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ic-input-group { display: flex; align-items: center; gap: 8px; }
.ic-input-group input { flex: 1; padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: .95rem; }
.ic-input-unit { color: var(--muted); font-size: .9rem; }
.ic-input-desc { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.ic-strength-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ic-strength-btn { padding: 8px 6px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg2); cursor: pointer; text-align: center; transition: all .15s ease; }
.ic-strength-btn .strength-name { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); }
.ic-strength-btn .strength-desc { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.ic-strength-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.ic-strength-btn.active .strength-name { color: var(--accent); }
.ic-actions { display: flex; gap: 10px; }
.ic-actions .btn { flex: 1; justify-content: center; }
.ic-file-list { display: flex; flex-direction: column; gap: 12px; max-height: 640px; overflow-y: auto; }
.ic-empty-tip { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); padding: 40px 0; font-size: .9rem; }
.ic-empty-tip i { font-size: 1.3rem; color: var(--accent); }
.ic-file-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg2); }
.ic-file-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg); flex-shrink: 0; }
.ic-file-info { flex: 1; min-width: 0; }
.ic-file-name { font-size: .88rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-file-meta { font-size: .78rem; color: var(--muted); margin: 2px 0 6px; }
.ic-file-size { display: flex; align-items: center; gap: 6px; font-size: .8rem; flex-wrap: wrap; }
.ic-size-original { color: var(--muted); }
.ic-size-arrow { font-size: .75rem; color: var(--muted); display: inline-flex; }
.ic-size-compressed { color: var(--accent); font-weight: 600; }
.ic-compress-ratio { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: .74rem; font-weight: 600; }
.ic-progress { height: 6px; background: var(--rule); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.ic-progress-bar { height: 100%; background: var(--grad); border-radius: 999px; transition: width .3s ease; }
.ic-progress-text { font-size: .75rem; color: var(--muted); margin-top: 4px; min-height: 1em; }
.ic-file-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; justify-content: center; }
.ic-status { font-size: .78rem; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ic-status-pending { color: var(--muted); }
.ic-status-processing { color: var(--accent2); }
.ic-status-done { color: var(--accent); }
.ic-status-error { color: #e8590c; }
.ic-spin { animation: ic-rotate 1s linear infinite; display: inline-block; }
@keyframes ic-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 锁定页 */
.tool-locked { max-width: 560px; margin: 60px auto; text-align: center; padding: 48px 32px; }
.tool-locked .lock-icon { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); margin-bottom: 18px; }
.tool-locked .lock-icon i { font-size: 2rem; color: var(--accent); }
.tool-locked h1 { font-size: 1.4rem; margin: 0 0 10px; }
.tool-locked p { color: var(--muted); margin: 0 0 22px; }
.tool-locked p b { color: var(--accent); font-size: 1.15rem; }
.lock-actions { display: flex; gap: 12px; justify-content: center; }
.inline-form { display: inline-flex; }

@media (max-width: 900px) {
  .qr-run-grid, .ic-run-grid { grid-template-columns: 1fr; }

  /* 运行页头部：移动端改为标题区占整行、操作按钮同排对称 */
  .tool-run-header { flex-wrap: wrap; align-items: stretch; gap: 12px; margin-bottom: 18px; }
  .tool-run-title { flex: 1 1 100%; align-items: flex-start; gap: 12px; padding-right: 0; }
  .tool-run-title h1 { font-size: 1.28rem; margin: 0 0 4px; line-height: 1.4; }
  .tool-run-title p { font-size: .86rem; line-height: 1.65; }
  .tool-icon-lg { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
  .tool-icon-lg i { font-size: 1.55rem; }
  /* header 下的两个操作按钮（工具介绍 / 收藏）并成一行，各占一半 */
  .tool-run-header > .btn { flex: 1 1 0; justify-content: center; padding: .55rem .5rem; font-size: .88rem; }

  /* 部分工具把操作按钮包在 .tool-run-actions 容器里时：同样并排 */
  .tool-run-actions { display: flex; gap: 10px; width: 100%; }
  .tool-run-actions .btn { flex: 1 1 0; justify-content: center; }
}

@media (max-width: 480px) {
  .tool-run-header { gap: 10px; margin-bottom: 16px; }
  .tool-run-title { gap: 10px; }
  .tool-run-title h1 { font-size: 1.16rem; }
  .tool-run-title p { font-size: .82rem; }
  .tool-icon-lg { width: 40px; height: 40px; border-radius: 11px; }
  .tool-icon-lg i { font-size: 1.4rem; }
  .tool-run-header > .btn { padding: .5rem .4rem; font-size: .84rem; }
}

/* 工具配额条（全工具页共用：免费/按次计费/VIP/解锁提示） */
.htext-quota { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0; padding: 13px 18px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: var(--radius-md); }
.htext-quota-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: #fef3c7; color: #b45309; flex-shrink: 0; }
.htext-quota-info { flex: 1; min-width: 200px; }
.htext-quota-info b { display: block; font-size: .95rem; color: var(--ink); }
.htext-quota-info span { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.htext-quota-info span a { color: var(--accent); font-weight: 600; }
.htext-quota .btn, .htext-quota .inline-form { margin-left: auto; flex-shrink: 0; }
.htext-quota .inline-form { display: inline-flex; }
.htext-quota-ok { border-color: #a7f3d0; background: #f0fdf4; }
.htext-quota-ok .htext-quota-icon { background: #d1fae5; color: #059669; }
.htext-quota-ok .htext-quota-info b { color: #047857; }
[data-theme="dark"] .htext-quota { background: color-mix(in srgb, #f59e0b 12%, var(--bg)); border-color: color-mix(in srgb, #f59e0b 45%, transparent); }
[data-theme="dark"] .htext-quota-icon { background: color-mix(in srgb, #f59e0b 25%, var(--bg)); }
[data-theme="dark"] .htext-quota-ok { background: color-mix(in srgb, #10b981 12%, var(--bg)); border-color: color-mix(in srgb, #10b981 45%, transparent); }
[data-theme="dark"] .htext-quota-ok .htext-quota-icon { background: color-mix(in srgb, #10b981 25%, var(--bg)); }
@media (max-width: 600px) {
  .htext-quota { padding: 11px 14px; }
  .htext-quota-icon { width: 36px; height: 36px; font-size: 1.1rem; }
}

.tool-placeholder.tool-ready .placeholder-icon { margin-bottom: 14px; }
.tool-placeholder.tool-ready h2 { margin-bottom: 8px; }
.tool-placeholder.tool-ready .btn { margin-top: 14px; }

.file-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* ============ 全站公告条 ============ */
.site-announcement { background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, transparent)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.site-announcement .wrap { display: flex; align-items: center; gap: 8px; padding: 8px 20px; font-size: .84rem; color: var(--ink); }
.site-announcement i { color: var(--accent); font-size: 1rem; flex-shrink: 0; }

/* ============ 收藏 / 认证增强 ============ */
.tool-fav-btn.is-fav { color: #e8590c; border-color: #e8590c; }
.tool-fav-btn.is-fav i { color: #e8590c; }
.email-code-row { display: flex; gap: 10px; }
.email-code-row input { flex: 1; min-width: 0; }
.auth-forgot { float: right; }
.auth-status { padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin: 0 0 16px; }
.auth-status.ok { background: var(--accent-soft); color: var(--accent); }
.auth-status.warn { background: #fff4e6; color: #e8590c; }

/* ============ AI 工具页 ============ */
.ai-grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; }
.ai-panel { display: flex; flex-direction: column; gap: 16px; }
.ai-section h3 { display: flex; align-items: center; gap: 6px; font-size: 1rem; margin: 0 0 12px; }
.ai-section h3 i { color: var(--accent); }
.ai-form-row { margin-bottom: 12px; }
.ai-form-row label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.ai-input, .ai-select, .ai-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--ink); font-size: .92rem; font-family: inherit; }
.ai-textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.ai-input:focus-visible, .ai-select:focus-visible, .ai-textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.ai-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; font-size: .85rem; transition: all .15s; }
.ai-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ai-output { min-height: 320px; padding: 18px; border: 1px dashed var(--border); border-radius: 12px; font-size: .95rem; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.ai-output.is-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .88rem; text-align: center; }
.ai-meta { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.ai-task-status { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 20px; color: var(--muted); }
.ai-task-status .spin { font-size: 2rem; color: var(--accent); animation: ic-rotate 1s linear infinite; }
.ai-result-img { max-width: 100%; border-radius: 12px; display: block; margin: 0 auto; box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.ai-seo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ai-seo-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; }
.ai-seo-card h4 { margin: 0 0 6px; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ai-seo-card .v { font-size: .95rem; line-height: 1.7; word-break: break-all; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-tag { padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .82rem; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }

/* ============ 上传组件（通用） ============ */
.upload-zone { border: 2px dashed var(--border); border-radius: 14px; padding: 36px 16px; text-align: center; cursor: pointer; transition: all .2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone i { font-size: 2rem; color: var(--accent); display: block; margin-bottom: 10px; }
.upload-zone p { margin: 0 0 4px; font-weight: 600; }
.upload-zone span { font-size: .8rem; color: var(--muted); }
