/* 在线工具箱 — 玻璃质感风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #2d3436;
  line-height: 1.6;
}

/* 顶部导航 */
.top-nav {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-size: 18px; font-weight: 700; color: #5b3cc4; text-decoration: none; }
.nav-links { display: flex; gap: 16px; }
.nav-links a { color: #555; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: #5b3cc4; }

/* 容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Hero */
.hero { text-align: center; padding: 48px 0 36px; }
.hero h1 { font-size: 36px; color: #fff; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.hero p { font-size: 16px; color: rgba(255,255,255,0.85); max-width: 700px; margin: 0 auto; }
.hero-sub { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,0.65); }

/* 面包屑 */
.breadcrumb {
  font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 20px; padding: 8px 0;
}
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: rgba(255,255,255,0.9); }

/* 分类导航 */
.category-nav { margin-bottom: 30px; }
.category-nav h2 { font-size: 20px; margin-bottom: 16px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.cat-nav-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-nav-item {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 10px 20px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  transition: all 0.25s;
}
.cat-nav-item:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.cat-nav-item .count { color: rgba(255,255,255,0.6); font-size: 12px; margin-left: 4px; }

/* 全部工具列表 */
.all-tools { margin-bottom: 40px; }
.all-tools h2 { font-size: 22px; margin-bottom: 18px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.tool-count { font-size: 14px; color: rgba(255,255,255,0.6); font-weight: 400; }

/* 首页卡片列表 — 玻璃质感 */
.home-tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-tool-item {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 14px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}
.home-tool-item:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.home-tool-icon { font-size: 30px; width: 48px; text-align: center; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.home-tool-info { flex: 1; padding: 0 16px; }
.home-tool-info h3 { font-size: 16px; font-weight: 600; }
.home-tool-info h3 a { color: #fff; text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.home-tool-info h3 a:hover { color: rgba(255,255,255,0.85); }
.home-tool-cat { font-size: 12px; color: rgba(255,255,255,0.55); }
.home-tool-btn {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.25s;
}
.home-tool-btn:hover {
  background: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.03);
}

/* 分类页面 */
.category-header { margin-bottom: 24px; }
.category-header h1 {
  font-size: 28px; color: #fff; margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.category-header p { color: rgba(255,255,255,0.8); }
.tool-grid-category { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* 分类卡片 — 玻璃质感 */
.tool-item {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-item:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}
.tool-icon { font-size: 38px; margin-bottom: 10px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.tool-info h3 { font-size: 17px; margin-bottom: 6px; }
.tool-info h3 a { color: #fff; text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.tool-info h3 a:hover { color: rgba(255,255,255,0.8); }
.tool-info p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 10px; line-height: 1.5; }
.tool-cat { font-size: 12px; color: rgba(255,255,255,0.5); }

/* 工具详情页 */
.tool-main { min-height: 60vh; }
.tool-header { text-align: center; padding: 24px 0; }
.tool-icon-large { font-size: 60px; margin-bottom: 14px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
.tool-header h1 { font-size: 28px; color: #fff; margin-bottom: 10px; text-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.tool-desc { color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto; }

/* 工具工作区 */
.tool-workspace {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 28px;
  margin: 24px 0;
  min-height: 300px;
}
.tool-loading { text-align: center; padding: 60px; color: rgba(255,255,255,0.6); }

/* SEO内容区 */
.seo-content { padding: 36px 0; max-width: 800px; margin: 0 auto; }
.seo-content h2 { font-size: 22px; color: #fff; margin: 32px 0 14px; text-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.seo-content h3 { font-size: 18px; color: #fff; margin: 24px 0 12px; text-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.seo-content p { color: rgba(255,255,255,0.8); margin-bottom: 14px; font-size: 15px; line-height: 1.7; }
.seo-content ul, .seo-content ol { padding-left: 20px; margin-bottom: 18px; }
.seo-content li { color: rgba(255,255,255,0.8); margin-bottom: 6px; font-size: 15px; }
.seo-content li strong { color: #fff; }

/* 相关工具 */
.related-tools {
  margin: 30px 0;
  padding: 24px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
}
.related-tools h3 { font-size: 18px; margin-bottom: 16px; color: #fff; }
.tool-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.related-item {
  background: rgba(255,255,255,0.18);
  padding: 8px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.related-item:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-1px);
}

/* 广告位全局开关 — 默认隐藏 */
.ad-slot { display: none !important; }
/* 开启时去掉 .ads-show 类即可显示 */
.ads-show .ad-slot { display: flex !important; }

/* ========== 广告位 ========== */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 12px;
  margin: 20px 0;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  transition: all 0.3s;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.ad-slot:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
}
.ad-slot .ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.25);
  margin-bottom: 6px;
}
.ad-slot .ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.35);
}
.ad-slot .ad-inner .ad-icon {
  font-size: 24px;
  opacity: 0.4;
}
/* 横幅广告 728×90 */
.ad-banner {
  min-height: 90px;
  padding: 16px;
}
.ad-banner .ad-inner { flex-direction: row; }
/* 方块广告 300×250 */
.ad-box {
  min-height: 250px;
  padding: 24px;
  width: 100%;
  max-width: 336px;
  margin-left: auto;
  margin-right: auto;
}
.ad-box .ad-inner { flex-direction: column; }
/* 响应式广告 */
.ad-responsive {
  min-height: 90px;
  padding: 16px;
}
/* 内联广告块（首页工具列表间） */
.ad-inline {
  margin: 16px 0;
}
/* 侧边广告（工具页 workspace 右侧） */
.ad-side-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.ad-side-wrapper .tool-workspace { flex: 1; }
.ad-side-wrapper .ad-side { flex-shrink: 0; width: 336px; }
@media (max-width: 900px) {
  .ad-side-wrapper { flex-direction: column; }
  .ad-side-wrapper .ad-side { width: 100%; }
}
/* 广告位闪烁指示（开发环境占位提示） */
.ad-slot::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  animation: ad-shimmer 3s infinite;
}
@keyframes ad-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 底部 */
footer {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 32px 24px;
  text-align: center;
  margin-top: 50px;
}
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.45); }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .cat-nav-list { gap: 6px; }
  .cat-nav-item { font-size: 13px; padding: 8px 14px; }
  .tool-grid-category { grid-template-columns: 1fr; }
  .home-tool-item { padding: 12px 14px; }
  .home-tool-icon { font-size: 24px; width: 38px; }
  .home-tool-btn { font-size: 12px; padding: 6px 14px; }
  .tool-workspace { padding: 16px; }
  .container { padding: 14px; }
  .tool-header h1 { font-size: 22px; }
  .tool-icon-large { font-size: 44px; }
  .seo-content h2 { font-size: 19px; }
  /* 工具 UI 双栏变单栏 */
  .tool-ui div[style*="grid-template-columns:1fr 1fr"],
  .tool-ui div[style*="grid-template-columns: 1fr 1fr"],
  .md-container { grid-template-columns: 1fr !important; }
  /* 文本框高度减半 */
  .tool-ui textarea,
  .md-input,
  .md-preview { height: 180px !important; background: rgba(255,255,255,0.12) !important; color: #fff !important; border: 1px solid rgba(255,255,255,0.15) !important; }
  .md-preview { height: 200px !important; }
  /* 按钮间距 */
  .tool-ui div[style*="flex"] { flex-wrap: wrap; gap: 6px !important; }
  .tool-ui button { font-size: 13px !important; padding: 8px 14px !important; }
  /* 分类页 */
  .tool-item { padding: 14px; }
  .tool-icon { font-size: 30px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .top-nav { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .logo { font-size: 16px; }
  .nav-links { gap: 8px; }
  .nav-links a { font-size: 12px; }
  .home-tool-item { flex-wrap: wrap; gap: 6px; }
  .home-tool-info h3 { font-size: 14px; }
  .home-tool-cat { font-size: 11px; }
  .home-tool-icon { font-size: 22px; width: 32px; }
  .tool-header h1 { font-size: 20px; }
  .tool-icon-large { font-size: 36px; }
  .tool-workspace { padding: 12px; }
  .seo-content { padding: 20px 0; }
  .seo-content h2 { font-size: 18px; }
  .seo-content p, .seo-content li { font-size: 14px; }
  .tool-ui textarea,
  .md-input,
  .md-preview { height: 140px !important; }
  .md-preview { height: 160px !important; }
  .tool-ui select { font-size: 13px !important; padding: 6px !important; }
  .breadcrumb { font-size: 12px; }
  .related-tools { padding: 16px; }
  .related-item { font-size: 12px; padding: 6px 12px; }
  /* 下拉工具栏 */
  .cron-presets button { font-size: 11px; padding: 3px 8px; }
  footer { padding: 24px 14px; }
  .footer-links { flex-wrap: wrap; gap: 12px; }
}
