/* ===== 导航栏（毛玻璃）===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  transition: background .3s;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-brand { font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.nav-brand span { color: var(--primary); }

.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; }
.logo-text { line-height: 1.2; }
.logo-name { font-weight: 800; font-size: 16px; letter-spacing: -0.3px; color: var(--text); }
.logo-name span { color: var(--primary); }
.logo-sub { font-size: 9px; color: var(--text3); letter-spacing: 1.5px; font-weight: 600; }

.nav-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; color: inherit; }
.nav-logo-text, .nav-title { font-weight: 800; font-size: 16px; letter-spacing: -0.3px; color: var(--text); text-decoration: none; }

.nav-search {
  display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 14px; gap: 8px; width: 220px;
  transition: all .2s;
}
.nav-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.nav-search input {
  border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); width: 100%; font-family: inherit;
}
.nav-search input::placeholder { color: var(--text3); }

/* 主题切换（2个圆点）*/
.theme-dots { display: flex; gap: 6px; }
.theme-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid transparent; cursor: pointer; transition: all .2s;
}
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.25); }
.td-light { background: linear-gradient(135deg, #f8f9fa, #e2e8f0); }
.td-dark { background: linear-gradient(135deg, #1e1b4b, #7c3aed); }

/* 旧主题切换（兼容过渡期）*/
.theme-switcher {
  display: flex; gap: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
}
.theme-btn {
  width: 22px; height: 22px; border-radius: 5px;
  border: 2px solid transparent; cursor: pointer; transition: all 0.2s;
}
.theme-btn:hover { transform: scale(1.1); }
.theme-btn.active { border-color: var(--primary); }
.theme-btn.t-light { background: linear-gradient(135deg, #f8f9fa, #e5e7eb); }
.theme-btn.t-dark  { background: linear-gradient(135deg, #1a1a2e, #7c3aed); }
.theme-btn.t-green { background: linear-gradient(135deg, #10b981, #3b82f6); }

/* ===== 页面容器 ===== */
.page-wrap { padding: 32px 24px 100px; }
.tool-page-wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 80px; }

/* ===== 返回按钮 ===== */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text2); font-size: 13px; cursor: pointer;
  margin-bottom: 20px; padding: 7px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; text-decoration: none; font-weight: 600;
  transition: all .15s;
}
.back-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 工具页头部 ===== */
.tool-header { margin-bottom: 24px; display: flex; align-items: center; gap: 16px; }
.tool-header-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0;
}
.tool-header-info h1 { font-size: 22px; font-weight: 800; color: var(--text); }
.tool-header-info p { font-size: 13px; color: var(--text2); margin-top: 4px; }
.tool-header-actions { margin-left: auto; display: flex; gap: 8px; }
.tool-fav-btn {
  padding: 8px 16px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 6px;
}
.tool-fav-btn:hover { border-color: #f43f5e; color: #f43f5e; }

/* ===== 主卡片 ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm, var(--shadow));
  overflow: hidden; margin-bottom: 16px;
  transition: background .3s, border-color .3s;
}

/* 卡片内区块 */
.section { padding: 20px; }
.section + .section { padding-top: 0; }
.section-title { font-size: 12px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }

/* ===== 上传区 ===== */
.upload-zone {
  border: 2px dashed var(--border); background: var(--surface2);
  border-radius: 12px; margin: 20px; padding: 40px 20px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-zone .upload-icon { font-size: 44px; margin-bottom: 12px; display: block; }
.upload-zone h3 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.upload-zone p { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.upload-zone .format-tags {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px;
}
.format-tag {
  background: var(--surface); color: var(--text2);
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; border: 1px solid var(--border);
}

/* ===== 文本输入区 ===== */
.tool-textarea {
  width: 100%; min-height: 160px; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 14px 16px; font-size: 14px; color: var(--text); background: var(--surface2);
  resize: vertical; outline: none; font-family: inherit; line-height: 1.7;
  transition: border-color .2s; box-sizing: border-box;
}
.tool-textarea:focus { border-color: var(--primary); }
.tool-textarea::placeholder { color: var(--text3); }

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-grad); color: #fff; border: none;
  border-radius: 12px; padding: 12px 24px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3); transition: all 0.2s;
  font-family: inherit;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary.full { width: calc(100% - 40px); margin: 0 20px 20px; padding: 15px; font-size: 15px; font-weight: 700; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-row { display: flex; gap: 10px; padding: 0 20px 20px; flex-wrap: wrap; }

/* ===== 进度条 ===== */
.progress-wrap { width: calc(100% - 40px); margin: 0 20px 20px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 7px; }
.progress-label strong { color: var(--primary); }
.progress-bg { background: var(--surface2); border: 1px solid var(--border); border-radius: 100px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--btn-grad); border-radius: 100px; transition: width 0.3s; }

/* ===== 结果区 ===== */
.result-box {
  margin: 0 20px 20px; background: var(--primary-light);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: flex; align-items: center; gap: 12px;
}
.result-check {
  width: 40px; height: 40px; background: var(--success); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.result-text { font-size: 14px; font-weight: 600; color: var(--text); }
.result-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ===== 统计网格 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.stat-item {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 12px; text-align: center;
}
.stat-num { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 4px; font-weight: 500; }

/* ===== 同类工具推荐 ===== */
.related-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.related-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all .15s; text-decoration: none; color: var(--text);
}
.related-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.related-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.related-name { font-size: 13px; font-weight: 600; }
.related-desc { font-size: 11px; color: var(--text3); }

/* ===== 通用响应式 ===== */
@media (max-width: 600px) {
  .navbar { padding: 0 16px; }
  .nav-search { display: none; }
  .tool-page-wrap { padding: 20px 16px 60px; }
  .page-wrap { padding: 20px 16px 32px; }
  .btn-primary.full { width: calc(100% - 32px); margin: 0 16px 16px; }
  .tool-header { flex-wrap: wrap; }
  .tool-header-actions { margin-left: 0; margin-top: 8px; width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .related-tools { grid-template-columns: 1fr; }
}

/* ===== 用户系统 ===== */
.nav-login-btn {
  padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--primary); color: #fff; border: none; cursor: pointer; transition: opacity 0.2s;
}
.nav-login-btn:hover { opacity: 0.85; }

.nav-user { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background 0.15s; }
.nav-user:hover { background: var(--surface2); }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.nav-username { font-size: 13px; font-weight: 600; color: var(--text); }
.nav-arrow { font-size: 10px; color: var(--text3); }

#nav-user-area { position: relative; }
.nav-dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); min-width: 140px; z-index: 200; overflow: hidden; }
.nav-dd-item { display: block; padding: 10px 16px; font-size: 13px; color: var(--text); text-decoration: none; cursor: pointer; transition: background 0.15s; white-space: nowrap; }
.nav-dd-item:hover { background: var(--surface2); }
.nav-dd-logout { color: #dc2626; }

/* 登录弹窗 */
#auth-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; }
.auth-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px); }
.auth-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; width: 340px; max-width: calc(100vw - 40px); box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--surface2); border-radius: 8px; padding: 3px; }
.auth-tab { flex: 1; padding: 7px; border: none; background: transparent; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text2); transition: all 0.15s; }
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.auth-input { width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface2); color: var(--text); font-size: 14px; margin-bottom: 12px; outline: none; transition: border-color 0.15s; }
.auth-input:focus { border-color: var(--primary); }
.auth-error { color: #dc2626; font-size: 12px; min-height: 18px; margin-bottom: 8px; }
.captcha-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.captcha-row .captcha-input { flex: 1; margin-bottom: 0; }
.captcha-img { width: 120px; height: 40px; border-radius: 8px; cursor: pointer; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; background: #f0f0f0; }
.captcha-img svg { width: 100%; height: 100%; display: block; }

/* ===== 收藏图标 ===== */
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border: none; background: none;
  cursor: pointer; padding: 0; display: flex; align-items: center;
  justify-content: center; border-radius: 50%;
  transition: all .15s; z-index: 2; opacity: 0;
}
.tool-card:hover .fav-btn { opacity: 1; }
.fav-btn:hover { background: var(--surface2); transform: scale(1.15); }
.fav-btn svg { width: 16px; height: 16px; stroke: var(--text3); fill: none; stroke-width: 1.8; transition: stroke 0.15s, fill 0.15s; }
.fav-btn:hover svg { stroke: #f43f5e; }
.fav-btn.active svg { stroke: #f43f5e; fill: #f43f5e; }
.fav-btn.active { opacity: 1; }

/* ===== 笔记页 ===== */
.notes-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; height: calc(100vh - 180px); min-height: 500px; }
.notes-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-y: auto; display: flex; flex-direction: column; }
.notes-list-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notes-list-header h3 { font-size: 14px; font-weight: 700; }
.note-item { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.note-item:hover { background: var(--surface2); }
.note-item.active { background: var(--primary-light, #f5f3ff); border-left: 3px solid var(--primary); }
.note-item-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item-time { font-size: 11px; color: var(--text3); }
.note-editor { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.note-editor-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.note-title-input { flex: 1; border: none; background: transparent; font-size: 16px; font-weight: 700; color: var(--text); outline: none; }
.note-content-area { flex: 1; padding: 16px; border: none; background: transparent; color: var(--text); font-size: 14px; line-height: 1.8; resize: none; outline: none; }
@media (max-width: 600px) {
  .notes-layout { grid-template-columns: 1fr; }
}

/* ===== 首页 - 主容器 ===== */
.main-container { max-width: 1200px; margin: 0 auto; padding: 0 28px 80px; }

/* ===== 首页 - Hero 区域 ===== */
.hero {
  text-align: center; padding: 56px 24px 40px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(129,140,248,.1) 0%, transparent 70%);
}
.hero-title {
  font-size: 34px; font-weight: 900; letter-spacing: -.5px; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 40%, var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { font-size: 15px; color: var(--text2); margin-bottom: 28px; }
.hero-sub strong { color: var(--primary); font-weight: 700; }
.hero-stats { display: flex; justify-content: center; gap: 32px; margin-top: 24px; }
.hero-stat-num { font-size: 24px; font-weight: 800; color: var(--primary); display: block; }
.hero-stat-label { font-size: 12px; color: var(--text3); font-weight: 500; }

/* 搜索框（旧 .search-hero 兼容）*/
.search-hero { text-align: center; padding: 48px 20px 36px; }
.search-hero h1 { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
.search-hero h1 span { color: var(--primary); }
.search-hero p { color: var(--text2); font-size: 14px; margin-bottom: 24px; }

.search-box {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 16px; padding: 14px 20px;
  box-shadow: var(--shadow-md); transition: all .25s;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 8px 30px rgba(99,102,241,.15); }
.search-box .s-icon { font-size: 20px; color: var(--text3); flex-shrink: 0; }
.search-box input {
  border: none; background: transparent; outline: none;
  font-size: 16px; color: var(--text); width: 100%; font-family: inherit;
}
.search-box input::placeholder { color: var(--text3); }
.search-kbd {
  color: var(--text3); font-size: 12px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; white-space: nowrap; font-weight: 600;
}
.search-icon { color: var(--text3); font-size: 18px; flex-shrink: 0; }
.search-clear {
  display: none; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  font-size: 12px; color: var(--text3); cursor: pointer;
  background: var(--surface2); transition: all 0.15s;
}
.search-clear:hover { background: var(--border); color: var(--text); }

/* ===== 首页 - 快捷入口 ===== */
.quick-bar { display: flex; gap: 12px; margin-bottom: 28px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.quick-bar::-webkit-scrollbar { display: none; }
.quick-chip {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; cursor: pointer; transition: all .2s; box-shadow: var(--shadow-sm, none);
  text-decoration: none;
}
.quick-chip:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-chip .qc-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* ===== 首页 - 双栏布局 ===== */
.content-layout {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 28px; padding-bottom: 80px;
}

/* ===== 首页 - 左侧分类栏 ===== */
.sidebar { position: sticky; top: 84px; align-self: start; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm, var(--shadow)); }
.sidebar-header { padding: 14px 16px 10px; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm, var(--shadow));
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px; font-weight: 600;
  color: var(--text2); cursor: pointer; transition: all 0.15s;
  border-left: 3px solid transparent; position: relative;
}
.sidebar-item:hover { background: var(--surface2); color: var(--text); }
.sidebar-item.active {
  background: var(--primary-light); color: var(--primary);
  border-left-color: var(--primary);
}
.sidebar-item .s-icon { font-size: 16px; width: 22px; text-align: center; }
.sidebar-item .s-count {
  position: absolute; right: 12px; font-size: 11px; color: var(--text3);
  background: var(--surface2); border-radius: 10px; padding: 1px 8px; font-weight: 500;
}
.sidebar-item.active .s-count { background: rgba(99,102,241,.12); color: var(--primary); }

/* ===== 首页 - 分类标题 ===== */
.cat-section { margin-bottom: 32px; }
.cat-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cat-header-icon, .cat-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.cat-title { font-size: 16px; font-weight: 700; color: var(--text); }
.cat-count { font-size: 12px; color: var(--text3); font-weight: 500; background: var(--surface2); padding: 2px 10px; border-radius: 10px; }

/* ===== 首页 - 工具卡片 ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; position: relative; color: var(--text);
}
.tool-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,.3);
}
.tool-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; transition: transform .2s;
}
.tool-card:hover .tool-card-icon { transform: scale(1.08); }
.tool-card-info { flex: 1; min-width: 0; }
.tool-card-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.3; display: flex; align-items: center; gap: 6px;
}
.tool-card-desc {
  font-size: 12px; color: var(--text3); line-height: 1.4; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 6px; white-space: nowrap; flex-shrink: 0;
}
.badge-hot { background: var(--badge-hot-bg, #fef2f2); color: var(--badge-hot-text, #dc2626); }
.badge-new { background: var(--badge-new-bg, #f0fdf4); color: var(--badge-new-text, #16a34a); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text2); }

/* ===== 首页 - 移动端分类横滑 ===== */
.mobile-tabs {
  display: none; gap: 8px; overflow-x: auto; padding: 0 0 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tab {
  padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text2); white-space: nowrap; transition: all .15s;
}
.mobile-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 首页 - 底部 ===== */
.footer { text-align: center; padding: 40px 20px 32px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-text { font-size: 13px; color: var(--text3); }
.footer-text a { color: var(--primary); text-decoration: none; }

/* ===== 首页 - 响应式 ===== */
@media (max-width: 768px) {
  .content-layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
  .mobile-tabs { display: flex !important; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero { padding: 36px 16px 28px; }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 13px; margin-bottom: 20px; }
  .search-box { padding: 12px 16px; }
  .search-box input { font-size: 15px; }
  .search-kbd { display: none; }
  .hero-stats { gap: 24px; margin-top: 18px; }
  .hero-stat-num { font-size: 20px; }
  .search-hero { padding: 32px 16px 24px; }
  .search-hero h1 { font-size: 22px; }
  .main-container { padding: 0 16px 40px; }
  .tool-card {
    flex-direction: column; align-items: center; text-align: center;
    padding: 18px 12px 14px; gap: 8px;
  }
  .tool-card-icon { width: 46px; height: 46px; font-size: 24px; }
  .tool-card-info { width: 100%; }
  .tool-card-name { justify-content: center; font-size: 13px; }
  .tool-card-desc { display: none; }
  .badge {
    position: absolute; top: 8px; left: 8px;
    font-size: 9px; padding: 1px 5px;
  }
  .fav-btn { opacity: 1; top: 8px; right: 8px; }
  .quick-bar { margin-bottom: 20px; }
}

/* ===== 语言切换 ===== */
.lang-switcher { position: relative; }
.lang-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 8px;
  width: 34px; height: 34px; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.lang-btn:hover { border-color: var(--primary); }
.lang-menu {
  position: absolute; top: 40px; right: 0; z-index: 200;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 110px; overflow: hidden;
}
.lang-item {
  display: block; padding: 9px 16px; font-size: 13px; font-weight: 500;
  color: var(--text); text-decoration: none; transition: background .15s;
}
.lang-item:hover { background: var(--surface2, #f8f9fa); }
.lang-item.active { color: var(--primary); font-weight: 700; }
