/*
  LGO赵哥·AI工具集 样式
  - 布局：顶部导航 + 左侧分类 + 主内容
  - 交互：卡片悬停放大/阴影加深，按钮反馈
  - 响应式：桌面/平板/移动
  - 体验：加载过渡动画、热区横向滚动
*/
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #3b82f6;
  --primary-600: #2563eb;
  --accent-1: #10b981; /* 绿 */
  --accent-2: #f59e0b; /* 橙 */
  --accent-3: #ef4444; /* 红 */
  --radius: 14px;
  --shadow-sm: 0 4px 12px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.12);
  /* 新增：通用组件色值（浅色主题） */
  --chip-bg: #f1f5f9;
  --chip-text: #0f172a;
  --chip-border: #e2e8f0;
  --icon-bg: #f3f4f6;
  --input-bg: #fafafa;
  --hover-bg: #ffffff;
  --active-bg: #eef5ff;
  --seg-hover-bg: rgba(59,130,246,.08);
  --seg-active-bg: rgba(59,130,246,.15);
  --seg-focus-ring: rgba(59,130,246,.55);
  --spinner-border: #cfe0ff;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, PingFang SC, Microsoft YaHei, Helvetica Neue, Arial, "Noto Sans", "Noto Sans CJK", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* 顶部导航栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 680px) 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 22px; }
.site-name { font-weight: 700; letter-spacing: .5px; }
.search-wrap { display: flex; justify-self: center; width: min(100%, 680px); }
.search-wrap input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: var(--input-bg);
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
.user-entry { display: flex; justify-content: flex-end; }
.btn { cursor: pointer; padding: 9px 14px; border-radius: 10px; border: none; background: var(--primary); color: #fff; transition: transform .12s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); background: var(--primary-600); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn.ghost:hover { background: rgba(59,130,246,.08); }

/* 整体布局 */
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; padding: 20px; }

/* 左侧分类区 */
.sidebar { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.sidebar-title { margin: 0 0 8px; font-size: 16px; }
.category-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.category-list li { }
.category-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--input-bg); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: background .15s, transform .1s, border-color .15s; }
.category-btn:hover { background: var(--hover-bg); transform: translateY(-1px); }
.category-btn.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,.15); background: var(--active-bg); }
.sidebar-extra { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* 主内容区 */
.content { display: grid; gap: 20px; }
.section { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-sub { color: var(--muted); font-size: 13px; }
.section-sub:empty { display: none; }
#resultCount:empty { display: none; }
/* 首页主视觉 */
 .hero { position: relative; }
 .hero-inner { display: grid; gap: 6px; }
 .hero-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: .2px; }
 .hero-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
 .hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
/* 首页精选布局：横排最多5列，响应式伸缩 */
.hot-list { display: grid; grid-template-columns: 1fr; gap: 12px; overflow: visible; padding-bottom: 8px; }
.hot-card { scroll-snap-align: start; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease; }
.hot-card .icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--icon-bg); }
.hot-card .name { font-weight: 600; }
.hot-card .desc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-card .link { text-decoration: none; }
/* 新增：精选样式 */
.featured-card { position: relative; border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.15) inset, var(--shadow-sm); }
.featured-card .icon { border: 1px dashed rgba(245,158,11,.35); }
.featured-badge { position: absolute; top: -10px; left: -10px; padding: 2px 8px; border-radius: 999px; border: 1px solid #f59e0b; background: #fff; color: #f59e0b; font-size: 12px; box-shadow: var(--shadow-sm); }
.theme-dark .featured-badge { background: var(--bg); }
/* 工具网格卡片 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-md); }
.card-head { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--icon-bg); }
.card .name { font-weight: 600; }
.card .desc { color: var(--muted); font-size: 13px; }


.card-actions { display: flex; justify-content: space-between; align-items: center; }
.card-actions .link { text-decoration: none; }
.link-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer; transition: background .15s, transform .1s; }
.link-btn:hover { background: rgba(59,130,246,.08); transform: translateY(-1px); }

/* 空状态 */
.empty { text-align: center; padding: 24px 12px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* 页脚 */
.footer { margin: 20px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.footer-inner .left, .footer-inner .right { display: flex; align-items: center; }
.footer-inner .right { order: -1; }
/* 让版权在上、联系信息在下 */

.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 240px 1fr; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .topbar { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .content { order: 1; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* 自适应增强（大屏优化） */
@media (min-width: 1400px) {
  .tools-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (min-width: 1280px) {
  .layout { max-width: none; margin-inline: 0; }
  .footer { max-width: none; margin: 20px; }
}

/* 自适应增强（小屏优化） */
@media (max-width: 640px) {
  .layout { padding: 12px; }
  .section { padding: 12px; }
  .sidebar { padding: 12px; }
  .topbar { gap: 10px; padding: 10px 12px; }
  .search-wrap input { padding: 8px 12px; }
  /* removed: grid-auto-columns for hot-list to keep single-column on small screens */
  .card { padding: 12px; }
  .card-head { grid-template-columns: 44px 1fr; }
}
@media (min-width: 640px) { .hot-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 840px) { .hot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hot-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .hot-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hot-card { scroll-snap-align: start; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease; }
.hot-card .icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--icon-bg); }
.hot-card .name { font-weight: 600; }
.hot-card .desc { color: var(--muted); font-size: 13px; }
.hot-card .link { text-decoration: none; }
/* 新增：精选样式 */
.featured-card { position: relative; border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.15) inset, var(--shadow-sm); }
.featured-card .icon { border: 1px dashed rgba(245,158,11,.35); }
.featured-badge { position: absolute; top: -10px; left: -10px; padding: 2px 8px; border-radius: 999px; border: 1px solid #f59e0b; background: #fff; color: #f59e0b; font-size: 12px; box-shadow: var(--shadow-sm); }
.theme-dark .featured-badge { background: var(--bg); }
/* 工具网格卡片 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-md); }
.card-head { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--icon-bg); }
.card .name { font-weight: 600; }
.card .desc { color: var(--muted); font-size: 13px; }


.card-actions { display: flex; justify-content: space-between; align-items: center; }
.card-actions .link { text-decoration: none; }
.link-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer; transition: background .15s, transform .1s; }
.link-btn:hover { background: rgba(59,130,246,.08); transform: translateY(-1px); }

/* 空状态 */
.empty { text-align: center; padding: 24px 12px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* 页脚 */
.footer { margin: 20px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* 让版权在上、联系信息在下 */

.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 表单样式 */
.form-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }

/* 深色主题变量 */
.theme-dark {
  --bg: #202020;
  --surface: #2b2b2b;
  --text: #f3f3f3;
  --muted: #c0c6cc;
  --line: #3a3a3a;
  --primary: #0078D4; /* Windows 蓝 */
  --primary-600: #106ebe;
  --shadow-sm: 0 4px 12px rgba(0,0,0,.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --chip-bg: rgba(255,255,255,.06);
  --chip-text: #e6e6e6;
  --chip-border: rgba(255,255,255,.12);
  --icon-bg: rgba(255,255,255,.08);
  --input-bg: rgba(255,255,255,.04);
  --hover-bg: rgba(255,255,255,.06);
  --active-bg: rgba(0,120,212,.15);
  --seg-hover-bg: rgba(0,120,212,.14);
  --seg-active-bg: rgba(0,120,212,.22);
  --seg-focus-ring: rgba(0,120,212,.60);
  --spinner-border: rgba(255,255,255,.25);
}
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--spinner-border); border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 分段控件：让收藏与使用按钮看起来像一个整体 */
.actions-tight {
  display: inline-flex;
  border: 1px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
}
.actions-tight > * { /* 直接子元素（按钮或链接容器） */
  display: inline-flex;
  align-items: center;
}
.actions-tight > * + * { /* 中间仅保留一条分隔线 */
  border-left: 1px solid var(--primary);
}
/* 统一收藏与使用按钮字体大小 */
.actions-tight .link-btn,
.link-btn {
  font-size: 14px;
  line-height: 1;
}
.actions-tight .link-btn {
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 8px 12px;
  min-height: 36px;
  min-width: 44px;
  background: transparent;
  transition: background .15s ease, color .15s ease;
}
.actions-tight .link-btn:hover {
  background: var(--seg-hover-bg);
}
.actions-tight .link-btn:active {
  background: var(--seg-active-bg);
  transform: none;
}
.actions-tight .link-btn[aria-pressed="true"] {
  background: var(--seg-active-bg);
}
.actions-tight:focus-within {
  outline: 2px solid var(--seg-focus-ring);
  outline-offset: 2px;
  border-color: var(--primary-600);
}
.actions-tight .link-btn:focus-visible {
    outline: none;
    background: var(--seg-hover-bg);
    box-shadow: inset 0 0 0 1.5px var(--seg-focus-ring);
  }
/* 深色主题下提升分隔线与边框对比度 */
.theme-dark .actions-tight { border-color: var(--primary-600); }
.theme-dark .actions-tight > * + * { border-left-color: var(--primary-600); }
/* 移动端触控命中区增强 */
@media (max-width: 640px) {
  .actions-tight .link-btn { min-height: 40px; }
}
@media (max-width: 360px) {
  .actions-tight { flex-wrap: wrap; }
}
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }
.dialog-actions .link { text-decoration: none; }
.link-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer; transition: background .15s, transform .1s; }
.link-btn:hover { background: rgba(59,130,246,.08); transform: translateY(-1px); }

/* 空状态 */
.empty { text-align: center; padding: 24px 12px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* 页脚 */
.footer { margin: 20px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 统一图标与名称对齐：分类按钮、工具卡、热门卡 */
.category-btn .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-btn .label > span:first-child {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* 热门卡信息区垂直居中，与图标对齐 */
.hot-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 统一图标容器的行高，避免基线差异 */
.hot-card .icon,
.card .icon {
  line-height: 1;
}

/* 统一名称的行高，保持视觉一致 */
.card .name,
.hot-card .name {
  line-height: 1.4;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 顶线对齐：图标与标题统一贴齐上沿（覆盖先前的居中） */
.card-head { align-items: flex-start; }
.hot-card { align-items: flex-start; }
.hot-card .info { justify-content: flex-start; }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--icon-bg); }
.card .name { font-weight: 600; }
.card .desc { color: var(--muted); font-size: 13px; }

.card-actions { display: flex; justify-content: space-between; align-items: center; }
.card-actions .link { text-decoration: none; }
.link-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer; transition: background .15s, transform .1s; }
.link-btn:hover { background: rgba(59,130,246,.08); transform: translateY(-1px); }

/* 空状态 */
.empty { text-align: center; padding: 24px 12px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* 页脚 */
.footer { margin: 20px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 统一图标与名称对齐：分类按钮、工具卡、热门卡 */
.category-btn .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-btn .label > span:first-child {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* 热门卡信息区垂直居中，与图标对齐 */
.hot-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 统一图标容器的行高，避免基线差异 */
.hot-card .icon,
.card .icon {
  line-height: 1;
}

/* 统一名称的行高，保持视觉一致 */
.card .name,
.hot-card .name {
  line-height: 1.4;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 顶线对齐：图标与标题统一贴齐上沿（覆盖先前的居中） */
.card-head { align-items: flex-start; }
.hot-card { align-items: flex-start; }
.hot-card .info { justify-content: flex-start; }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--icon-bg); }
.card .name { font-weight: 600; }
.card .desc { color: var(--muted); font-size: 13px; }

.card-actions { display: flex; justify-content: space-between; align-items: center; }
.card-actions .link { text-decoration: none; }
.link-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer; transition: background .15s, transform .1s; }
.link-btn:hover { background: rgba(59,130,246,.08); transform: translateY(-1px); }

/* 空状态 */
.empty { text-align: center; padding: 24px 12px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* 页脚 */
.footer { margin: 20px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 统一图标与名称对齐：分类按钮、工具卡、热门卡 */
.category-btn .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-btn .label > span:first-child {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* 热门卡信息区垂直居中，与图标对齐 */
.hot-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 统一图标容器的行高，避免基线差异 */
.hot-card .icon,
.card .icon {
  line-height: 1;
}

/* 统一名称的行高，保持视觉一致 */
.card .name,
.hot-card .name {
  line-height: 1.4;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 顶线对齐：图标与标题统一贴齐上沿（覆盖先前的居中） */
.card-head { align-items: flex-start; }
.hot-card { align-items: flex-start; }
.hot-card .info { justify-content: flex-start; }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--icon-bg); }
.card .name { font-weight: 600; }
.card .desc { color: var(--muted); font-size: 13px; }

.card-actions { display: flex; justify-content: space-between; align-items: center; }
.card-actions .link { text-decoration: none; }
.link-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--primary); color: var(--primary); background: transparent; cursor: pointer; transition: background .15s, transform .1s; }
.link-btn:hover { background: rgba(59,130,246,.08); transform: translateY(-1px); }

/* 空状态 */
.empty { text-align: center; padding: 24px 12px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* 页脚 */
.footer { margin: 20px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
/* 统一图标与名称对齐：分类按钮、工具卡、热门卡 */
.category-btn .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-btn .label > span:first-child {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* 热门卡信息区垂直居中，与图标对齐 */
.hot-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 统一图标容器的行高，避免基线差异 */
.hot-card .icon,
.card .icon {
  line-height: 1;
}

/* 统一名称的行高，保持视觉一致 */
.card .name,
.hot-card .name {
  line-height: 1.4;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }
.hot-toggle { margin-top: 10px; display: flex; }
.hot-toggle #hotToggle { margin-left: auto; }
/* 统一图标与名称对齐：分类按钮、工具卡、热门卡 */
.category-btn .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-btn .label > span:first-child {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* 热门卡信息区垂直居中，与图标对齐 */
.hot-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 统一图标容器的行高，避免基线差异 */
.hot-card .icon,
.card .icon {
  line-height: 1;
}

/* 统一名称的行高，保持视觉一致 */
.card .name,
.hot-card .name {
  line-height: 1.4;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.footer a.star { text-decoration: none; font-size: 18px; }
.footer a.star:hover { filter: saturate(1.4); }

/* 加载遮罩与动画 */
#app-loader { position: fixed; inset: 0; display: grid; place-items: center; gap: 12px; background: rgba(255,255,255,.85); backdrop-filter: blur(2px); z-index: 100; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #cfe0ff; border-top-color: var(--primary); animation: spin .9s linear infinite; }
.loading-text { color: var(--muted); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 预留工具详情对话框 */
.tool-dialog { border: none; padding: 0; border-radius: 14px; }
.tool-dialog::backdrop { background: rgba(17, 24, 39, .35); }

/* 对话框内容适配不同屏幕宽度 */
.dialog-content { padding: 18px; background: var(--surface); border-radius: 14px; min-width: 280px; width: min(640px, 94vw); max-width: 94vw; box-shadow: var(--shadow-md); }

.dialog-icon { font-size: 28px; }
.dialog-desc { color: var(--muted); }
.dialog-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 响应式 */
@media (prefers-reduced-motion: reduce) {
  .card, .hot-card, .btn, .link-btn { transition: none; }
  .spinner { animation: none; }
}
.muted { color: var(--muted); font-size: 13px; }