/* ========== 捷帮 - 小工具站 全局样式 ========== */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #5B5FC7;
  --primary-light: #7C7FE0;
  --primary-dark: #3F42A8;
  --accent: #E8934A;
  --bg: #F7F7F5;
  --bg-white: #FFFFFF;
  --text: #2D2D3A;
  --text-light: #6E6E80;
  --border: #E4E4E0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 6px 10px rgba(0,0,0,0.05);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: #1C1C24;
  --bg-white: #26262F;
  --text: #D8D8E0;
  --text-light: #9090A0;
  --border: #3A3A46;
  --primary: #9B9FE0;
  --primary-light: #B8BBF0;
  --primary-dark: #7A7DC8;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.4), 0 6px 10px rgba(0,0,0,0.3);
}


/* 导航暗色模式 */
[data-theme="dark"] .guide-link {
  background: rgba(155,159,224,0.12);
}
[data-theme="dark"] .guide-link:hover {
  background: rgba(155,159,224,0.2);
}
[data-theme="dark"] .lang-switch {
  border-color: var(--border);
}
[data-theme="dark"] .guide-more-btn {
  background: rgba(155,159,224,0.12);
}
[data-theme="dark"] .guide-more-menu {
  background: var(--bg-white);
  border-color: var(--border);
}
[data-theme="dark"] .guide-more-menu a:hover {
  background: rgba(155,159,224,0.12);
}

[data-theme="dark"] .tool-card .tool-icon.blue { background: #2A2A45; }
[data-theme="dark"] .tool-card .tool-icon.green { background: #1A3A2E; }
[data-theme="dark"] .tool-card .tool-icon.yellow { background: #3A2E18; }
[data-theme="dark"] .tool-card .tool-icon.purple { background: #322460; }
[data-theme="dark"] .tool-card .tool-icon.red { background: #3A1E1E; }
[data-theme="dark"] .tool-card .tool-icon.cyan { background: #1A3540; }
[data-theme="dark"] .tool-card .tool-icon.orange { background: #3A2518; }
[data-theme="dark"] .tool-card .tool-icon.pink { background: #3A1838; }

[data-theme="dark"] .back-link { background: #2A2A45; }
[data-theme="dark"] .search-box input { background: rgba(38,38,47,0.95); color: #D8D8E0; }
[data-theme="dark"] .search-box input::placeholder { color: #606070; }
[data-theme="dark"] .feedback-modal-content { background: #26262F; }
[data-theme="dark"] .feedback-modal-content h3 { color: #D8D8E0; }
[data-theme="dark"] .feedback-modal-content .feedback-subtitle { color: #606070; }
[data-theme="dark"] .feedback-modal-content textarea { background: #1C1C24; border-color: #3A3A46; color: #D8D8E0; }
[data-theme="dark"] .feedback-modal-content input[type="text"] { background: #1C1C24; border-color: #3A3A46; color: #D8D8E0; }
[data-theme="dark"] .feedback-modal-content .btn-cancel { background: #26262F; border-color: #3A3A46; color: #9090A0; }
[data-theme="dark"] .guide-modal-box { background: #26262F; }
[data-theme="dark"] .guide-modal-box h3 { color: #D8D8E0; }
[data-theme="dark"] .guide-modal-box h5 { color: #9B9FE0; }
[data-theme="dark"] .guide-modal-box ol { color: #9090A0; }
[data-theme="dark"] .guide-modal-box .scene b { color: #D8D8E0; }
[data-theme="dark"] .guide-modal-box .scene p { color: #606070; }
[data-theme="dark"] .guide-modal-box .tip { background: #3A2E18; color: #E8A050; }
[data-theme="dark"] .usage-section { background: #26262F; border-color: #3A3A46; }
[data-theme="dark"] .usage-toggle h4 { color: #9B9FE0; }
[data-theme="dark"] .usage-body ol, [data-theme="dark"] .usage-body ul { color: #9090A0; }
[data-theme="dark"] .usage-body .tip { background: #3A2E18; color: #E8A050; }
[data-theme="dark"] .usage-body .scenario-item .scenario-title { color: #D8D8E0; }
[data-theme="dark"] .usage-body .scenario-item .scenario-desc { color: #606070; }

/* Dark mode toggle button */
.dark-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
}
.dark-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

/* Header */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.site-slogan {
  font-size: 14px;
  color: var(--text-light);
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #5B5FC7 0%, #7C7FE0 50%, #9B9FE0 100%);
  color: white;
  padding: 60px 24px 40px;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 24px;
}

/* Search Box */
.search-box {
  max-width: 480px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  outline: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: box-shadow 0.2s;
}

.search-box input:focus {
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.search-box input::placeholder {
  color: #9CA3AF;
}

/* Smart Paste */
.smart-paste-box {
  max-width: 480px;
  margin: 16px auto 0;
  text-align: center;
}
.smart-paste-label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 500;
}
.smart-paste-box textarea {
  width: 100%;
  padding: 10px 16px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(255,255,255,0.7);
  color: var(--text);
  outline: none;
  resize: none;
  transition: border-color 0.2s;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
}
.smart-paste-box textarea:focus {
  border-color: #4F46E5;
  background: rgba(255,255,255,0.95);
}
.smart-paste-box textarea::placeholder {
  color: #9ca3af;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.smart-paste-result {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.smart-paste-result .sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #4F46E5;
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.smart-paste-result .sp-chip:hover {
  background: #3730a3;
  transform: translateY(-1px);
}
.smart-paste-result .sp-chip .sp-type {
  background: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
}
[data-theme="dark"] .smart-paste-box textarea {
  background: rgba(30,41,59,0.8);
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .smart-paste-label {
  color: #94a3b8;
}

/* Category Nav */
.category-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg-white);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cat-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* No Result */
.no-result {
  text-align: center;
  padding: 60px 20px;
  width: 100%;
}

.no-result p {
  font-size: 18px;
  color: var(--text-light);
}

.no-result-hint {
  font-size: 14px !important;
  margin-top: 8px !important;
  color: #9CA3AF !important;
}

/* Tool Grid */
.tools-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-light);
  color: inherit;
}

.tool-card .tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}

.tool-card .tool-icon.blue { background: #EEF2FF; }
.tool-card .tool-icon.green { background: #ECFDF5; }
.tool-card .tool-icon.yellow { background: #FFFBEB; }
.tool-card .tool-icon.purple { background: #F5F3FF; }
.tool-card .tool-icon.red { background: #FEF2F2; }
.tool-card .tool-icon.cyan { background: #ECFEFF; }
.tool-card .tool-icon.orange { background: #FFF7ED; }
.tool-card .tool-icon.pink { background: #FDF2F8; }

.tool-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Tool Page Layout */
.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.tool-header {
  margin-bottom: 32px;
}

.tool-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-header p {
  font-size: 15px;
  color: var(--text-light);
}

.tool-body {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group textarea,
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--bg);
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: #D97706;
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Result Display */
.result-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.result-box h4 {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
  font-weight: 600;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 12px;
}

.stat-item .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-item .stat-label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

/* Color Preview */
.color-preview {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: background-color 0.3s;
}

.color-values {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.color-value-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.color-value-item .label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.color-value-item .value {
  font-size: 14px;
  font-weight: 500;
  font-family: "SF Mono", "Fira Code", monospace;
}

/* QR Code */
#qrcode-output {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  margin-top: 20px;
}

#qrcode-output canvas,
#qrcode-output img {
  border-radius: 8px;
}

/* Password Display */
.password-display {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 22px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  word-break: break-all;
  letter-spacing: 2px;
  margin-bottom: 16px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Password Options */
.password-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.password-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.password-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Unit Converter */
.converter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.converter-row input {
  flex: 1;
}

.converter-row select {
  width: 160px;
}

.swap-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.swap-btn:hover {
  background: var(--primary-dark);
  transform: rotate(180deg);
}

/* Share Section */
.share-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 20px;
  text-align: center;
}

.share-section p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 20px;
}

.share-qr {
  display: inline-block;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px 16px;
  box-shadow: var(--shadow);
}

.share-qr #site-qrcode {
  display: flex;
  justify-content: center;
}

.share-qr #site-qrcode img,
.share-qr #site-qrcode canvas {
  border-radius: 8px;
}

.share-tip {
  font-size: 13px !important;
  color: var(--text-light) !important;
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

/* Footer */
.site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-top: 60px;
}

.site-footer a {
  color: var(--text-light);
}

.footer-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.footer-links span {
  color: var(--border);
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 20px;
  padding: 8px 16px;
  background: #EEF2FF;
  border-radius: 8px;
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--primary);
  color: white;
}

/* Responsive */

/* === 导航链接区 === */
.guide-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 0;
  font-size: 0.85rem;
  gap: 8px;
}
.guide-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  background: rgba(91,95,199,0.08);
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.2s;
}
.guide-link:hover {
  background: rgba(91,95,199,0.16);
}
.lang-switch {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: all 0.2s;
}
.lang-switch:hover {
  background: rgba(91,95,199,0.08);
  border-color: var(--primary);
}
/* 手机端"更多"菜单 */
.guide-more-wrap {
  position: relative;
  display: none;
}
.guide-more-btn {
  background: rgba(91,95,199,0.08);
  color: var(--primary);
  border: none;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.guide-more-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
  margin-top: 4px;
}
.guide-more-menu.show {
  display: block;
}
.guide-more-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.guide-more-menu a:hover {
  background: rgba(91,95,199,0.08);
}
/* 点击外部关闭菜单 */
.guide-more-menu a:hover + .guide-more-menu { display: none; }

@media (max-width: 768px) {
  .hero {
    padding: 24px 16px 16px;
  }

  .hero h1 {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .hero p {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .smart-paste-box {
    display: none;
  }

  /* ===== 分类导航吸顶 ===== */
  .category-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    gap: 6px;
    padding: 10px 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
  }
  .category-nav::-webkit-scrollbar { display: none; }
  .cat-btn {
    padding: 7px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 手机端导航简化 */
  .guide-links { display: none; }
  .guide-more-wrap { display: block; }
  .guide-nav-bar { padding: 6px 12px 0; }
  .lang-switch { font-size: 0.75rem; padding: 3px 8px; }

  /* 搜索框防iOS缩放 */
  .search-box input {
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 12px;
  }

  /* ===== 手机端2列工具网格 ===== */
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .tool-card {
    padding: 14px 8px 12px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-white);
    transition: all 0.2s;
  }
  .tool-card .tool-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 22px;
    margin: 0 auto 8px;
  }
  .tool-card h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.3;
    color: var(--text);
  }
  .tool-card p {
    display: none !important;
  }
  .tool-card:hover, .tool-card:active {
    transform: none;
    box-shadow: var(--shadow);
    background: var(--bg-white);
  }

  /* 子分类标题在手机端隐藏 */
  .subcat-header { display: none !important; }

  /* ===== 概览模式：每个分类独立区块 ===== */
  .cat-section {
    margin-bottom: 16px;
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 16px 14px 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }
  .cat-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  .cat-section-title .cat-count {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-light);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
  }
  .cat-section-title .cat-more {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary);
    margin-left: auto;
  }
  .cat-section-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .cat-section-grid .tool-card {
    padding: 14px 6px 12px;
    border-radius: 12px;
  }
  .cat-section-grid .tool-card .tool-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
    margin: 0 auto 6px;
  }
  .cat-section-grid .tool-card h3 { font-size: 12px; }
  .cat-section-grid .tool-card p { display: none !important; }

  /* 常用工具区手机端 */
  .cat-popular {
    padding: 14px 12px 10px;
    border-radius: 16px;
  }
  .cat-popular .cat-section-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .cat-popular .tool-card { padding: 14px 6px 12px; }

  /* 暗色模式分类区块 */
  [data-theme="dark"] .cat-section {
    background: var(--bg-white);
    border-color: var(--border);
  }

  .tool-body { padding: 20px; }
  .password-options { grid-template-columns: 1fr; }
  .converter-row { flex-direction: column; }
  .converter-row select { width: 100%; }
  .nav-links { display: none; }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* 反馈浮动按钮 */
.feedback-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.feedback-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5B5FC7, #7C7FE0);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transition: all 0.3s;
}
.feedback-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(99,102,241,0.5);
}
.feedback-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
.feedback-modal.active {
  display: flex;
}
.feedback-modal-content {
  background: white;
  border-radius: 16px;
  padding: 28px 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
}
.feedback-modal-content h3 {
  font-size: 18px;
  margin: 0 0 6px;
  color: #1e293b;
}
.feedback-modal-content .feedback-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 18px;
}
.feedback-modal-content textarea {
  width: 100%;
  height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.feedback-modal-content textarea:focus {
  outline: none;
  border-color: #6366f1;
}
.feedback-modal-content input[type="text"] {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  margin-top: 10px;
  transition: border-color 0.2s;
}
.feedback-modal-content input[type="text"]:focus {
  outline: none;
  border-color: #6366f1;
}
.feedback-modal-content .feedback-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}
.feedback-modal-content .btn-cancel {
  padding: 8px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
}
.feedback-modal-content .btn-cancel:hover {
  background: #f8fafc;
}
.feedback-modal-content .btn-submit {
  padding: 8px 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #5B5FC7, #7C7FE0);
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.feedback-modal-content .btn-submit:hover {
  opacity: 0.9;
}
.feedback-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}
.feedback-close:hover {
  color: #64748b;
}
@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .tool-card {
    padding: 12px 6px 10px;
  }
  .tool-card .tool-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
    margin: 0 auto 6px;
  }
  .tool-card h3 {
    font-size: 12px;
  }
  .tool-card p {
    display: none !important;
  }
  /* 概览区块小屏适配 */
  .cat-section { padding: 12px 10px 10px; margin-bottom: 12px; }
  .cat-section-title { font-size: 0.95rem; padding-bottom: 8px; margin-bottom: 8px; }
  .cat-section-grid { gap: 8px !important; }
  .cat-section-grid .tool-card { padding: 10px 4px 8px; }
  .cat-section-grid .tool-card .tool-icon { width: 36px; height: 36px; font-size: 17px; }
  .cat-section-grid .tool-card h3 { font-size: 0.78rem; }

  .feedback-fab { bottom: 16px; right: 16px; }
  .feedback-btn { width: 46px; height: 46px; font-size: 18px; }
  .feedback-modal-content { padding: 20px 18px; }
}

/* 使用说明 & 场景 */
.usage-section {
  margin: 16px 0 24px;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  overflow: hidden;
  background: #f8faff;
}
.usage-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.usage-toggle:hover {
  background: #eef2ff;
}
.usage-toggle h4 {
  margin: 0;
  font-size: 14px;
  color: #4f46e5;
  display: flex;
  align-items: center;
  gap: 6px;
}
.usage-toggle .arrow {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.3s;
}
.usage-section.open .arrow {
  transform: rotate(180deg);
}
.usage-body {
  display: none;
  padding: 0 16px 16px;
}
.usage-section.open .usage-body {
  display: block;
}
.usage-body ol, .usage-body ul {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 14px;
  line-height: 2;
}
.usage-body li {
  padding-left: 4px;
}
.usage-body .tip {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}
.usage-body .scenario-item {
  padding: 10px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.usage-body .scenario-item:last-child {
  border-bottom: none;
}
.usage-body .scenario-item .scenario-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  margin-bottom: 4px;
}
.usage-body .scenario-item .scenario-desc {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

/* 工具使用指南 */
.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  transition: all 0.2s;
  line-height: 1;
}
.guide-icon:hover {
  background: #6366f1;
  color: white;
}
.guide-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10001;
  justify-content: center;
  align-items: center;
}
.guide-modal.active { display: flex; }
.guide-modal-box {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
}
.guide-modal-box h3 {
  margin: 0 0 16px;
  font-size: 17px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-modal-box h5 {
  margin: 16px 0 8px;
  font-size: 14px;
  color: #4f46e5;
}
.guide-modal-box ol {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 14px;
  line-height: 2;
}
.guide-modal-box .tip {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}
.guide-modal-box .scene {
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.guide-modal-box .scene:last-child { border-bottom: none; }
.guide-modal-box .scene b {
  font-size: 13px;
  color: #1e293b;
}
.guide-modal-box .scene p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.guide-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
}
.guide-close:hover { color: #64748b; }

/* Dark Mode - Common Inline Style Overrides */
[data-theme="dark"] .calc-btn.operator { background: #2A2A45; border-color: #3A3A56; }
[data-theme="dark"] .calc-btn.function { background: #322460; border-color: #4A3A70; }
[data-theme="dark"] .calc-btn.clear { background: #3A1E1E; border-color: #4A2E2E; }
[data-theme="dark"] .display { background: #1C1C24; border-color: #3A3A46; }
[data-theme="dark"] .display-expression { color: #9090A0; }
[data-theme="dark"] .display-result { color: #D8D8E0; }

/* General dark overrides for hardcoded colors in tool pages */
[data-theme="dark"] .color-value-item { background: #1C1C24; border-color: #3A3A46; }
[data-theme="dark"] .password-display { background: #1C1C24; border-color: #3A3A46; color: #D8D8E0; }
[data-theme="dark"] .result-box { background: #1C1C24; border-color: #3A3A46; }
[data-theme="dark"] .stat-item .stat-value { color: #9B9FE0; }
[data-theme="dark"] .btn-secondary { background: #26262F; color: #D8D8E0; border-color: #3A3A46; }
[data-theme="dark"] .btn-secondary:hover { background: #3A3A46; }
[data-theme="dark"] .share-qr { background: #26262F; border-color: #3A3A46; }

/* Fix textarea/input in dark mode */
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] select {
  background: #1C1C24;
  color: #D8D8E0;
  border-color: #3A3A46;
}

/* Fix tool icon backgrounds in mobile grid */

/* === 导航链接区 === */
.guide-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 0;
  font-size: 0.85rem;
  gap: 8px;
}
.guide-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  background: rgba(91,95,199,0.08);
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.2s;
}
.guide-link:hover {
  background: rgba(91,95,199,0.16);
}
.lang-switch {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: all 0.2s;
}
.lang-switch:hover {
  background: rgba(91,95,199,0.08);
  border-color: var(--primary);
}
/* 手机端"更多"菜单 */
.guide-more-wrap {
  position: relative;
  display: none;
}
.guide-more-btn {
  background: rgba(91,95,199,0.08);
  color: var(--primary);
  border: none;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.guide-more-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
  margin-top: 4px;
}
.guide-more-menu.show {
  display: block;
}
.guide-more-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.guide-more-menu a:hover {
  background: rgba(91,95,199,0.08);
}
/* 点击外部关闭菜单 */
.guide-more-menu a:hover + .guide-more-menu { display: none; }

@media (max-width: 768px) {
  [data-theme="dark"] .tool-card { background: transparent; }
  [data-theme="dark"] .tool-card:hover, [data-theme="dark"] .tool-card:active { background: transparent; }
}
