/* =============================================
   蚁眼AI · AI工具学习导航 - 首页专属样式
   品牌色：主 #6366f1 | 辅 #06b6d4 | 强调 #f59e0b
   风格：清爽白底、大字、圆角卡片
   ============================================= */

/* ---- 通用 ----
.nh-* prefix = navigation-home, 避免与旧样式冲突 */

/* ---- HERO 区 ---- */
.nh-hero {
  padding: 40px 0 60px;
  background: var(--light-bg);
  position: relative;
  overflow: hidden;
}

.nh-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.nh-hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

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

.nh-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #EEEDFE;
  border-radius: 999px;
  font-size: 14px;
  color: #3C3489;
  font-weight: 500;
  margin-bottom: 20px;
}

.nh-hero-tag-icon {
  display: flex;
  align-items: center;
  color: #6366f1;
}

.nh-hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.nh-hero-title-highlight {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nh-hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 28px;
  max-width: 500px;
}

/* 搜索框 */
.nh-search {
  position: relative;
  max-width: 520px;
  margin-bottom: 16px;
}

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

.nh-search-input {
  width: 100%;
  padding: 14px 18px 14px 48px;
  font-size: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.nh-search-input::placeholder {
  color: #94a3b8;
}

.nh-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* 热门搜索标签 */
.nh-hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nh-hero-tag-item {
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.nh-hero-tag-item:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #EEEDFE;
}

/* 蚁眼IP */
.nh-hero-visual {
  flex-shrink: 0;
}

.nh-mascot-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nh-mascot {
  animation: mascot-float 4s ease-in-out infinite;
}

@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.nh-mascot-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==== 通用 section ==== */
.nh-section-header {
  margin-bottom: 28px;
}

.nh-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.nh-section-desc {
  font-size: 16px;
  color: #64748b;
}

/* ==== 热门场景 / 场景分类 - 卡片网格 ==== */
.nh-quick-scenes,
.nh-scenes-full {
  padding: 60px 0;
}

.nh-quick-scenes {
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.nh-scenes-full {
  background: var(--light-bg);
}

.nh-scene-grid {
  display: grid;
  gap: 16px;
}

.scene-quick {
  grid-template-columns: repeat(6, 1fr);
}

.scene-full {
  grid-template-columns: repeat(4, 1fr);
}

/* 场景卡片 */
.nh-scene-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 22px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.25s;
  position: relative;
}

.nh-scene-card:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99,102,241,0.1);
  transform: translateY(-3px);
}

.nh-scene-card:hover h3 {
  color: #6366f1;
}

.nh-scene-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.nh-scene-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.nh-scene-card p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.nh-scene-tools {
  margin-top: 8px;
  font-size: 11px;
  color: #6366f1;
  opacity: 0.7;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nh-scene-card:hover .nh-scene-tools {
  opacity: 1;
}

.nh-scene-count {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  font-size: 12px;
  color: #6366f1;
  background: #EEEDFE;
  border-radius: 999px;
}

/* ==== 本周精选 - 垂直卡片 ==== */
.nh-featured {
  padding: 60px 0;
  background: #ffffff;
}

.nh-featured-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.nh-featured-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px 16px;
  background: var(--light-bg);
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.25s;
  max-width: 180px;
  width: 100%;
  justify-self: center;
}

.nh-featured-card:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99,102,241,0.1);
  transform: translateY(-3px);
}

.nh-featured-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.nh-featured-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.nh-featured-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  line-height: 1.3;
}

.nh-featured-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.nh-featured-badge,
.nh-featured-tools,
.nh-featured-main,
.nh-featured-meta,
.nh-featured-views,
.nh-featured-read,
.nh-tool-badge {
  display: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
  .nh-featured-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .nh-featured-card {
    max-width: 100%;
    padding: 16px 10px 12px;
  }
}
@media (max-width: 480px) {
  .nh-featured-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
.nh-daily {
  padding: 60px 0;
  background: var(--light-bg);
}

.nh-daily-inner {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  padding: 36px 40px;
}

.nh-daily-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.nh-daily-header .nh-section-title,
.nh-daily-header .nh-section-desc {
  margin-bottom: 0;
}

.nh-daily-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EEEDFE, #E6F1FB);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  flex-shrink: 0;
}

.nh-daily-date {
  margin-left: auto;
  font-size: 14px;
  color: #94a3b8;
  background: #f8fafc;
  padding: 4px 12px;
  border-radius: 8px;
}

.nh-daily-tip {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: #EEEDFE;
  border-radius: 14px;
  margin-bottom: 20px;
}

.nh-daily-tip-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  background: #6366f1;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  height: fit-content;
}

.nh-daily-tip-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.nh-daily-tip-content p {
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 8px;
}

.nh-daily-tip-link {
  font-size: 14px;
  color: #6366f1;
  font-weight: 500;
  text-decoration: none;
}

.nh-daily-tip-link:hover {
  text-decoration: underline;
}

.nh-daily-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nh-daily-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--light-bg);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.nh-daily-item:hover {
  background: #f1f5f9;
}

.nh-daily-item-badge {
  flex-shrink: 0;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}

.nh-daily-item-new {
  background: #DCFCE7;
  color: #166534;
}

.nh-daily-item-hot {
  background: #FEE2E2;
  color: #991B1B;
}

.nh-daily-item-tip {
  background: #FEF3C7;
  color: #92400E;
}

.nh-daily-item-text {
  font-size: 14px;
  color: #475569;
}

/* ==== 社区推荐 ==== */
.nh-community {
  padding: 60px 0;
  background: #ffffff;
}

.nh-community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.nh-community-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--light-bg);
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  transition: all 0.25s;
}

.nh-community-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.nh-community-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.nh-community-body {
  flex: 1;
  min-width: 0;
}

.nh-community-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.nh-community-role {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
}

.nh-community-text {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 8px;
}

.nh-community-tags {
  display: flex;
  gap: 6px;
}

.nh-community-tags span {
  font-size: 12px;
  color: #6366f1;
  background: #EEEDFE;
  padding: 2px 10px;
  border-radius: 6px;
}

.nh-community-cta {
  text-align: center;
  padding: 16px;
  background: var(--light-bg);
  border-radius: 14px;
  font-size: 15px;
  color: #64748b;
}

.nh-community-cta a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
}

.nh-community-cta a:hover {
  text-decoration: underline;
}

/* ==== 回到顶部 ==== */
.nh-back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nh-back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.nh-back-to-top:hover {
  border-color: #6366f1;
  color: #6366f1;
}

/* ==== 页脚 ==== */
.nh-footer {
  padding: 32px 0 24px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.nh-footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.nh-footer-brand {
  max-width: 300px;
}

.nh-footer-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

.nh-footer-links {
  display: flex;
  gap: 24px;
}

.nh-footer-links a {
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.nh-footer-links a:hover {
  color: #6366f1;
}

.nh-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #94a3b8;
}

.nh-footer-bottom a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.nh-footer-bottom a:hover {
  color: #6366f1;
}

/* ==== 响应式 ==== */
@media (max-width: 1024px) {
  .scene-quick {
    grid-template-columns: repeat(3, 1fr);
  }
  .scene-full {
    grid-template-columns: repeat(3, 1fr);
  }
  .nh-community-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nh-featured-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nh-hero-title {
    font-size: 36px;
  }
  .nh-hero-subtitle {
    font-size: 17px;
  }
  .nh-hero-visual {
    display: none;
  }
  .scene-quick {
    grid-template-columns: repeat(2, 1fr);
  }
  .scene-full {
    grid-template-columns: 1fr 1fr;
  }
  .nh-featured-list {
    grid-template-columns: 1fr;
  }
  .nh-community-grid {
    grid-template-columns: 1fr;
  }
  .nh-daily-inner {
    padding: 24px 20px;
  }
  .nh-daily-header {
    flex-wrap: wrap;
  }
  .nh-daily-date {
    margin-left: 60px;
  }
}

@media (max-width: 480px) {
  .nh-hero-title {
    font-size: 28px;
  }
  .scene-quick {
    grid-template-columns: 1fr 1fr;
  }
  .scene-full {
    grid-template-columns: 1fr;
  }
  .nh-daily-tip {
    flex-direction: column;
  }
  .nh-footer-main {
    flex-direction: column;
    gap: 16px;
  }
  .nh-footer-links {
    gap: 16px;
    flex-wrap: wrap;
  }
  .nh-footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

/* ---- 实时热度排行榜 ---- */
.nh-ranking-preview {
  padding: 56px 0;
  background: #f8fafc;
}

.nh-ranking-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nh-tab {
  padding: 8px 20px;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.nh-tab:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.nh-tab.active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.nh-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.nh-ranking-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.nh-ranking-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 16px rgba(99,102,241,0.1);
  transform: translateY(-1px);
}

.nh-ranking-num {
  font-size: 20px;
  font-weight: 700;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.nh-ranking-num.top1 { color: #f59e0b; }
.nh-ranking-num.top2 { color: #94a3b8; }
.nh-ranking-num.top3 { color: #cd7f32; }

.nh-ranking-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.nh-ranking-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.nh-ranking-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.nh-ranking-tagline {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nh-ranking-score {
  font-size: 13px;
  color: #6366f1;
  font-weight: 600;
  flex-shrink: 0;
}

.nh-ranking-change {
  font-size: 12px;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

.nh-ranking-change.up { color: #10b981; }
.nh-ranking-change.down { color: #ef4444; }
.nh-ranking-change.same { color: #94a3b8; }

.nh-ranking-more {
  text-align: center;
}

.nh-ranking-loading {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .nh-ranking-card {
    padding: 10px 12px;
    gap: 10px;
  }
  .nh-ranking-score,
  .nh-ranking-change { display: none; }
}

/* ---- 新增：搜索下拉 ----- */
.nh-search {
  position: relative;
}
.nh-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  margin-top: 4px;
}
.nh-search-dropdown.active {
  display: block;
}
.nh-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
}
.nh-search-result:last-child {
  border-bottom: none;
}
.nh-search-result:hover {
  background: #f8fafc;
}
.nh-search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #f1f5f9;
  overflow: hidden;
}
.nh-search-result-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nh-search-result-info {
  flex: 1;
  min-width: 0;
}
.nh-search-result-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.nh-search-result-desc {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nh-search-result-score {
  font-size: 12px;
  color: #6366f1;
  font-weight: 500;
  flex-shrink: 0;
}
.nh-search-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}
.nh-search-loading {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}
.nh-tool-card-see-all {
  display: block;
  text-align: center;
  padding: 10px 14px;
  font-size: 13px;
  color: #6366f1;
  font-weight: 500;
  text-decoration: none;
  border-top: 1px solid #f1f5f9;
}
.nh-tool-card-see-all:hover {
  background: #f8fafc;
}

/* ---- 新增：上下排列的工具卡片 ---- */
.nh-featured-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.nh-tool-card-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px 16px;
  background: var(--light-bg);
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.25s;
  max-width: 180px;
  width: 100%;
  margin: 0 auto;
}
.nh-tool-card-vertical:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99,102,241,0.1);
  transform: translateY(-3px);
}
.nh-tool-card-vertical:hover .nh-tool-card-v-name {
  color: #6366f1;
}
.nh-tool-card-v-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #f1f5f9;
  margin-bottom: 10px;
  flex-shrink: 0;
  overflow: hidden;
}
.nh-tool-card-v-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nh-tool-card-v-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nh-tool-card-v-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nh-tool-card-v-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 6px;
}
.nh-featured-card {
  display: none;
}
