/* ============================================================
   esjson.com 改版原型 - 方案C 日落活力 Sunset Vibrant
   共享样式表，3 个页面共用
   设计方向：亮色暖调 + 日落渐变(橙→粉→紫) + 磁贴网格
   ============================================================ */

/* ===== 1. 字体引入与基础重置 ===== */
/* 字体已本地化（原 Google Fonts 外链，国内访问不稳定，改为本地 woff2）。
   Poppins 为西文/标题字体；Noto Sans SC 仅含 latin 子集（数字与基础拉丁），
   中文字形回退到系统字体（微软雅黑 / PingFang SC 等）。 */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../lib/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../lib/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../lib/fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../lib/fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../lib/fonts/poppins-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../lib/fonts/noto-sans-sc-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../lib/fonts/noto-sans-sc-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../lib/fonts/noto-sans-sc-700.woff2') format('woff2');
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 背景色 */
  --bg-warm: #fff7ed;       /* 暖白主背景 */
  --bg-white: #ffffff;      /* 卡片白 */
  --bg-soft: #fef3e8;       /* 次级暖底 */

  /* 日落渐变主色 */
  --sunset-1: #fb923c;      /* 橙 */
  --sunset-2: #ec4899;      /* 粉 */
  --sunset-3: #a855f7;      /* 紫 */
  --sunset-gradient: linear-gradient(135deg, #fb923c 0%, #ec4899 50%, #a855f7 100%);
  --sunset-gradient-soft: linear-gradient(135deg, rgba(251,146,60,0.12), rgba(236,72,153,0.10), rgba(168,85,247,0.12));

  /* 6 类工具主色 */
  --cat-json: #fb923c;      /* 橙 */
  --cat-encode: #ec4899;    /* 粉 */
  --cat-encrypt: #a855f7;   /* 紫 */
  --cat-format: #06b6d4;    /* 青 */
  --cat-text: #3b82f6;      /* 蓝 */
  --cat-calc: #eab308;      /* 黄 */

  /* 文字色 */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --text-white: #ffffff;

  /* 圆角与阴影 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(31, 41, 55, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.08);
  --shadow-lg: 0 16px 40px rgba(31, 41, 55, 0.10);
  --shadow-sunset: 0 8px 24px rgba(236, 72, 153, 0.18);

  /* 布局 */
  --container: 1200px;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-warm);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== 2. 通用布局工具类 ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section-title .accent {
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.gradient-text {
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== 3. 顶部导航 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--sunset-gradient);
  box-shadow: 0 2px 12px rgba(236, 72, 153, 0.20);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo i {
  font-size: 20px;
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-item > a:hover,
.nav-item.active > a {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.nav-item > a .fa-chevron-down {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.nav-item:hover > a .fa-chevron-down {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.dropdown li a:hover {
  background: var(--sunset-gradient-soft);
  color: var(--sunset-2);
  padding-left: 16px;
}

/* 导航搜索框 */
.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 6px 14px;
  width: 200px;
  transition: width 0.25s ease, background 0.25s ease;
}

.nav-search:focus-within {
  background: rgba(255, 255, 255, 0.32);
  width: 240px;
}

.nav-search input {
  border: none;
  background: transparent;
  outline: none;
  color: #fff;
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.nav-search i {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  margin-right: 6px;
}

.nav-blog-link {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-blog-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* ===== 4. Hero 区 ===== */
.hero {
  position: relative;
  background: var(--bg-warm);
  padding: 72px 0 56px;
}

/* 装饰渐变圆形 */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
}

.hero-blob.blob-1 {
  width: 320px;
  height: 320px;
  background: var(--sunset-1);
  top: -80px;
  right: -60px;
}

.hero-blob.blob-2 {
  width: 260px;
  height: 260px;
  background: var(--sunset-3);
  bottom: -100px;
  left: -40px;
}

.hero-blob.blob-3 {
  width: 180px;
  height: 180px;
  background: var(--sunset-2);
  top: 40%;
  right: 30%;
  opacity: 0.2;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sunset-gradient-soft);
  border: 1px solid rgba(236, 72, 153, 0.2);
  color: var(--sunset-2);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero h1 .gradient-text {
  display: inline-block;
}

.hero p.subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Hero 大搜索框 */
.hero-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 6px 6px 6px 24px;
  max-width: 600px;
  margin: 0 auto 28px;
  border: 2px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-search:focus-within {
  border-color: var(--sunset-2);
  box-shadow: var(--shadow-sunset);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  background: transparent;
}

.hero-search input::placeholder {
  color: var(--text-light);
}

.hero-search button {
  background: var(--sunset-gradient);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-search button:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-sunset);
}

/* 热门工具快捷标签 */
.hot-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hot-tags .tag-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.hot-tags a {
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid rgba(251, 146, 60, 0.25);
  padding: 6px 16px;
  border-radius: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.hot-tags a:hover {
  background: var(--sunset-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ===== 5. 工具分类磁贴 ===== */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tile {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--tile-color, var(--sunset-1));
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.tile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  background: var(--tile-gradient, var(--sunset-gradient));
  box-shadow: 0 4px 12px var(--tile-shadow, rgba(251, 146, 60, 0.3));
}

.tile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.tile-count {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.tile-tools {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile-tools a {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.04);
}

.tile-tools a:last-child {
  border-bottom: none;
}

.tile-tools a::before {
  content: '\f0da';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: var(--tile-color, var(--sunset-1));
  opacity: 0.6;
}

.tile-tools a:hover {
  color: var(--tile-color, var(--sunset-2));
  padding-left: 6px;
}

.tile-more {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tile-color, var(--sunset-2));
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 6 类磁贴配色 */
.tile-json {
  --tile-color: var(--cat-json);
  --tile-gradient: linear-gradient(135deg, #fb923c, #f97316);
  --tile-shadow: rgba(251, 146, 60, 0.35);
}
.tile-encode {
  --tile-color: var(--cat-encode);
  --tile-gradient: linear-gradient(135deg, #ec4899, #db2777);
  --tile-shadow: rgba(236, 72, 153, 0.35);
}
.tile-encrypt {
  --tile-color: var(--cat-encrypt);
  --tile-gradient: linear-gradient(135deg, #a855f7, #9333ea);
  --tile-shadow: rgba(168, 85, 247, 0.35);
}
.tile-format {
  --tile-color: var(--cat-format);
  --tile-gradient: linear-gradient(135deg, #06b6d4, #0891b2);
  --tile-shadow: rgba(6, 182, 212, 0.35);
}
.tile-text {
  --tile-color: var(--cat-text);
  --tile-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  --tile-shadow: rgba(59, 130, 246, 0.35);
}
.tile-calc {
  --tile-color: var(--cat-calc);
  --tile-gradient: linear-gradient(135deg, #eab308, #ca8a04);
  --tile-shadow: rgba(234, 179, 8, 0.35);
}

/* ===== 6. 博客卡片（首页用） ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.blog-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.blog-card-thumb {
  height: 140px;
  background: var(--sunset-gradient);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-thumb i {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.85);
}

.blog-card-thumb .cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sunset-2);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
}

.blog-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 7. 工具详情页 ===== */

/* 面包屑 */
.breadcrumb {
  padding: 18px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--sunset-2);
}

.breadcrumb .sep {
  margin: 0 8px;
  color: var(--text-light);
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* 同类工具子 Tab */
.subtabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 16px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.subtabs::-webkit-scrollbar {
  height: 4px;
}

.subtabs::-webkit-scrollbar-thumb {
  background: var(--sunset-2);
  border-radius: 2px;
}

.subtab {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
}

.subtab:hover {
  border-color: var(--sunset-1);
  color: var(--sunset-1);
}

.subtab.active {
  background: var(--sunset-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sunset);
}

/* 工具主体 */
.tool-main {
  /* 建立块级格式化上下文，包含内部 layui 浮动栅格列(.layui-col-*)，
     防止卡片塌陷、表单内容溢出并把后续广告位挤压变形 */
  display: flow-root;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  margin-bottom: 28px;
}

.tool-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tool-title .gradient-text {
  display: inline-block;
}

.tool-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.tool-textarea {
  width: 100%;
  min-height: 200px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  background: #fafafa;
  color: var(--text-primary);
}

.tool-textarea:focus {
  border-color: var(--sunset-2);
  background: #fff;
}

.tool-textarea::placeholder {
  color: var(--text-light);
}

/* layui-textarea 高度统一：覆盖 layui 默认 height:38px（单行 input 高度，压在多行 textarea 上会导致内容向下溢出），
   统一最小高度 100px，使各工具页输入/输出框高度一致 */
.tool-main .layui-textarea {
  height: auto !important;
  min-height: 100px !important;
}

/* 按钮组 */
.tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

/* ===== 统一所有按钮圆角 ===== */
/* layui 全局默认 border-radius:2px（近直角），集中覆盖为统一圆角，
   避免各工具页分散写 border-radius 导致遗漏或风格不一致 */
.layui-btn {
  border-radius: var(--radius-sm) !important;
}
.layui-btn-lg { border-radius: var(--radius) !important; }
.layui-btn-sm { border-radius: 6px !important; }

/* vtheme 旧主题按钮（博客页）统一圆角 */
.vc-btn-search { border-radius: var(--radius-sm) !important; }
.navbar-toggle { border-radius: 6px !important; }

.btn-primary {
  background: var(--sunset-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sunset);
}

.btn-secondary {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
  border-color: var(--sunset-1);
  color: var(--sunset-1);
}

.btn-ai {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.btn-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.35);
}

/* 结果展示区 */
.tool-result {
  margin-top: 24px;
}

.tool-result-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-result-label i {
  color: var(--sunset-2);
}

.tool-result pre {
  background: #1e1b2e;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  font-size: 13.5px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  line-height: 1.7;
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.tool-result pre .key {
  color: #fb923c;
}

.tool-result pre .str {
  color: #86efac;
}

.tool-result pre .num {
  color: #fbbf24;
}

.tool-result pre .bool {
  color: #c084fc;
}

/* 工具简介 */
.tool-intro {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  margin-bottom: 28px;
}

.tool-intro h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.tool-intro h2 .gradient-text {
  display: inline-block;
}

.tool-intro p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.tool-intro ul {
  padding-left: 4px;
  margin-top: 10px;
}

.tool-intro ul li {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 5px 0 5px 22px;
  position: relative;
}

.tool-intro ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--sunset-1);
  font-size: 12px;
}

/* 工具页双栏布局 */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.sidebar-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-soft);
}

.related-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-tools a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.related-tools a i {
  color: var(--sunset-1);
  font-size: 12px;
  width: 16px;
}

.related-tools a:hover {
  background: var(--sunset-gradient-soft);
  color: var(--sunset-2);
}

/* ===== 8. 博客列表页 ===== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* 文章列表 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.article-thumb {
  width: 180px;
  height: 130px;
  border-radius: var(--radius-sm);
  background: var(--sunset-gradient);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.article-thumb i {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.85);
}

.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-title:hover {
  color: var(--sunset-2);
}

.article-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--sunset-gradient-soft);
  color: var(--sunset-2);
}

/* 原生信息流广告（伪装成文章卡片） */
.article-card.ad-native {
  background: linear-gradient(135deg, #fffbeb, #fdf2f8, #faf5ff);
  border: 1px dashed rgba(236, 72, 153, 0.25);
}

/* 博客侧边栏（不整体 sticky，由内部 .ad-sticky 单独固定） */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title i {
  color: var(--sunset-2);
}

/* 关于我 */
.about-me {
  text-align: center;
}

.about-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--sunset-gradient);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  font-weight: 700;
}

.about-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.about-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 近期文章 */
.recent-post {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.recent-post:last-child {
  border-bottom: none;
}

.recent-post-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--sunset-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recent-post a {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post a:hover {
  color: var(--sunset-2);
}

/* 文章分类 */
.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.cat-list li:last-child {
  border-bottom: none;
}

.cat-list a {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-list a:hover {
  color: var(--sunset-2);
}

.cat-list a i {
  color: var(--sunset-1);
  font-size: 12px;
}

.cat-list .count {
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg-soft);
  padding: 2px 10px;
  border-radius: 10px;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.tag-cloud a:hover {
  background: var(--sunset-gradient);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== 9. 广告位组件 ===== */
.ad-slot {
  position: relative;
  background: linear-gradient(135deg, #fff7ed, #fdf2f8, #faf5ff);
  border: 1px solid rgba(236, 72, 153, 0.12);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* 广告位渐变占位背景 */
.ad-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sunset-gradient-soft);
  opacity: 0.6;
  z-index: 0;
}

.ad-slot::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--sunset-gradient);
  filter: blur(50px);
  opacity: 0.15;
  top: 20%;
  right: 10%;
  z-index: 0;
}

.ad-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

.ad-content i {
  font-size: 28px;
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ad-size {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.ad-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 广告标识 */
.ad-label {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--sunset-1);
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.5px;
}

/* 横幅 728x90 */
.ad-banner {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
}

/* 矩形 300x250 */
.ad-rectangle {
  width: 300px;
  height: 250px;
}

/* 半身 300x600 */
.ad-halfpage {
  width: 300px;
  height: 600px;
}

/* 广告位 sticky 容器（可容纳多个广告，随滚动固定） */
.ad-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

/* 广告位水平居中容器 */
.ad-center {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

/* ===== 10. 页脚 ===== */
.footer {
  background: #1e1b2e;
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand .logo i {
  color: var(--sunset-1);
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--sunset-1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
  color: var(--sunset-1);
}

/* ===== 11. 响应式 ===== */

/* 平板 768-1024 */
@media (max-width: 1024px) {
  .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tool-sidebar .sidebar-card {
    flex: 1;
    min-width: 260px;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  /* 单列布局下关闭广告 sticky，避免遮挡 */
  .ad-sticky {
    position: static;
  }

  .nav-search {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 手机 <768 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero p.subtitle {
    font-size: 15px;
  }

  .hero-search {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius);
  }

  .hero-search input {
    width: 100%;
    padding: 8px;
  }

  .hero-search button {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .tiles-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* 移动端导航 */
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--sunset-gradient);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
  }

  .nav-menu.open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-item > a {
    padding: 12px 14px;
  }

  /* 移动端下拉点击展开 */
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0 4px 14px;
    display: none;
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .nav-blog-link {
    padding: 12px 14px;
  }

  /* 工具主体 */
  .tool-main,
  .tool-intro {
    padding: 20px;
  }

  .tool-title {
    font-size: 22px;
  }

  /* 文章卡片 */
  .article-card {
    flex-direction: column;
  }

  .article-thumb {
    width: 100%;
    height: 160px;
  }

  /* 广告位自适应 */
  .ad-banner {
    height: auto;
    min-height: 90px;
  }

  .ad-rectangle,
  .ad-halfpage {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .ad-halfpage {
    height: 400px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 23px;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }

  .hot-tags a {
    font-size: 12px;
    padding: 5px 12px;
  }

  .btn {
    padding: 9px 16px;
    font-size: 13px;
  }
}

/* ===== 搜索联想下拉 ===== */
.nav-search, .hero-search { position: relative; }
.search-suggest {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  min-width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(251, 146, 60, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 1001;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  border: 1px solid rgba(251, 146, 60, 0.15);
}
/* 顶部导航搜索框较窄，下拉需放宽以完整显示较长的工具名 */
.nav-search .search-suggest {
  left: auto; right: 0;
  width: max(280px, 110%);
}
.search-suggest .suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  text-decoration: none; color: #1f2937;
  border-bottom: 1px solid #fef3e7;
  transition: background .15s;
}
.search-suggest .suggest-item:last-child { border-bottom: none; }
.search-suggest .suggest-item:hover,
.search-suggest .suggest-item.active {
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.10), rgba(236, 72, 153, 0.10));
}
.search-suggest .suggest-ico {
  width: 20px; text-align: center; color: #fb923c; font-size: 14px;
}
.search-suggest .suggest-name { flex: 1; font-size: 14px; white-space: nowrap; }
.search-suggest .suggest-cat {
  font-size: 12px; color: #a855f7;
  background: rgba(168, 85, 247, 0.10);
  padding: 2px 8px; border-radius: 999px;
}
.search-suggest .suggest-empty {
  padding: 18px; text-align: center; color: #9ca3af; font-size: 14px;
}
.search-suggest .suggest-empty i { margin-right: 6px; }
.search-suggest::-webkit-scrollbar { width: 6px; }
.search-suggest::-webkit-scrollbar-thumb { background: rgba(251, 146, 60, 0.3); border-radius: 3px; }
