/* ====== Diysb Tools - 现代化风格全局CSS ====== */
/* 基于 Next.js 纯静态项目，模块化 CSS 设计 */

/* ========================================================
   1. CORE - 核心变量与基础重置
   ======================================================== */

/* 颜色系统 - 日间模式 */
:root, [data-theme="light"] {
  /* 主色调 */
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  
  /* 中性色 */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --black: #000000;
  
  /* 语义化变量 */
  --bg-primary: var(--gray-50);
  --bg-secondary: var(--white);
  --bg-tertiary: var(--gray-100);
  --bg-quaternary: var(--gray-200);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-400);
  --border-color: var(--gray-200);
  --accent-color: var(--primary-color);
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border-primary: #e2e8f0;
  --border-secondary: #d1d5db;
  --accent-primary: #2563eb;
  --shadow-primary: rgba(0, 0, 0, 0.05);
  --shadow-secondary: rgba(37, 99, 235, 0.1);
}

/* 暗色主题 */
[data-theme="dark"] {
  --bg-primary: var(--gray-900);
  --bg-secondary: var(--gray-800);
  --bg-tertiary: var(--gray-700);
  --bg-quaternary: var(--gray-600);
  --text-primary: var(--white);
  --text-secondary: var(--gray-300);
  --text-tertiary: var(--gray-400);
  --border-color: var(--gray-600);

  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-tertiary: #8a8a8a;
  --border-primary: #404040;
  --border-secondary: #555555;
  --accent-primary: #64b5f6;
  --shadow-primary: rgba(0, 0, 0, 0.4);
  --shadow-secondary: rgba(100, 181, 246, 0.3);
}

/* Hero组件暗色主题 */
[data-theme="dark"] .hero-title-gradient {
  background: linear-gradient(to right, #EC4899, #A78BFA, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: none;
}

[data-theme="dark"] .tool-chip {
  background: var(--bg-secondary);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tool-name {
  color: var(--text-primary);
}

[data-theme="dark"] .search-input {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-input:focus {
  border-color: var(--primary-color);
  border-bottom-color: var(--bg-secondary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .autocomplete-dropdown {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .group-header {
  background-color: var(--primary-color);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .option-item:hover {
  background-color: var(--bg-tertiary);
}

[data-theme="dark"] .option-item.selected {
  background-color: var(--bg-quaternary);
}

[data-theme="dark"] .option-description {
  color: var(--text-tertiary);
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================================
   2. UTILITY - 实用工具类
   ======================================================== */

/* 容器 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 显示和布局 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* 间距 */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* 文字 */
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* ========================================================
   3. HEADER - 头部导航模块
   ======================================================== */

.header {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  min-height: 60px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  height: 60px;
}

.header-content img {
  display: block;
}

.header-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* 移动端菜单按钮 - 汉堡菜单 */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: var(--bg-quaternary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* 日间夜间切换按钮 - 无边框 */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

/* 自定义国际化下拉菜单 */
.language-dropdown {
  position: relative;
  display: inline-block;
}

.language-trigger {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
}

.language-trigger:hover {
  background-color: var(--bg-quaternary);
  border-color: var(--primary-color);
}

.language-chevron {
  transition: transform 0.2s ease;
  position: absolute;
  right: 0.75rem;
}

.language-chevron.open {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 0.5rem;
  min-width: 120px;
  z-index: 1000;
  list-style: none;
  padding: 0.25rem;
  margin: 0;
}

.language-option {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.50rem 1rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.language-option:hover {
  background-color: var(--bg-tertiary);
}

.language-option.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* ========================================================
   4. HOME - 首页模块
   ======================================================== */

/* Hero组件容器 */
.hero-container {
  max-width: 1400px;
  margin: 12px auto 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .hero-container {
    padding: 0 24px;
  }
}

/* Hero组件布局 */
.home {
  padding: 1rem 0 3rem 0;
}

.hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Hero组件标题样式 */
.hero-title {
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-size: 26px;
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .hero-title {
    font-size: 36px;
  }
}

.hero-title-gradient {
  background: linear-gradient(to right, #EC4899, #8B5CF6, var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: none;
}

.hero-description {
  text-align: center;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 24px;
  font-size: 14px;
}

@media (min-width: 900px) {
  .hero-description {
    font-size: 17px;
  }
}

/* Hero搜索组件 */
.search-container {
  position: relative;
  margin-bottom: 24px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}



.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.dropdown-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: transform 0.2s ease;
}

/* 自动补全下拉菜单 */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-radius: 12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border: 0px solid var(--border-color);
  border-top: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.group-header {
  position: sticky;
  top: 0;
  padding: 8px 12px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--primary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.option-item {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.option-item:hover {
  background-color: var(--bg-tertiary);
}

.option-item.selected {
  background-color: var(--bg-quaternary);
}

.option-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.option-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(59, 130, 246, 0.1);
  flex-shrink: 0;
}

.option-text {
  flex: 1;
}

.option-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.option-description {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 快速访问网格 */
.quick-access-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  justify-content: center;
}

/* 工具卡片 */
.tool-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* 工具卡片的动态hover效果 */
.quick-access-grid .tool-chip {
  transition: all 0.3s ease;
}

.quick-access-grid .tool-chip:hover {
  transform: translateY(-2px);
}

/* 工具卡片内部元素 */
.tool-name {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.tool-close-button {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.tool-close-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.tool-close-button.bookmarked-true {
  color: var(--primary-color);
  background-color: rgba(59, 130, 246, 0.1);
}

.tool-close-button.bookmarked-true:hover {
  background-color: rgba(59, 130, 246, 0.2);
}

/* 实用工具类 */
.flex {
  display: flex;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.wrap {
  flex-wrap: wrap;
}

.flex-row {
  flex-direction: row;
}

.gap-2 {
  gap: 8px;
}

.mb-0 {
  margin-bottom: 0;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #6366F1, #FF6B6B, #FFD93D, #6BCF7F, #4ECDC4, #45B7D1, #FFA5A5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
  position: relative;
  animation: titleGradientShift 8s ease-in-out infinite;
}

@keyframes titleGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}


@keyframes emojiRotate {
  0%, 100% { transform: rotate(0deg) scale(1); filter: hue-rotate(0deg); }
  50% { transform: rotate(180deg) scale(1.2); filter: hue-rotate(180deg); }
}


.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
  opacity: 0.9;
}

.search-container {
  margin-bottom: 3rem;
}

.search-input {
  width: 100%;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  border: 1.5px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.15rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  font-weight: 500;
}

.search-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.7;
}

/* 搜索输入框容器 */
.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  border: 1.5px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.15rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.search-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.25);
  /* transform: translateY(-3px); */
  background: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.25rem;
  opacity: 0.7;
  pointer-events: none;
}

/* .search-input:focus ~ .search-icon {
  color: #6366F1;
  transform: translateY(calc(-50% - 3px)) scale(1.15);
  opacity: 1;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.3));
} */

/* 搜索结果区域 */
.search-results-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  margin-top: 0.75rem;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
}

.search-results {
  padding: 0.5rem;
}

.search-result-item {
  border-radius: 12px;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
  background: transparent;
}

.search-result-item:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}



.card-container {
  margin: 4rem auto 0;
  max-width: 1400px;
  padding: 0 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.category-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  padding: 2rem;
  transition: 
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background-color 0.4s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 
    0 4px 20px rgba(0,0,0,0.08),
    inset 0 1px rgba(255,255,255,0.1);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255,255,255,0.03) 0%, 
    rgba(255,255,255,0.01) 50%, 
    rgba(255,255,255,0.03) 100%);
  z-index: -1;
}

/* 日间主题样式 */
[data-theme="light"] .category-card {
  background: var(--white);
  border-color: var(--border-primary);
  box-shadow: 
    0 2px 12px rgba(0,0,0,0.06),
    inset 0 1px rgba(255,255,255,0.8);
}

[data-theme="light"] .category-card::before {
  background: linear-gradient(135deg, 
    rgba(0,0,0,0.015) 0%, 
    rgba(0,0,0,0.003) 50%, 
    rgba(0,0,0,0.015) 100%);
}

.category-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, 
    rgba(255,255,255,0.2), 
    rgba(255,255,255,0.05), 
    rgba(255,255,255,0.2));
  z-index: -2;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* 日间主题边框效果 */
[data-theme="light"] .category-card::after {
  background: linear-gradient(135deg, 
    rgba(0,0,0,0.03), 
    rgba(0,0,0,0.01), 
    rgba(0,0,0,0.03));
}

.category-card:hover {
  transform: translateY(-12px) scale(1.03);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.12),
    0 8px 24px rgba(0,0,0,0.08),
    inset 0 1px rgba(255,255,255,0.1);
}

/* 日间主题hover效果 */
[data-theme="light"] .category-card:hover {
  border-color: var(--gray-200);
  background: var(--white);
  box-shadow: 
    0 8px 24px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.04);
}

.category-card:hover::after {
  opacity: 1;
}

.category-gradient-bar {
  height: 4px;
  border-radius: 4px;
  margin-bottom: 2rem;
  transition: all 0.4s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.category-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
  overflow: visible;
}

.category-icon-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.category-card:hover .category-icon-wrapper {
  transform: scale(1.15);
}

.category-card:hover .category-icon-wrapper .iconify {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

.category-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  position: relative;
  display: inline-block;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--hover-color, var(--primary-color)), transparent);
  transition: width 0.4s ease;
}

.category-card:hover .category-title::after {
  width: 100%;
}

.category-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  font-weight: 400;
}

.category-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.btn {
  padding: 0.9em 1.2em;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}

/* 日间主题下.btn-secondary样式 */
[data-theme="light"] .btn-secondary {
  background: var(--gray-100);
  color: var(--text-secondary);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* 日间主题下.btn-secondary:hover样式 */
[data-theme="light"] .btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

.hover-lift {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

@media (max-width: 768px) {
  .card-container {
    padding: 0 1rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .category-card {
    padding: 1.25rem;
  }
  
  .category-actions {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .btn {
    padding: 0.8em 1em;
    font-size: 0.75rem;
    min-width: 120px;
  }
}

/* ========================================================
   5. TOOLS - 工具页面模块
   ======================================================== */

.tool-page {
  padding: 2rem 0;
}

.tool-header {
  margin-bottom: 2rem;
}

.tool-title {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.tool-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tool-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

.input-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.result-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  position: sticky;
  top: 100px;
}

/* ========================================================
   6. FOOTER - 页脚模块
   ======================================================== */

.footer {
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 3.5rem 0 1.5rem;
  margin-top: 5rem;
  backdrop-filter: blur(16px);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--text-primary), rgba(255,255,255,0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
  opacity: 0.9;
}

.footer-links h4 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.footer-links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.footer-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transition: left 0.4s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
  transform: translateX(8px);
}

.footer-links a:hover::before {
  left: 100%;
}

.footer-links .iconify {
  margin-right: 0.75rem;
  font-size: 18px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.footer-links a:hover .iconify {
  transform: scale(1.2) rotate(5deg);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ========================================================
   7. RESPONSIVE - 响应式设计
   ======================================================== */

/* 移动端抽屉菜单样式 */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.custom-drawer {
  width: 300px;
  background: var(--bg-secondary);
  height: 100%;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.custom-drawer-content {
  padding: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.custom-drawer-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-logo-link {
  display: inline-block;
}

.custom-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.custom-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-list-item {
  padding: 0.75rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.custom-list-item.clickable:hover {
  background: var(--bg-tertiary);
  cursor: pointer;
}

.custom-flex-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}



.custom-icon {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  /* 移动端按钮样式 */
  .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: end;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .btn-secondary:hover {
    background: var(--bg-quaternary);
    border-color: var(--primary-color);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .tool-title {
    font-size: 1.75rem;
  }
}

/* ========================================================
   8. COMPONENT - 通用组件
   ======================================================== */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}



/* 卡片 */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

/* 输入框 */
.input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
}

.input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* ========================================================
   9. UTILITY - 效果和动画
   ======================================================== */

/* 背景渐变效果 */
.home-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(37,99,235,0.05) 0%, transparent 60%);
  pointer-events: none;
}

[data-theme="dark"] .home-background {
  background-image: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 60%);
}

/* Categories组件特殊样式 */
.category-gradient-bar {
  height: 4px;
  border-radius: 12px 12px 0 0;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
}

.category-content {
  position: relative;
}

.category-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.category-header {
  margin-bottom: 1rem;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-title a {
  text-decoration: none;
  color: inherit;
}

.category-title a:hover {
  text-decoration: none;
}

.category-description {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.875rem;
}

.category-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 渐变文字 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 悬停效果 */
.hover-lift:hover {
  transform: translateY(-2px);
  transition: transform 0.2s;
}

/* 淡入动画 */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* 无搜索结果样式 */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 1.1rem;
  font-weight: 500;
  gap: 1rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.no-results:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.no-results svg {
  color: var(--gray-400);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.no-results:hover svg {
  color: var(--gray-500);
  opacity: 1;
  transform: scale(1.1);
}

.no-results span {
  letter-spacing: -0.01em;
  line-height: 1.4;
}

/* ========================================================
   10. CATEGORY PAGE - 类别页面现代化样式
   ======================================================== */

.category-page-container {
  position: relative;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 1rem 60px 1rem;
  max-width: 1400px;
}

.category-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  z-index: 0;
  pointer-events: none;
}

.category-content-wrapper {
  position: relative;
  z-index: 1;
}

.category-hero-section {
  margin: 2rem 0 3rem;
}

.category-hero-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.category-hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.category-hero-content {
  flex: 1;
  min-width: 0;
}

.category-hero-title {
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.category-title-gradient {
  color: var(--text-primary);
}

.category-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.category-hero-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 500px;
}

.category-tool-count-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.badge-icon {
  font-size: 1.1rem;
}

.badge-text {
  color: var(--text-primary);
}

.category-gradient-divider {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  opacity: 0.7;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.category-gradient-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: inherit;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.category-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.category-tool-card {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid transparent;
  overflow: hidden;
  min-height: 120px;
}

.category-tool-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.tool-card-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.tool-icon-container {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.category-tool-card:hover .tool-icon-container {
  transform: scale(1.1) rotate(5deg);
}

.tool-info {
  flex: 1;
  min-width: 0;
}


.tool-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.category-tool-card:hover .tool-card-hover-overlay {
  opacity: 1;
}

.tool-card-border {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 17px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.category-tool-card:hover .tool-card-border {
  opacity: 1;
}

.tool-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .category-page-container {
    padding: 1rem 1rem 3rem;
  }
  
  .category-hero-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .category-hero-meta {
    justify-content: center;
  }
  
  .category-tools-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .category-hero-icon {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 480px) {
  .category-tool-card {
    padding: 1.25rem;
    min-height: 100px;
  }
  
  .tool-icon-container {
    width: 50px;
    height: 50px;
  }
}

/* ====== AllTools组件样式 - 与音频分类页面保持一致 ====== */

.all-tools-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.all-tools-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.all-tools-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.all-tools-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.all-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.all-tool-card {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid transparent;
  overflow: hidden;
  min-height: 120px;
}

.all-tool-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.all-tool-card-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.all-tool-icon-container {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.all-tool-card:hover .all-tool-icon-container {
  transform: scale(1.1) rotate(5deg);
}

.all-tool-text-content {
  flex: 1;
  min-width: 0;
}

.all-tool-name {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;  /* 减小字体大小 */
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.all-tool-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;  /* 减小字体大小 */
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* 响应式设计 - 平板设备 */
@media (max-width: 768px) {
  .all-tools-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* 响应式设计 - 手机设备 */
@media (max-width: 480px) {
  .all-tools-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .all-tool-card {
    padding: 1.25rem;
    min-height: 100px;
  }
  
  .all-tool-icon-container {
    width: 50px;
    height: 50px;
  }
  
  .all-tool-name {
    font-size: 1rem;
  }
  
  .all-tool-description {
    font-size: 0.85rem;
  }
}

/* Modern Tool Header - Clean Professional Design */
.modern-tool-header {
  margin-bottom: 16px;
  position: relative;
}

.modern-tool-header-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 24px;
  gap: 32px;
}

.modern-tool-title-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.modern-tool-icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.1));
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-tool-texts {
  min-width: 0;
  flex: 1;
}

.modern-tool-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.modern-tool-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.modern-bookmark-btn {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.modern-tool-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 8px;
  font-weight: 400;
  opacity: 0.9;
}

.modern-tool-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-top: 12px;
}

.modern-category-tag {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  height: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-primary-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.modern-outlined-btn {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 14px 24px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .modern-tool-header-content {
    flex-direction: column;
    gap: 20px;
  }
  
  .modern-tool-title-section {
    gap: 16px;
  }
  
  .modern-tool-title {
    font-size: 1.8rem;
  }
  
  .modern-tool-icon {
    width: 60px;
    height: 60px;
  }
}

/* Modern Tool Info Component */
.modern-tool-info {
  margin: 24px 0;
  padding: 20px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb, 37, 99, 235), 0.03);
  border: 1px solid rgba(var(--primary-rgb, 37, 99, 235), 0.1);
  backdrop-filter: blur(5px);
}

.modern-tool-info-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modern-tool-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb, 37, 99, 235), 0.08);
  flex-shrink: 0;
}

.modern-tool-info-text {
  flex: 1;
  min-width: 0;
}

.modern-tool-info-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.modern-tool-info-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .modern-tool-info {
    padding: 16px;
  }
}

/* ====== 工具详情页模块 ====== */
.tool-container {
  display: grid;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  background-color: var(--bg-primary);
}
.tool-card-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-primary);
}
.tool-card-box {
  width: 100%;
  height: var(--tool-card-height, 400px);
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-primary);
  background-color: var(--bg-secondary);
  position: relative;
  border-color: var(--border-primary);
  border-width: 1px;
  border-style: solid;
}

.input-header {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* 移动端：默认单列 */
.tool-container {
  grid-template-columns: 1fr;
}
.tool-card-input {
  width: 100%;
  height: var(--tool-card-height, 400px);
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-primary);
  background-color: var(--bg-secondary);
  position: relative;
  padding: 16px;
  border: 1px solid var(--border-secondary); 
}
.tool-card-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--shadow-secondary);
}

/* tool-card-input夜间模式适配 */
[data-theme="dark"] .tool-card-input {
  background-color: var(--gray-800);
  border-color: var(--gray-600);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  color: var(--gray-100);
}

[data-theme="dark"] .tool-card-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* 大屏适配：768px以上 */
@media (min-width: 768px) {
  .tool-container {
    /* 每行2个卡片，铺满整行 */
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 奇数个卡片时，最后一张占满整行 */
  .tool-container:has(> :nth-child(odd):last-child) > :last-child {
    grid-column: 1 / -1;
  }
}

/* 小屏幕下：768px以下 */
@media (max-width: 768px) {
  .tool-container {
    /* 每行1个卡片，占满整行 */
    grid-template-columns: 1fr;
  }
}


/* 锚点定位优化 - 避免定位到 textarea 上 */
#tool {
  scroll-margin-top: 80px;
}

/* InputFooter组件美化样式 */
.input-footer {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
}

.custom-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 36px;
}

.custom-btn-primary {
  background: linear-gradient(45deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.custom-btn-primary:hover {
  background: linear-gradient(45deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* 禁用状态样式 */
.custom-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.custom-btn-primary[disabled] {
  background: linear-gradient(45deg, #94a3b8, #cbd5e1);
  color: #64748b;
  box-shadow: none;
  transform: none;
}

.custom-btn-primary[disabled]:hover {
  background: linear-gradient(45deg, #94a3b8, #cbd5e1);
  color: #64748b;
  box-shadow: none;
  transform: none;
}

.custom-btn-outlined[disabled] {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  box-shadow: none;
}

.custom-btn-outlined[disabled]:hover {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  box-shadow: none;
}

.custom-btn-outlined {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.custom-btn-outlined:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* 暗色主题适配 */
[data-theme="dark"] .custom-btn-outlined {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

[data-theme="dark"] .custom-btn-outlined:hover {
  background: #334155;
  color: #cbd5e1;
}

/* BaseFileInput组件样式 */
.base-file-input-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(/assets/grey-pattern.png);
  position: relative;
  overflow: hidden;
}

.base-file-input-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  height: 100%;
  cursor: pointer;
}

.base-file-input-drag-text {
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}

.base-file-input-description {
  color: var(--text-tertiary);
  font-size: 1rem;
}

.tool-file-result-no-border {
  border: none;
}

.tool-file-result-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.tool-file-result-preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(/assets/grey-pattern.png);
}

.tool-file-result-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.tool-file-result-processed {
  padding: 16px;
  text-align: center;
  color: var(--text-primary);
}

.tool-file-result-empty-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.tool-file-result-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--bg-tertiary);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ToolFileResult图片和视频样式 */
.tool-file-result-img,
.tool-file-result-video {
  max-width: 100%;
  max-height: var(--tool-card-height, 400px);
}

.tool-file-result-audio {
  width: 100%;
  max-width: 500px;
}

.tool-file-result-pdf {
  max-width: 500px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ToolOptions组件高级样式 */
.tool-options {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 20px 0;
}

.tool-options:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .tool-options {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

.tool-options-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 20px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-theme="dark"] .tool-options-header {
  background: linear-gradient(135deg, #1e293b, #334155);
  border-bottom: 1px solid rgba(71, 85, 105, 0.6);
}

.options-icon {
  color: #3b82f6;
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.15));
  transition: transform 0.3s ease;
}

.tool-options:hover .options-icon {
  transform: rotate(15deg);
}

[data-theme="dark"] .options-icon {
  color: #60a5fa;
}

/* TextFieldWithDesc 美化样式 */
.text-field-with-desc {
  margin-bottom: 24px;
}

.text-field-title {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.text-field-container {
  position: relative;
  margin-bottom: 8px;
}

.text-field-wrapper {
  position: relative;
}

.text-field {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.text-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.text-area {
  resize: vertical;
  min-height: auto;
  line-height: 1.5;
}

.text-field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
  pointer-events: none;
}

.text-field[disabled] {
  background-color: var(--gray-50);
  opacity: 0.6;
  cursor: not-allowed;
}

.text-field-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: block;
  line-height: 1.4;
}

/* 暗色主题适配 */
[data-theme="dark"] .text-field {
  background-color: var(--gray-800);
  border-color: var(--gray-600);
  color: var(--gray-100);
}

[data-theme="dark"] .text-field:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .text-field[disabled] {
  background-color: var(--gray-700);
}

[data-theme="dark"] .text-field-icon {
  color: var(--gray-400);
}

[data-theme="dark"] .custom-select {
  background-color: var(--gray-800);
  border-color: var(--gray-600);
  color: var(--gray-100);
}

[data-theme="dark"] .custom-select option {
  background-color: var(--gray-800);
  color: var(--gray-100);
}

.options-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #1e293b, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .options-title {
  background: linear-gradient(135deg, #f1f5f9, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tool-options-content {
  padding: 24px;
}

.options-layout {
  width: 100%;
}

/* ToolOptionGroups组件样式 */
.tool-option-groups {
  width: 100%;
  display: grid;
  gap: 16px;
}

.tool-option-group {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tool-option-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tool-option-group:hover::before {
  transform: scaleX(1);
}

.tool-option-group:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .tool-option-group {
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.8);
}

[data-theme="dark"] .tool-option-group:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.group-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border-radius: 2px;
  display: inline-block;
}

[data-theme="dark"] .group-title {
  color: #f1f5f9;
}

/* 垂直布局样式 */
.tool-option-groups.vertical {
  grid-template-columns: 1fr;
}

/* 响应式设计 */
@media (min-width: 768px) {
  .tool-option-groups:not(.vertical) {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.no-pointer-events {
  cursor: none;
  pointer-events: none;
}

/* Category Page Header - 与详情页布局一致 */
.modern-tool-header-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.modern-tool-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.modern-tool-left-section {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.modern-tool-icon-container {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.1));
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-tool-icon-container svg {
  width: 40px;
  height: 40px;
}

.modern-tool-text-section {
  flex: 1;
}

.modern-tool-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.modern-tool-subtitle {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}





.modern-tool-divider {
  width: 100%;
  height: 3px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  opacity: 0.3;
  margin-bottom: 24px;
}

/* 暗色主题适配 */
[data-theme="dark"] .modern-tool-icon-container {
  background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
}

[data-theme="dark"] .modern-tool-title {
  color: var(--gray-100);
}

[data-theme="dark"] .modern-tool-subtitle {
  color: var(--gray-400);
}

[data-theme="dark"] .modern-tool-divider {
  opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .modern-tool-header-content {
    flex-direction: column;
    gap: 20px;
  }
  
  .modern-tool-left-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  
  .modern-tool-title {
    font-size: 1.8rem;
  }
}

/* ====== Audio File List Styles ====== */
.audio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.audio-item:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.audio-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 8px;
  color: var(--white);
}

.audio-icon svg {
  width: 24px;
  height: 24px;
}

.audio-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.audio-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.remove-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: var(--gray-200);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 600;
}

.remove-btn:hover {
  background: var(--gray-300);
  color: var(--gray-700);
  transform: scale(1.1);
}

.audio-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  width: 90%;
}

.custom-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 1rem 24px 1rem;
}

.radio-group-container {
  margin-top: 24px;
}
.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.radio-group .radio-input {
  margin-right: 6px;
}
.home-tool-name {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

/* ====== case code styles ====== */

/* ====== ExampleCard 组件美化样式 ====== */
.example-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.example-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.card-description {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.9;
}

.card-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.try-it-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--accent-primary);
  color: var(--white);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}

.try-it-button:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-dark);
}

.try-it-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.run-icon {
  color: currentColor;
  transition: all 0.3s ease;
}

.try-it-button:hover .run-icon {
  transform: scale(1.2) rotate(10deg);
}

.run-text {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
}

.input-output-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.section-label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.case-card-container {
  position: relative;
}

.code-block {
  padding: 12px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  max-height: 150px;
  overflow-y: auto;
}

.code-block.light {
  color: var(--text-primary);
  background: var(--gray-50);
}

[data-theme="dark"] .code-block.light {
  color: var(--white);
  background: var(--gray-800);
  border-color: var(--gray-600);
}

.code-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-width: 100%;
  background: var(--black);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  z-index: 10;
  margin-top: 4px;
  border: 1px solid var(--gray-600);
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.case-card-container:hover .code-tooltip {
  display: block;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .example-card {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .try-it-button {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .code-block {
    font-size: 0.8rem;
    max-height: 120px;
  }
}

/* ====== ToolExamples 组件样式 ====== */
.tool-examples-container {
  margin-top: 32px;
}

.examples-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-primary);
  transition: all 0.3s ease;
}

[data-theme="dark"] .examples-header {
  border-bottom: 1px solid var(--gray-600);
}

.examples-icon-container {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(245, 158, 11, 0.08);
  flex-shrink: 0;
  transition: background-color 0.3s ease;
  border-radius: 8px;
}

[data-theme="dark"] .examples-icon-container {
  background-color: rgba(245, 158, 11, 0.1);
}

.examples-icon {
  color: #F59E0B;
}

.examples-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* 响应式网格 */
@media (min-width: 768px) {
  .examples-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .examples-content {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

textarea {
    resize: none !important;
}

