/* ===========================================================
   hero.css — 首页首屏（Hero Section）像素级重构
   所有选择器以 .hero- 为前缀，仅作用于首屏，不污染二三屏
   ===== 首屏样式区域 START =====
   =========================================================== */

/* --- 全局环境 --- */
.hero-app {
  position: relative;
  overflow: hidden;
  background: var(--bg-hero);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
}
.hero-app::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 156px;
  z-index: 1;
  pointer-events: none;
  background: var(--gradient-hero-after);
}
.hero-inner {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================================================
   顶部导航
   =========================================================== */
.hero-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-header-hero, rgba(11,15,25,0.96));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-header);
}
.hero-header-inner {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-logo {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.03em;
  line-height: 1;
}

.hero-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}
.hero-nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--text-nav);
  transition: color 0.2s ease;
}
.hero-nav a:hover { color: var(--accent); }

.hero-menu-btn {
  display: none;
  color: var(--text-primary);
  font-size: 21px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 46px;
  min-height: 46px;
}

@media (max-width: 768px) {
  .hero-nav { display: none; }
  .hero-menu-btn { display: flex; align-items: center; justify-content: center; }
}

/* ===========================================================
   移动端抽屉导航
   =========================================================== */
.hero-drawer-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg-overlay-hero);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.hero-drawer-overlay.active { opacity: 1; visibility: visible; }

.hero-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-hero);
  z-index: 2000;
  border-left: 1px solid var(--border-drawer);
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.hero-drawer.active { transform: translateX(0); }

.hero-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 21px;
  border-bottom: 1px solid var(--border-header);
}
.hero-drawer-logo {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
}
.hero-drawer-close {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-nav);
  font-size: 19px;
  cursor: pointer;
  transition: all 0.2s;
}
.hero-drawer-close:hover { background: rgba(59, 130, 246, 0.1); color: var(--accent); }

.hero-drawer-nav { flex: 1; padding: 8px 0; }
.hero-drawer-nav a {
  display: flex;
  align-items: center;
  padding: 15px 21px;
  font-size: 16px;
  color: var(--text-nav);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  min-height: 46px;
}
.hero-drawer-nav a:hover {
  background: var(--accent-bg-light);
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ===========================================================
   面包屑导航
   =========================================================== */
.hero-breadcrumb-area {
  padding-top: 8px;
}
.hero-breadcrumb {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 21px;
  line-height: 1;
}

/* ===========================================================
   搜索栏组件
   =========================================================== */
.hero-search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  background: var(--bg-search);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.hero-search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: var(--accent-shadow);
}

.hero-search-label {
  font-size: 14px;
  color: var(--text-nav);
  padding-left: 19px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-search-right {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  position: relative;
}

.hero-search-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  padding: 0 40px 0 16px;
  min-height: 46px;
}
.hero-search-input::placeholder {
  color: var(--text-muted);
}

.hero-search-svg {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 18px;
  height: 18px;
}

/* ===========================================================
   搜索下拉结果面板
   =========================================================== */
.hero-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card-alt, #0f172a);
  border: 1px solid var(--border-card, #1e293b);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
  animation: heroDropdownFadeIn 0.15s ease;
}

@keyframes heroDropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-search-dropdown::-webkit-scrollbar {
  width: 5px;
}
.hero-search-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.hero-search-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-light, #334155);
  border-radius: 3px;
}

.hero-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--text-primary, #f8fafc);
  transition: background 0.15s;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.hero-search-result:hover,
.hero-search-result.active {
  background: var(--accent-bg-light, rgba(59, 130, 246, 0.08));
  border-left-color: var(--accent, #3b82f6);
}

.hero-search-result-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent, #3b82f6);
  font-size: 14px;
}

.hero-search-result-name {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #f8fafc);
  white-space: nowrap;
}

.hero-search-result-desc {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-nav, #94a3b8);
}

.hero-search-result-cat {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-icon, rgba(59,130,246,0.12));
  color: var(--accent, #3b82f6);
  white-space: nowrap;
}

.hero-search-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-nav, #94a3b8);
}

/* ===========================================================
   核心功能区 Grid（4 Cards）
   =========================================================== */
.hero-core-functions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 21px;
  margin-top: 29px;
}

.hero-function-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px 21px;
  min-height: 156px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.hero-function-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card-glow);
}

.hero-card-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.hero-card-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.3;
}

.hero-card-desc {
  font-size: 14px;
  color: var(--text-nav);
  line-height: 1.4;
  margin: 0;
}

/* ===========================================================
   快捷工具栏（Quick Access - Row 2）
   =========================================================== */
.hero-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 114px;
  margin-top: 29px;
  padding: 0 29px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hero-toolbar::-webkit-scrollbar { display: none; }

.hero-tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 100px;
  padding: 6px 4px;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.hero-tool-item:hover {
  transform: translateY(-3px);
}

.hero-tool-icon-bg {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-icon);
  border-radius: 10px;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}
.hero-tool-item:hover .hero-tool-icon-bg {
  background: var(--accent-bg);
  box-shadow: 0 0 0 1px var(--accent-border);
}

.hero-tool-icon {
  width: 20px;
  height: 20px;
  display: block;
  color: var(--accent);
}

.hero-tool-text {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.3;
  text-align: center;
}

/* ===========================================================
   响应式适配
   =========================================================== */

/* 移动端 ≤768px */
@media (max-width: 768px) {
  .hero-inner { padding: 0 16px; }
  .hero-header-inner { padding: 0 16px; }

  .hero-breadcrumb-area { padding-top: 6px; }
  .hero-breadcrumb { font-size: 14px; margin-bottom: 17px; }

  .hero-search-bar { height: auto; min-height: 52px; }
  .hero-search-right { max-width: 100%; padding: 0 14px; }
  .hero-search-input { font-size: 14px; padding: 0 40px 0 14px; }
  .hero-search-wrap { max-width: 100%; margin-top: 12px; }
  .hero-search-chips { margin-top: 10px; gap: 6px; }
  .hero-chip { font-size: 12px; padding: 5px 11px; }
  .hero-dropzone { margin-top: 16px; padding: 14px 12px; border-radius: 12px; }
  .hero-dropzone-inner { flex-direction: column; text-align: center; gap: 8px; }
  .hero-dropzone-text-wrap { align-items: center; }
  .hero-dropzone-text { font-size: 13px; }
  .hero-dropzone-hint { font-size: 11px; }
  .hero-dropzone-icon { width: 28px; height: 28px; }
  .hero-section-label { margin-top: 26px; font-size: 12px; }
  .hero-direct-tools { grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 100%; margin-top: 12px; }
  .hero-direct-card { padding: 16px 10px; min-height: 92px; gap: 8px; }
  .hero-direct-badge { font-size: 9px; padding: 2px 6px; top: -8px; right: 10px; }
  .hero-direct-name { font-size: 14px; }
  .hero-trust-line { font-size: 12px; gap: 4px 8px; margin-top: 20px; }
  .hero-search-dropdown {
    left: 16px;
    right: 16px;
    top: calc(100% + 4px);
    max-height: 320px;
  }
  .hero-search-result {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .hero-search-result-desc { display: none; }
  .hero-search-result-cat { font-size: 10px; padding: 1px 6px; }

  .hero-core-functions {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 21px;
  }
  .hero-function-card { min-height: 135px; padding: 21px 15px; }
  .hero-card-icon { width: 44px; height: 44px; margin-bottom: 10px; }
  .hero-card-title { font-size: 16px; }
  .hero-card-desc { font-size: 12px; }

  .hero-toolbar {
    height: 104px;
    padding: 0 16px;
    margin-top: 21px;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 12px;
  }
  .hero-tool-item { min-width: 76px; padding: 4px 2px; }
  .hero-tool-icon-bg { width: 40px; height: 40px; border-radius: 8px; }
  .hero-tool-icon { width: 17px; height: 17px; }
  .hero-tool-text { font-size: 12px; }

  .hero-dropzone { margin-top: 18px; padding: 14px 12px; border-radius: 12px; }
  .hero-dropzone-text { font-size: 13px; }
  .hero-dropzone-hint { font-size: 11px; }
  .hero-dropzone-icon { width: 28px; height: 28px; }
  .hero-drag-overlay-inner { padding: 32px 40px; font-size: 16px; border-radius: 14px; }
}

/* 平板端 769px-1023px */
@media (min-width: 769px) and (max-width: 1023px) {
  .hero-core-functions { grid-template-columns: repeat(2, 1fr); gap: 17px; }
  .hero-toolbar { gap: 6px; padding: 0 21px; }
}

/* ===========================================================
   首屏主标题区（H1 + 隐私卖点行 + 信任卡片）
   核心差异化：本地处理、文件不上传服务器，第一眼可见
   =========================================================== */
.hero-title-area {
  padding-top: 87px; /* 让开 fixed 顶部导航（60px）+ 间距 */
  text-align: center;
}

.hero-main-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 14px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.hero-privacy-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 26px;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-error); /* 高亮红，按主题分流保证双主题对比度 */
  background: rgba(248, 113, 113, 0.09);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 999px;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-privacy-emoji {
  flex-shrink: 0;
  margin-right: 4px;
}

.hero-trust-cards {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
}

.hero-trust-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  min-width: 0;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.hero-trust-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.hero-trust-card-primary {
  border-color: var(--accent);
  box-shadow: var(--accent-shadow);
}

.hero-trust-icon {
  width: 20px;
  height: 20px;
  display: block;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-trust-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  white-space: nowrap;
}

.hero-trust-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.hero-trust-desc {
  font-size: 12px;
  color: var(--text-nav);
  line-height: 1.3;
}

/* 移动端 ≤768px：标题区同步适配 */
@media (max-width: 768px) {
  .hero-title-area { padding-top: 75px; }
  .hero-main-title { font-size: 27px; margin-bottom: 12px; }
  .hero-privacy-line {
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
  }
  .hero-trust-cards {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-trust-card {
    justify-content: center;
    padding: 12px 16px;
  }
  .hero-trust-title { font-size: 14px; }
}

/* ===========================================================
   搜索主轴容器 + 可点示例 chips
   =========================================================== */
.hero-search-wrap {
  max-width: 720px;
  margin: 14px auto 0;
}

.hero-search-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-chip {
  font-size: 13px;
  color: var(--text-nav);
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hero-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg-light);
}

/* ===========================================================
   直达工具网格（每张直接进工具页，不进分类）
   =========================================================== */
/* 区块小标题（eyebrow）：给首屏各区块明确节奏分隔，而非连成一片 */
.hero-section-label {
  max-width: 880px;
  margin: 34px auto 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
}
.hero-section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-strong);
}

.hero-direct-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 880px;
  margin: 14px auto 0;
}

.hero-direct-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px;
  min-height: 108px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.hero-direct-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card-glow);
}

/* 突出核心入口：热门卡（强调边框 + 浅底 + 角标） */
.hero-direct-card.featured {
  border-color: var(--accent, #3b82f6);
  background: var(--accent-bg-light, rgba(59,130,246,0.10));
}
.hero-direct-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #1d4ed8; /* 白字蓝底填充：加深到 blue-700 保证双主题 WCAG AA */
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(59,130,246,0.35);
}

.hero-direct-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.hero-direct-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.hero-direct-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
}

/* ===========================================================
   首屏底部信任一行（原 3 张信任卡压缩）
   =========================================================== */
.hero-trust-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--text-nav);
}
.hero-trust-item { white-space: nowrap; }
.hero-trust-sep { color: var(--border-card-hover); }

/* ===========================================================
   拖拽即用（P2）— 首页拖拽区（全部语义变量，兼容明暗双主题）
   =========================================================== */
.hero-dropzone {
  max-width: 880px;
  margin: 22px auto 0;
  border: 1.5px dashed var(--border-card-hover, #3b82f6);
  border-radius: 14px;
  background: var(--accent-bg-light, rgba(59,130,246,0.10));
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.hero-dropzone:hover,
.hero-dropzone:focus-within {
  border-color: var(--accent, #3b82f6);
  background: var(--bg-icon-hover, rgba(59,130,246,0.15));
}
.hero-dropzone-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
  pointer-events: none;
}
.hero-dropzone-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-dropzone-icon {
  width: 34px;
  height: 34px;
  color: var(--accent, #3b82f6);
}
.hero-dropzone-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
}
.hero-dropzone-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-nav, #94a3b8);
}
.hero-dropzone-hint.is-error {
  color: var(--danger, #ef4444);
  font-weight: 600;
}

/* 全屏拖拽遮罩 */
.hero-drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay, rgba(15,23,42,.82));
  backdrop-filter: blur(2px);
}
.hero-drag-overlay.is-active { display: flex; }
.hero-drag-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 64px;
  border: 2px dashed var(--accent, #3b82f6);
  border-radius: 18px;
  color: var(--text-primary, #f8fafc);
  font-size: 20px;
  font-weight: 600;
}

/* ===========================================================
   ===== 首屏样式区域 END =====
   =========================================================== */
