/* ============================================
   UUToolkit.com - 主样式表
   设计风格：高端黑金 (Premium Black & Gold)
   版本：v2.0
   ============================================ */

/* ============================
   CSS 变量 — 全局设计令牌
   ============================ */
:root {
  /* === 主色调 === */
  --primary: #18181B;          /* 主色：深黑 */
  --primary-light: #27272A;    /* 浅主色 */
  --accent: #D4A853;           /* 强调色：金色 */
  --accent-light: #E8C97A;     /* 浅金色 */
  --accent-dark: #B08930;      /* 深金色 */
  --light-gold: #FDF6E3;       /* 淡金色背景（悬停高亮等） */

  /* === 背景色 === */
  --bg: #FAFAFA;               /* 页面背景：极浅灰 */
  --bg-white: #FFFFFF;         /* 白色背景 */

  /* === 侧边栏色 === */
  --sidebar-bg: #0F0F12;       /* 侧边栏：纯黑 */
  --sidebar-hover: #1C1C22;    /* 侧边栏悬停 */
  --sidebar-active: #D4A853;   /* 侧边栏选中：金色 */

  /* === 文字色 === */
  --text: #18181B;             /* 主文字 */
  --text-secondary: #71717A;   /* 次要文字 */
  --text-light: #A1A1AA;       /* 浅文字 */

  /* === 边框与分割线 === */
  --border: #E4E4E7;           /* 边框 */
  --border-dark: #D1D5DB;      /* 深边框 */

  /* === 状态色 === */
  --danger: #EF4444;           /* 危险色 */
  --success: #22C55E;          /* 成功色 */
  --warning: #F59E0B;          /* 警告色 */
  --info: #3B82F6;             /* 信息色 */

  /* === 布局尺寸 === */
  --header-height: 64px;       /* 头部高度（从60px增大到64px） */
  --sidebar-width: 260px;      /* 侧边栏宽度 */
  --sidebar-collapsed-width: 64px; /* 侧边栏折叠宽度 */
  --transition-speed: 0.3s;    /* 过渡动画速度 */

  /* === 阴影 === */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* === 圆角 === */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* === 字体 === */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ============================
   全局重置
   ============================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* === 页面主体 === */
body {
  font-family: var(--font-family);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;            /* 更宽松的行高 */
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === 链接 === */
a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--accent);
}

/* === 图片 === */
img {
  max-width: 100%;
  height: auto;
}

/* ============================
   SVG 图标系统
   统一风格：线条 2px，圆角端点
   ============================ */

/* --- 图标基础样式 --- */
.svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.svg-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- 大尺寸图标（分类标题用） --- */
.svg-icon-lg {
  width: 24px;
  height: 24px;
}

/* --- 小尺寸图标（按钮内用） --- */
.svg-icon-sm {
  width: 16px;
  height: 16px;
}

/* --- 工具卡片图标容器 --- */
.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212,168,83,0.12) 0%, rgba(212,168,83,0.05) 100%);
  color: var(--accent);
  flex-shrink: 0;
  transition: all var(--transition-speed);
}

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

/* ============================
   Header 头部
   白色背景，底部极细分隔线
   ============================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* --- 头部左侧：菜单按钮 + Logo --- */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- 侧边栏切换按钮 --- */
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.sidebar-toggle:hover {
  background: var(--bg);
  color: var(--accent);
}

/* --- Logo 区域 --- */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/* Logo 图标：金色渐变 "UU" */
.header-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
  font-family: var(--font-family);
}

/* Logo 文字 */
.header-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* "Toolkit" 部分用金色高亮 */
.header-logo-text span {
  color: var(--accent);
  font-weight: 600;
}

/* --- 头部导航链接 --- */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-speed);
}

.header-nav a:hover {
  color: var(--accent);
  background: rgba(212,168,83,0.08);
}

/* 当前活跃导航项：金色高亮 */
.header-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

/* --- 移动端菜单按钮 --- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
}

/* ============================
   Mobile Overlay 移动端遮罩
   ============================ */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.mobile-overlay.active {
  opacity: 1;
}

/* ============================
   Sidebar 侧边栏
   纯黑背景 + 金色选中态
   ============================ */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: width var(--transition-speed), transform var(--transition-speed);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* 侧边栏自定义滚动条 */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(212,168,83,0.3);
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(212,168,83,0.5);
}

/* --- 侧边栏搜索框 --- */
.sidebar-search {
  padding: 16px;
}

.sidebar-search input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  color: #E4E4E7;
  font-size: 13px;
  font-family: var(--font-family);
  outline: none;
  transition: all var(--transition-speed);
}

.sidebar-search input::placeholder {
  color: rgba(255,255,255,0.3);
}

.sidebar-search input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

/* --- 侧边栏导航 --- */
.sidebar-nav {
  flex: 1;
  padding: 0 8px;
}

/* --- 分类组 --- */
.sidebar-category {
  margin-bottom: 4px;
}

/* --- 分类标题（可点击展开/折叠） --- */
.sidebar-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all var(--transition-speed);
  user-select: none;
}

.sidebar-category-header:hover {
  color: rgba(255,255,255,0.8);
  background: var(--sidebar-hover);
}

/* 分类标题中的 SVG 图标 */
.sidebar-category-header .svg-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0.7;
}

/* 展开箭头 */
.sidebar-category-header .expand-arrow {
  margin-left: auto;
  transition: transform var(--transition-speed);
  opacity: 0.4;
}

.sidebar-category-header .expand-arrow svg {
  width: 14px;
  height: 14px;
}

.sidebar-category.expanded .sidebar-category-header .expand-arrow {
  transform: rotate(90deg);
}

/* --- 分类下的工具列表 --- */
.sidebar-tools {
  display: none;
  padding: 2px 0 4px 0;
}

.sidebar-category.expanded .sidebar-tools {
  display: block;
}

/* --- 单个工具链接 --- */
.sidebar-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 20px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  border-radius: var(--radius);
  transition: all var(--transition-speed);
  text-decoration: none;
  cursor: pointer;
}

.sidebar-tool:hover {
  color: rgba(255,255,255,0.9);
  background: var(--sidebar-hover);
}

/* 当前选中的工具：金色高亮 */
.sidebar-tool.active {
  color: var(--accent);
  background: rgba(212,168,83,0.1);
  font-weight: 500;
}

/* 工具列表中的小图标 */
.sidebar-tool .svg-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.sidebar-tool.active .svg-icon {
  opacity: 1;
}

/* --- 侧边栏底部 --- */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  border-radius: var(--radius);
  transition: all var(--transition-speed);
  text-decoration: none;
}

.sidebar-footer a:hover {
  color: rgba(255,255,255,0.7);
  background: var(--sidebar-hover);
}

.sidebar-footer a .svg-icon {
  width: 16px;
  height: 16px;
}

.sidebar-footer-text {
  /* 折叠时隐藏文字 */
}

/* --- 侧边栏折叠态 --- */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .sidebar-tool span,
.sidebar.collapsed .sidebar-footer-text,
.sidebar.collapsed .sidebar-category-header span,
.sidebar.collapsed .expand-arrow {
  display: none;
}

.sidebar.collapsed .sidebar-category-header {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-tool {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-footer a {
  justify-content: center;
  padding: 10px;
}

/* ============================
   Main Content 主内容区
   ============================ */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-speed);
}

/* 侧边栏折叠时主内容区左移 */
.sidebar.collapsed ~ .main-content,
body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* 主内容内层容器 */
.main-inner {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px;         /* 更大的内边距，更高端的留白 */
}

/* ============================
   Hero 首页英雄区
   ============================ */
.hero {
  text-align: center;
  padding: 48px 0 56px;
}

/* --- 大标题 --- */
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
  color: var(--text);
}

/* 标题中的金色渐变文字 */
.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 副标题 --- */
.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* --- 搜索框 --- */
.hero-search {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 4px 6px 4px 18px;
  transition: all var(--transition-speed);
  box-shadow: var(--shadow-md);
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(212,168,83,0.12), var(--shadow-md);
}

.hero-search-icon {
  color: var(--text-light);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-family);
}

.hero-search input::placeholder {
  color: var(--text-light);
}

/* ============================
   Category Grid 分类区域
   ============================ */
.category-grid {
  margin-bottom: 40px;
}

/* --- 分类标题 --- */
.category-grid h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* 分类标题中的 SVG 图标 */
.category-grid h2 .svg-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

/* 移除旧的 emoji 样式（兼容） */
.cat-emoji {
  display: none;
}

/* ============================
   Tools Grid 工具网格
   ============================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ============================
   Tool Card 工具卡片
   白色卡片，悬停时底部金色边框
   ============================ */
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

/* 底部金色装饰线（默认隐藏） */
.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

/* 悬停效果：阴影 + 底部金色线 */
.tool-card:hover {
  border-color: rgba(212,168,83,0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card:hover::after {
  transform: scaleX(1);
}

/* 悬停时图标区域变亮 */
.tool-card:hover .tool-card-icon {
  background: linear-gradient(135deg, rgba(212,168,83,0.2) 0%, rgba(212,168,83,0.08) 100%);
}

/* --- 卡片标题 --- */
.tool-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}

/* --- 卡片描述 --- */
.tool-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

/* --- 卡片箭头链接 --- */
.tool-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 12px;
  transition: gap var(--transition-speed);
}

.tool-card:hover .tool-card-arrow {
  gap: 8px;
}

/* ============================
   Tool Page 工具页面
   ============================ */
.tool-page {
  max-width: 800px;
}

/* --- 工具头部 --- */
.tool-header {
  margin-bottom: 28px;
}

.tool-header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

/* 工具头部 h1 中的 SVG 图标 */
.tool-header h1 .svg-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.tool-header p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================
   Upload Area 上传区域
   ============================ */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-speed);
  background: var(--bg-white);
  position: relative;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(212,168,83,0.03);
}

.upload-area.dragover {
  background: rgba(212,168,83,0.06);
  transform: scale(1.01);
}

/* 上传区域图标 */
.upload-area-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(212,168,83,0.12) 0%, rgba(212,168,83,0.04) 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.upload-area-icon .svg-icon {
  width: 28px;
  height: 28px;
}

.upload-area h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.upload-area .browse-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-area p {
  font-size: 13px;
  color: var(--text-light);
}

.upload-area input[type="file"] {
  display: none;
}

/* ============================
   File List 文件列表
   ============================ */
.file-list {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
}

.file-item-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.file-item-name {
  flex: 1;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  color: var(--text-secondary);
  font-size: 13px;
  flex-shrink: 0;
}

.file-item-status {
  font-size: 13px;
  flex-shrink: 0;
}

.file-item-status.success {
  color: var(--success);
}

.file-item-status.error {
  color: var(--danger);
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
}

.file-item-remove:hover {
  color: var(--danger);
  background: rgba(239,68,68,0.08);
}

/* ============================
   Settings Panel 设置面板
   ============================ */
.settings-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 20px;
}

.settings-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.settings-panel h3 .svg-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* --- 设置行 --- */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- 质量滑块 --- */
.quality-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quality-slider input[type="range"] {
  width: 160px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

.quality-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.quality-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-width: 40px;
  text-align: right;
}

/* --- 单选按钮组 --- */
.radio-group {
  display: flex;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-speed);
  color: var(--text-secondary);
}

.radio-option:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.radio-option.checked {
  border-color: var(--accent);
  background: rgba(212,168,83,0.08);
  color: var(--accent);
}

.radio-option input {
  display: none;
}

/* ============================
   Action Buttons 操作按钮区
   ============================ */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ============================
   Buttons 按钮样式
   主按钮：金色填充+黑色文字
   次按钮：透明+金色边框
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-speed);
  border: none;
  white-space: nowrap;
}

/* --- 主按钮：金色填充 --- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #0F0F12;
  box-shadow: 0 2px 8px rgba(212,168,83,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  box-shadow: 0 4px 16px rgba(212,168,83,0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(212,168,83,0.2);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- 次按钮：透明+金色边框 --- */
.btn-secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(212,168,83,0.08);
  border-color: var(--accent);
}

/* --- 轮廓按钮 --- */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(212,168,83,0.04);
}

/* --- 大按钮 --- */
.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

/* ============================
   Results Section 结果区域
   ============================ */
.results-section {
  margin-top: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.results-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.results-section h3 .svg-icon {
  width: 20px;
  height: 20px;
  color: var(--success);
}

/* 单个结果项 */
.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item-name {
  flex: 1;
  font-weight: 500;
}

.result-item-original {
  color: var(--text-secondary);
  font-size: 13px;
}

.result-item-arrow {
  color: var(--text-light);
  display: flex;
  align-items: center;
}

.result-item-compressed {
  color: var(--success);
  font-weight: 600;
  font-size: 13px;
}

.result-item-savings {
  background: rgba(34,197,94,0.1);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.result-item-download {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent-dark);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-item-download:hover {
  border-color: var(--accent);
  background: rgba(212,168,83,0.06);
}

/* ============================
   JSON 相关样式
   ============================ */

/* JSON 输入区域 */
.json-input-area {
  margin-bottom: 16px;
}

.json-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-white);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-speed);
}

.json-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

/* JSON 输出区域 */
.json-output {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: #0F0F12;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* JSON 语法高亮 */
.json-output .json-key { color: var(--accent-light); }
.json-output .json-string { color: #22C55E; }
.json-output .json-number { color: #60A5FA; }
.json-output .json-boolean { color: #F472B6; }
.json-output .json-null { color: var(--text-light); }

/* JSON 错误 */
.json-error {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ============================
   Regex 相关样式
   ============================ */
.regex-input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.regex-pattern-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-white);
  outline: none;
  transition: border-color var(--transition-speed);
}

.regex-pattern-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

.regex-flags {
  display: flex;
  gap: 8px;
}

.flag-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-speed);
  color: var(--text-secondary);
}

.flag-checkbox input {
  display: none;
}

.flag-checkbox:has(input:checked) {
  border-color: var(--accent);
  background: rgba(212,168,83,0.08);
  color: var(--accent);
}

.regex-test-string {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-white);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-speed);
}

.regex-test-string:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

/* 正则匹配高亮 */
.regex-match-highlight {
  background: rgba(212,168,83,0.25);
  border-bottom: 2px solid var(--accent);
  border-radius: 2px;
  padding: 1px 0;
}

/* 匹配结果 */
.match-results {
  margin-top: 20px;
}

.match-results h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.match-group {
  padding: 10px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
}

.match-group-header {
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 4px;
  font-family: var(--font-family);
}

.match-group-value {
  color: var(--text);
}

/* ============================
   JWT 相关样式
   ============================ */
.jwt-input {
  width: 100%;
  min-height: 80px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-white);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-speed);
}

.jwt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}

.jwt-section {
  margin-top: 16px;
}

.jwt-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.jwt-section h3 .svg-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.jwt-section pre {
  padding: 16px;
  background: #0F0F12;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #E4E4E7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* JWT 过期状态 */
.jwt-expiry-valid {
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
}

.jwt-expiry-expired {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
}

/* ============================
   UUID 相关样式
   ============================ */
.uuid-settings {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.uuid-count-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.uuid-count-input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-white);
  outline: none;
  text-align: center;
}

.uuid-count-input:focus {
  border-color: var(--accent);
}

.uuid-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
}

.uuid-list {
  margin-top: 20px;
}

.uuid-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.uuid-item-index {
  color: var(--text-light);
  font-size: 12px;
  min-width: 24px;
}

.uuid-item-value {
  flex: 1;
  word-break: break-all;
}

.uuid-item-copy {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.uuid-item-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================
   PDF 相关样式
   ============================ */
.pdf-file-list {
  margin-top: 16px;
}

.pdf-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: grab;
  transition: all var(--transition-speed);
}

.pdf-file-item:hover {
  border-color: rgba(212,168,83,0.3);
  box-shadow: var(--shadow-sm);
}

.pdf-file-item.dragging {
  opacity: 0.5;
}

.pdf-file-drag {
  color: var(--text-light);
  cursor: grab;
  display: flex;
  align-items: center;
}

.pdf-file-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

.pdf-file-size {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================
   About Page 关于页面
   ============================ */
.about-page {
  max-width: 720px;
}

.about-page h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-page h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}

.about-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-page ul {
  padding-left: 24px;
}

.about-page li {
  font-size: 15px;
  line-height: 2;
  color: var(--text-secondary);
}

.about-page strong {
  color: var(--text);
}

/* --- 关于页面特性卡片 --- */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.about-feature {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all var(--transition-speed);
}

.about-feature:hover {
  border-color: rgba(212,168,83,0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.about-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(212,168,83,0.12) 0%, rgba(212,168,83,0.04) 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

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

.about-feature h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.about-feature p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================
   Blog Page 博客页面
   ============================ */
.blog-page {
  max-width: 720px;
}

.blog-article h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-article h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
}

.blog-article h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}

.blog-article p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.blog-article ul, .blog-article ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.blog-article li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
}

.blog-article strong {
  color: var(--text);
}

.blog-article code {
  background: rgba(212,168,83,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-dark);
}

/* --- CTA 框 --- */
.cta-box {
  background: linear-gradient(135deg, rgba(212,168,83,0.08) 0%, rgba(212,168,83,0.02) 100%);
  border: 1px solid rgba(212,168,83,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 28px;
  text-align: center;
}

.cta-box h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.cta-box h3 .svg-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.cta-box p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ============================
   Footer 页脚
   深色背景 + 金色链接
   ============================ */
.footer {
  background: var(--sidebar-bg);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 32px;
  text-align: center;
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-speed);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer p {
  color: rgba(255,255,255,0.3);
  font-size: 13px;
}

/* ============================
   工具类
   ============================ */
.hidden { display: none !important; }
.text-muted { color: var(--text-light); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ============================
   Toast 通知
   ============================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  animation: toast-in 0.3s ease-out;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: var(--success);
  color: #fff;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

.toast-info {
  background: var(--accent);
  color: #0F0F12;
}

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(20px); opacity: 0; }
}

/* ============================
   响应式设计 — 移动端适配
   ============================ */

/* --- 平板尺寸（768px 以下） --- */
@media (max-width: 768px) {
  /* Header */
  .header {
    padding: 0 16px;
  }

  .header-nav {
    display: none;            /* 隐藏桌面导航 */
  }

  .mobile-menu-btn {
    display: flex;            /* 显示移动端菜单按钮 */
  }

  /* Sidebar：默认隐藏，通过 transform 滑入 */
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: none;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  /* 主内容区：全宽 */
  .main-content {
    margin-left: 0;
  }

  .main-inner {
    padding: 24px 16px;
  }

  /* Hero */
  .hero {
    padding: 32px 0 40px;
  }

  .hero h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-search {
    max-width: 100%;
  }

  /* 工具网格：单列 */
  .tools-grid {
    grid-template-columns: 1fr;
  }

  /* 关于页面特性网格 */
  .about-features {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer {
    padding: 24px 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* --- 小手机尺寸（480px 以下） --- */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .tool-card {
    padding: 20px;
  }

  .settings-panel {
    padding: 16px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 14px;
  }

  .regex-input-group {
    flex-direction: column;
    align-items: stretch;
  }

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

  .uuid-settings {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .radio-group {
    flex-wrap: wrap;
  }
}

/* ============================
   打印样式
   ============================ */
@media print {
  .header,
  .sidebar,
  .mobile-overlay,
  .mobile-menu-btn,
  .sidebar-toggle {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    margin-top: 0;
  }

  .tool-card {
    break-inside: avoid;
  }
}
