/* =========================================================
   工具盒子 ToolBox - 特定化主题
   在 style.min.css / home-index.min.css 之后加载，覆盖原站样式
   ========================================================= */

:root {
  --tb-primary: #4f46e5;
  --tb-primary-2: #7c3aed;
  --tb-primary-3: #2563eb;
  --tb-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #2563eb 100%);
  --tb-bg: #f4f6fb;
  --tb-card-bg: #ffffff;
  --tb-border: #e5e9f2;
  --tb-text: #1e293b;
  --tb-muted: #64748b;
  --tb-radius: 14px;
  --tb-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
  --tb-shadow-lg: 0 12px 32px rgba(79, 70, 229, 0.16);
}

/* ---------- 全局背景 ---------- */
body {
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 导航栏 ---------- */
.navbar.header, nav.navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tb-border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.navbar a {
  color: var(--tb-text);
  text-decoration: none;
}

/* 品牌 logo 文字：渐变 */
.navbar span {
  font-weight: 700;
  font-size: 18px;
  background: var(--tb-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 登录链接 */
.navbar .link {
  color: var(--tb-primary) !important;
  font-weight: 600;
}

/* 语言切换按钮（导航右侧） */
.tb-lang-btn {
  display: inline-block;
  margin-left: 12px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff !important;
  background: var(--tb-gradient);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.tb-lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
  color: #fff !important;
}

/* 工具页侧边栏顶部：品牌名 + 语言按钮 */
.tb-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--tb-border);
  background: rgba(79, 70, 229, 0.04);
}
.tb-sidebar-brand .tb-brand-name {
  font-weight: 800;
  font-size: 17px;
  background: var(--tb-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.tb-sidebar-brand .tb-lang-btn {
  margin-left: 8px;
  padding: 3px 12px;
  font-size: 12px;
}

/* ---------- 首页搜索区 ---------- */
.search-container h4 {
  color: var(--tb-text) !important;
  font-weight: 700;
}

.search-index input, .search-index .form-control,
input[type="text"].form-control {
  border: 2px solid var(--tb-border);
  border-radius: 999px;
  box-shadow: var(--tb-shadow);
  padding: 10px 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-index input:focus, .search-index .form-control:focus,
input[type="text"].form-control:focus {
  border-color: var(--tb-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
  outline: none;
}

/* ---------- 工具分类链接 ---------- */
.footer-nav ul.list-inline a,
.footer-nav a, .list-inline-bg a {
  color: var(--tb-muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: 6px;
  padding: 2px 6px;
}
.footer-nav ul.list-inline a:hover,
.footer-nav a:hover, .list-inline-bg a:hover {
  color: var(--tb-primary);
  background: rgba(79, 70, 229, 0.06);
}

/* 分类标题 */
.theme-color {
  color: var(--tb-primary) !important;
}

/* ---------- 按钮 ---------- */
.btn-primary, .btn-theme, button[class*="btn-primary"] {
  background: var(--tb-gradient) !important;
  border: none !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover, .btn-theme:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

/* ---------- 卡片 ---------- */
.card, .panel, .tool-card {
  border: 1px solid var(--tb-border) !important;
  border-radius: var(--tb-radius) !important;
  box-shadow: var(--tb-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover, .panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--tb-shadow-lg);
}

/* ---------- 输入区/文本域 ---------- */
.form-control, textarea.form-control, select.form-control {
  border-color: var(--tb-border);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, textarea.form-control:focus {
  border-color: var(--tb-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ---------- 页脚 ---------- */
footer, .footer, article#bottom {
  color: var(--tb-muted);
}
article#bottom a, .footer a, footer a {
  color: var(--tb-primary);
  text-decoration: none;
}
article#bottom a:hover, .footer a:hover {
  text-decoration: underline;
}

/* ---------- 链接色 ---------- */
a.link-color, .link-color {
  color: var(--tb-primary) !important;
}

/* 工具页正文标题 */
h1, h2, h3, h4 {
  color: var(--tb-text);
}

/* 高亮/强调 */
.highlight, .bd-callout {
  border-left-color: var(--tb-primary) !important;
  background: rgba(79, 70, 229, 0.04) !important;
}
