/* ================================================================
   TechTools — Global Common Styles (common.css)
   Shared by: index.html, tools/*, about/*
   ================================================================ */

/* ------------------------------------------------------------
   1. CSS Variables
   ------------------------------------------------------------ */
:root {
  --bg-primary: #030014;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.4);
  --accent-cyan: #2EA7FF;
  --accent-purple: #9381FF;
  --accent-teal: #13DDC4;
  --accent-magenta: #FF006E;
  --accent-amber: #FFB454;
  --accent-rose: #FF4D6D;
  --accent-sky: #4DC9FF;
  --accent-doc: #06B6D4;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --radius-card: 24px;
  --radius-btn: 99px;
  --font-hero: 'Inter Tight', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  --btn-glow-cyan: rgba(46, 167, 255, 0.4);
  --btn-glow-purple: rgba(56, 23, 207, 0.4);
  --btn-border-glow: rgba(46, 167, 255, 0.45);
  --glow-purple-soft: rgba(147, 129, 255, 0.12);
  --glow-purple-base: rgba(147, 129, 255, 0.22);
  --glow-purple-strong: rgba(147, 129, 255, 0.4);
  --glow-purple-intense: rgba(147, 129, 255, 0.55);
  --navbar-height: 64px;
  --cat-format: var(--accent-cyan);
  --cat-text: var(--accent-purple);
  --cat-generator: var(--accent-teal);
  --cat-calculator: var(--accent-amber);
  --cat-image: var(--accent-magenta);
  --cat-dev: var(--accent-sky);
  --cat-doc: var(--accent-doc);
  --cat-life: #10B981;
  --cat-study: #6366F1;
}

/* ------------------------------------------------------------
   2. Font Import
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=Inter+Tight:wght@100..900&display=swap');

/* ------------------------------------------------------------
   3. Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------
   4. Page Container (二级页面)
   ------------------------------------------------------------ */
.page-container {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--navbar-height) + 64px);
  padding-bottom: 64px;
  padding-left: 80px;
  padding-right: 80px;
  min-height: calc(100vh - 280px);
  max-width: 1400px;
  margin: 0 auto;
}

.page-container.tool-page {
  padding-top: calc(var(--navbar-height) + 48px);
  padding-bottom: 48px;
}

/* ------------------------------------------------------------
   5. Navigation
   ------------------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 80px;
  background: rgba(3, 0, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  background: rgba(3, 0, 20, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  font-family: var(--font-hero);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  transition: text-shadow 0.3s ease;
}

.nav-logo:hover {
  text-shadow: 0 0 20px var(--accent-cyan), 0 0 40px rgba(46, 167, 255, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

/* Navbar dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  user-select: none;
}
.nav-dropdown-trigger::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.nav-dropdown:hover .nav-dropdown-trigger {
  color: var(--text-primary);
}
.nav-dropdown:hover .nav-dropdown-trigger::after {
  border-color: var(--text-primary);
  transform: rotate(-135deg) translateY(-1px);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(10, 5, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 101;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}
.nav-dropdown-menu a {
  display: block !important;
  padding: 8px 20px !important;
  font-size: 14px !important;
  color: var(--text-secondary) !important;
  transition: background 0.2s ease, color 0.2s ease !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.nav-dropdown-menu a::after { display: none !important; }
.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

/* ------------------------------------------------------------
   6. Button Base System
   ------------------------------------------------------------ */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  transition:
    letter-spacing 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.btn-primary {
  padding: 10px 24px;
  font-size: 14px;
  background: rgba(56, 23, 207, 0.12);
  border: 1px solid rgba(147, 129, 255, 0.3);
  box-shadow:
    0 0 16px var(--glow-purple-soft),
    0 0 32px rgba(147, 129, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-primary:hover {
  letter-spacing: 0.10em;
  transform: translateY(-3px);
  background: rgba(56, 23, 207, 0.25);
  border-color: rgba(147, 129, 255, 0.55);
  box-shadow:
    0 0 36px var(--glow-purple-strong),
    0 0 64px var(--glow-purple-base),
    0 0 96px rgba(147, 129, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
  letter-spacing: 0.02em;
  transform: translateY(0) scale(0.96);
  background: rgba(56, 23, 207, 0.35);
  box-shadow: 0 0 12px var(--glow-purple-base);
  transition: transform 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94), letter-spacing 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary:disabled,
.btn-primary.disabled {
  opacity: 0.5; cursor: not-allowed; pointer-events: none;
  transform: none; letter-spacing: 0.02em;
  box-shadow: 0 0 8px var(--glow-purple-soft);
}

.btn-secondary {
  padding: 18px 40px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(147, 129, 255, 0.18);
  box-shadow: 0 0 12px var(--glow-purple-soft), 0 0 28px rgba(147, 129, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
  letter-spacing: 0.08em;
  transform: translateY(-3px);
  background: rgba(56, 23, 207, 0.12);
  border-color: rgba(147, 129, 255, 0.45);
  box-shadow: 0 0 32px var(--glow-purple-strong), 0 0 56px var(--glow-purple-base), 0 0 80px rgba(147, 129, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-secondary:active {
  letter-spacing: 0.02em;
  transform: translateY(0) scale(0.96);
  background: rgba(56, 23, 207, 0.18);
  box-shadow: 0 0 10px var(--glow-purple-base);
  transition: transform 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94), letter-spacing 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-secondary:disabled,
.btn-secondary.disabled {
  opacity: 0.5; cursor: not-allowed; pointer-events: none;
  transform: none; letter-spacing: 0.02em;
}

/* Small button states */
.btn-sm:disabled,
.btn-sm.disabled {
  opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(3); opacity: 0; }
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(147, 129, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transition: all 0.25s ease;
  box-shadow: 0 0 10px var(--glow-purple-soft);
}
.btn-sm:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(147, 129, 255, 0.4);
  box-shadow: 0 0 20px var(--glow-purple-base), 0 0 36px rgba(147, 129, 255, 0.08);
}

/* ------------------------------------------------------------
   7. Card System
   ------------------------------------------------------------ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
}

.tool-card {
  position: relative;
  padding: 32px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow:
    0 0 24px var(--glow-purple-soft),
    0 0 48px rgba(147, 129, 255, 0.04);
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(147, 129, 255, 0.5) 0%, transparent 40%, transparent 60%, rgba(147, 129, 255, 0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.25;
  transition: opacity 0.4s ease;
}

.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle 320px at calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%), rgba(147, 129, 255, 0.45) 0%, transparent 70%);
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
  will-change: opacity;
}
.tool-card:hover::after { opacity: 1; }
.tool-card:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(147, 129, 255, 0.35);
  box-shadow:
    0 0 36px var(--glow-purple-strong),
    0 0 72px var(--glow-purple-base),
    0 8px 32px rgba(0, 0, 0, 0.3);
}
.tool-card:hover::before { opacity: 0.6; }

.tool-card.card-cyan  { --card-accent: var(--accent-cyan);  --card-glow: rgba(46, 167, 255, 0.3); }
.tool-card.card-purple{ --card-accent: var(--accent-purple);--card-glow: rgba(147, 129, 255, 0.3); }
.tool-card.card-teal  { --card-accent: var(--accent-teal);  --card-glow: rgba(19, 221, 196, 0.3); }
.tool-card.card-magenta{--card-accent: var(--accent-magenta);--card-glow: rgba(255, 0, 110, 0.3);}
.tool-card.card-amber { --card-accent: var(--accent-amber); --card-glow: rgba(255, 180, 84, 0.3); }
.tool-card.card-sky   { --card-accent: var(--accent-sky);   --card-glow: rgba(77, 201, 255, 0.3); }
.tool-card.card-life  { --card-accent: var(--cat-life);   --card-glow: rgba(16, 185, 129, 0.3); }
.tool-card.card-study { --card-accent: var(--cat-study);  --card-glow: rgba(99, 102, 241, 0.3); }
.tool-card.card-doc   { --card-accent: var(--cat-doc);    --card-glow: rgba(6, 182, 212, 0.3); }

.card-icon-bg {
  position: relative;
  z-index: 1;
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease;
}
.tool-card:hover .card-icon-bg {
  transform: scale(1.15);
  box-shadow: 0 0 28px rgba(147, 129, 255, 0.45), 0 0 56px rgba(147, 129, 255, 0.15);
}
.card-icon-bg.icon-cyan    { background: linear-gradient(135deg, rgba(46,167,255,0.2), rgba(147,129,255,0.2)); }
.card-icon-bg.icon-purple  { background: linear-gradient(135deg, rgba(147,129,255,0.2), rgba(192,120,255,0.2)); }
.card-icon-bg.icon-teal    { background: linear-gradient(135deg, rgba(19,221,196,0.2), rgba(13,245,204,0.2)); }
.card-icon-bg.icon-magenta { background: linear-gradient(135deg, rgba(255,0,110,0.2), rgba(255,120,180,0.2)); }
.card-icon-bg.icon-amber   { background: linear-gradient(135deg, rgba(255,180,84,0.2), rgba(255,210,120,0.2)); }
.card-icon-bg.icon-sky     { background: linear-gradient(135deg, rgba(77,201,255,0.2), rgba(140,225,255,0.2)); }
.card-icon-bg.icon-life    { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(52,211,153,0.2)); }
.card-icon-bg.icon-study   { background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(129,140,248,0.2)); }
.card-icon-bg.icon-doc     { background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(45,212,191,0.2)); }

.card-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-hero);
  font-size: 24px;
  font-weight: 600;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.tool-card:hover .card-title {
  color: var(--accent-purple);
  text-shadow: 0 0 20px rgba(147, 129, 255, 0.6), 0 0 40px rgba(147, 129, 255, 0.3);
}

.card-desc {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.tool-card:hover .card-desc {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 0 12px rgba(147, 129, 255, 0.2);
}

/* Card enter/exit animations (for category filter transitions) */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes cardExit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.94);
  }
}
.tool-card.card-entering {
  animation: cardEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-fill-mode: backwards;
}
.tool-card.card-exiting {
  animation: cardExit 0.28s cubic-bezier(0.4, 0, 0.6, 1) forwards;
  pointer-events: none;
}

/* Category cards (for homepage) */
.category-card {
  position: relative;
  padding: 40px 32px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.25);
}
.category-card .cat-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.category-card .cat-name {
  font-family: var(--font-hero);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}
.category-card .cat-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.category-card .cat-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   8. Footer
   ------------------------------------------------------------ */
.footer {
  position: relative;
  z-index: 2;
  padding: 60px 80px 40px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.footer-logo {
  font-family: var(--font-hero);
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  cursor: pointer;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  user-select: none;
}
.footer-logo:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(46, 167, 255, 0.5);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--accent-cyan); }
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   9. Breadcrumb Navigation
   ------------------------------------------------------------ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb .separator {
  color: var(--text-muted);
  user-select: none;
}
.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ------------------------------------------------------------
   10. Toast Notifications
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: var(--text-primary);
  animation: toastIn 0.35s ease-out, toastOut 0.3s ease-in 2.2s forwards;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.toast.success { border-left: 3px solid var(--accent-teal); }
.toast.error   { border-left: 3px solid var(--accent-rose); }
.toast.info    { border-left: 3px solid var(--accent-cyan); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(50px); }
}

/* ------------------------------------------------------------
   11. Category Tags (filter pills)
   ------------------------------------------------------------ */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.cat-tab {
  padding: 8px 20px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.cat-tab:hover {
  border-color: rgba(147, 129, 255, 0.3);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.cat-tab.active {
  background: rgba(147, 129, 255, 0.18);
  border-color: rgba(147, 129, 255, 0.5);
  color: var(--accent-purple);
  box-shadow: 0 0 24px var(--glow-purple-base), 0 0 48px rgba(147, 129, 255, 0.08);
  transform: scale(1.05);
}

/* ------------------------------------------------------------
   12. Tool Page Utilities
   ------------------------------------------------------------ */

/* Dual-pane layout */
.tool-layout-dual {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}
.tool-pane {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
}
.tool-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
}
.tool-divider .arrow-icon {
  font-size: 24px;
  color: var(--accent-cyan);
}

/* Vertical layout (generator type) */
.tool-layout-vertical {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tool-config-panel,
.tool-result-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
}
.tool-result-panel { min-height: 200px; }

/* Textareas */
.tool-textarea {
  width: 100%;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}
.tool-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(46, 167, 255, 0.1);
}
.tool-textarea::placeholder { color: var(--text-muted); }
.tool-textarea.error {
  border-color: var(--accent-rose);
  box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.1);
}
.tool-textarea.output { background: rgba(46, 167, 255, 0.03); }

/* Params row */
.tool-params {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

/* Tool header */
.tool-header {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.tool-header .tool-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.tool-header h1 {
  font-family: var(--font-hero);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 6px;
}
.tool-header .tool-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Error hint */
.error-hint {
  font-size: 13px;
  color: var(--accent-rose);
  margin-top: 6px;
  display: none;
}
.error-hint.visible { display: block; }

/* Info / usage sections */
.tool-info-section {
  margin-top: 48px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}
.tool-info-section h3 {
  font-family: var(--font-hero);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.tool-info-section ul {
  list-style: none;
  padding: 0;
}
.tool-info-section li {
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.tool-info-section li::before {
  content: '\00B7 ';
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Related tools section */
.related-tools { margin-top: 48px; }
.related-tools h3 {
  font-family: var(--font-hero);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state p { font-size: 16px; }
.empty-state .suggestion-link {
  color: var(--accent-cyan);
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
  padding: 2px 4px;
}
.empty-state .suggestion-link:hover {
  color: var(--accent-teal);
  text-decoration: underline;
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed; bottom: 32px; right: 32px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(56,23,207,0.2); border: 1px solid rgba(147, 129, 255, 0.3);
  color: var(--text-primary); font-size: 20px;
  cursor: pointer; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: all 0.35s cubic-bezier(0.175,0.885,0.32,1.275);
  box-shadow: 0 0 20px var(--glow-purple-base);
}
.scroll-top-btn.visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.scroll-top-btn:hover {
  background: rgba(56,23,207,0.4); border-color: rgba(147, 129, 255, 0.6);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 0 36px var(--glow-purple-strong), 0 0 64px var(--glow-purple-base);
}
@media (max-width: 480px) {
  .scroll-top-btn { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 18px; }
}

/* Search input on tools overview */
.tool-search-input {
  width: 100%;
  max-width: 600px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(147, 129, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.35s ease;
  margin-bottom: 24px;
  box-shadow: 0 0 14px var(--glow-purple-soft), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.tool-search-input:focus {
  border-color: rgba(147, 129, 255, 0.55);
  box-shadow:
    0 0 28px var(--glow-purple-base),
    0 0 48px rgba(147, 129, 255, 0.08),
    0 0 0 3px rgba(147, 129, 255, 0.12);
}
.tool-search-input::placeholder { color: var(--text-muted); }

/* Category hero (on category pages) */
.cat-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 32px;
}
.cat-hero .cat-hero-icon {
  font-size: 48px;
  flex-shrink: 0;
}
.cat-hero .cat-hero-name {
  font-family: var(--font-hero);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cat-hero .cat-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
}

/* About page tech tags */
.tech-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-secondary);
}
.tech-tag:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Changelog timeline */
.changelog-item {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.changelog-item .cl-date {
  flex-shrink: 0;
  width: 90px;
  font-size: 13px;
  color: var(--text-muted);
}
.changelog-item .cl-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin-top: 6px;
}
.changelog-item .cl-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------
   13. Glass Fallback
   ------------------------------------------------------------ */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .navbar, .tool-card, .category-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .navbar { background: rgba(3, 0, 20, 0.92); }
  .tool-card, .category-card { background: rgba(255, 255, 255, 0.08); }
}

/* ------------------------------------------------------------
   14. Responsive — 4 breakpoints
   ------------------------------------------------------------ */

/* ≥1280px: default — no override needed */

/* 769px – 1199px */
@media (max-width: 1199px) {
  .page-container {
    padding-left: 40px;
    padding-right: 40px;
    max-width: 100%;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .navbar { padding: 0 40px; }
  .nav-links { gap: 28px; }
  .tool-layout-dual {
    grid-template-columns: 1fr;
  }
  .tool-layout-dual .tool-divider {
    flex-direction: row;
    padding: 8px 0;
  }
}

/* 481px – 768px */
@media (max-width: 768px) {
  .page-container {
    padding-left: 24px;
    padding-right: 24px;
  }
  .navbar { padding: 0 24px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 14px; }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .footer { padding: 40px 24px 32px; }
  .footer-links { gap: 20px; }
  .tool-textarea { min-height: 160px; }
  .tool-header { flex-direction: column; gap: 12px; }
  .breadcrumb { font-size: 13px; }
  .cat-hero { flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }
}

/* ≤480px */
@media (max-width: 480px) {
  .page-container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .navbar .btn-primary { display: none; }
  /* Hamburger menu */
  .hamburger-btn {
    display: flex !important;
    flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 200;
  }
  .hamburger-btn span {
    display: block; width: 22px; height: 2px;
    background: var(--text-primary); border-radius: 2px;
    transition: all 0.3s ease;
  }
  .hamburger-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .hamburger-btn.open span:nth-child(2) { opacity: 0; }
  .hamburger-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  /* Mobile nav panel */
  .mobile-nav-panel {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(5, 2, 25, 0.97);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 99; display: flex; flex-direction: column;
    padding: 24px; gap: 4px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .mobile-nav-panel.open { transform: translateX(0); }
  .mobile-nav-panel a {
    display: block; padding: 14px 16px; font-size: 17px;
    color: var(--text-secondary); border-radius: 10px;
    transition: all 0.2s ease; text-decoration: none;
  }
  .mobile-nav-panel a:hover {
    background: rgba(255,255,255,0.08); color: var(--text-primary);
  }
  .mobile-nav-panel .mobile-nav-section {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    padding: 16px 16px 8px; text-transform: uppercase; letter-spacing: 0.08em;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  .footer-links { flex-direction: column; gap: 12px; }
  .tool-pane { padding: 14px; }
  .category-tabs { gap: 6px; }
  .cat-tab { padding: 6px 14px; font-size: 13px; }
}

/* Hamburger hidden above 480px */
.hamburger-btn { display: none; }
.mobile-nav-panel { display: none; }
@media (max-width: 480px) {
  .mobile-nav-panel { display: flex; }
}

/* ------------------------------------------------------------
   15. Text Readability — Glow & Shadow for Dark WebGL Backgrounds
   适用于带有 FloatingLines 背景的页面，为正文文字增加暗色光晕
   提升在发光背景下的可读性。不影响导航栏。
   ------------------------------------------------------------ */

/* ── Tier 1：页面标题 / 卡片标题 / Hero / Footer Logo ── */
.page-container h1,
.cat-hero .cat-hero-name,
.tool-header h1,
.footer-logo {
  text-shadow:
    0 0 36px rgba(0, 0, 0, 0.7),
    0 0 72px rgba(46, 167, 255, 0.18),
    0 2px 4px rgba(0, 0, 0, 0.45);
}

/* ── Tier 2：二级标题 / 卡片标题 / 信息区块标题 ── */
.page-container h3,
.card-title,
.tool-info-section h3,
.related-tools h3 {
  text-shadow:
    0 0 24px rgba(0, 0, 0, 0.6),
    0 0 48px rgba(46, 167, 255, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ── Tier 3：正文段落 / 描述文字 / 面包屑 / Footer ── */
.page-container p,
.card-desc,
.breadcrumb,
.breadcrumb a,
.breadcrumb .current,
.breadcrumb .separator,
.cat-hero .cat-hero-desc,
.tool-header .tool-desc,
.tool-info-section li,
.changelog-item .cl-text,
.changelog-item .cl-date,
.footer-links a,
.footer-copy {
  text-shadow:
    0 0 16px rgba(0, 0, 0, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ── Tier 4：小字 / 交互元素 / 标签 / 按钮 ── */
.cat-tab,
.tool-search-input,
.empty-state p,
.empty-state .empty-icon,
.suggestion-link,
.btn-primary,
.btn-secondary,
.btn-sm,
.tech-tag {
  text-shadow:
    0 0 14px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ── 搜索框文字 ── */
.tool-search-input {
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ── 空状态建议词额外增强，链接色文字需更明显的光晕 ── */
.suggestion-link {
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ═════════════════════════════════════════════════════════════
   16. Accessibility
   ═════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
