/* ============================================================
   AI 综合站 · 首页布局层 home.css
   ------------------------------------------------------------
   布局数值 1:1 还原 hao.uisdc.com 真实样式表 (styles.css?v=0.2.50)：
     .header              { height:64px; background:rgba(65,127,249,.9) }
     .container           { width:1720px; margin:0 auto; padding-left:180px }
     .part-main           { padding-top:30px }
     .main                { padding:0 30px }
     .main-wrap           { max-width:1660px; margin:0 auto }
     .part-sidebar        { position:absolute; top:0; left:auto; margin-left:-177px;
                            width:177px }            ← 透明悬浮，无白底
     .part-search         { height:346px; border-radius:10px; overflow:hidden;
                            display:flex; justify-content:space-between }
     .part-cat-block      { margin-bottom:40px }
     .c-loop              { margin:0 -9px -15px }
     .p-item              { width:16.66666667%; padding:0 9px; margin-bottom:20px }
     .f-box               { padding:14px; background:#fff; border-radius:10px }
   配色全部走 app.css 的 CSS 变量，亮/暗双主题自动适配。
   本文件只作用于首页（body.home-page），不影响其他页面。
   ============================================================ */

/* ============================================================
   ② 左侧导航：统一由 nav.css 提供（.nav-sidebar 系列）
   ============================================================ */

/* ============================================================
   ③ 搜索横幅（参考站 .part-search）
   ============================================================ */
.home-search {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-radius: 10px; height: 346px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, var(--nav-banner-1) 0%, var(--nav-banner-2) 100%);
  margin-bottom: 30px;
}
.home-search .hs-bg-l, .home-search .hs-bg-r {
  width: 310px; flex: 0 1 auto; align-self: stretch;
  background-repeat: no-repeat; background-size: cover; background-position: center;
}
/* ⚠⚠ 2026-11-04：两侧装饰原本是两块**纯色方块**（截图里很突兀，像贴图失败）。
 *   改成「柔和光晕 + 渐隐遮罩」，两侧与横幅背景自然过渡。
 */
.home-search .hs-bg-l {
  background-image:
    radial-gradient(260px 260px at 40% 105%, rgba(120, 255, 225, .26), transparent 72%),
    radial-gradient(180px 180px at 85% 8%, rgba(255, 255, 255, .10), transparent 74%);
  background-color: transparent;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.55), transparent 100%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,.55), transparent 100%);
}
.home-search .hs-bg-r {
  background-image:
    radial-gradient(280px 280px at 60% 112%, rgba(255, 255, 255, .18), transparent 72%),
    radial-gradient(160px 160px at 22% 6%, rgba(120, 255, 225, .18), transparent 74%);
  background-color: transparent;
  -webkit-mask-image: linear-gradient(270deg, rgba(0,0,0,.55), transparent 100%);
  mask-image: linear-gradient(270deg, rgba(0,0,0,.55), transparent 100%);
}
.home-search .hs-main {
  padding-top: 48px; padding-bottom: 80px; position: relative; text-align: center;
  flex: 1 1 auto; min-width: 0;
}
.home-search .hs-title {
  font-size: 40px; line-height: 1.17647059em; margin-bottom: .88235294em;
  color: #fff; white-space: nowrap; font-weight: 700; letter-spacing: 1px;
}
.home-search .hs-form { width: 640px; margin: 0 auto; }

/* 引擎 tab（参考站 .s-titles，当前项白底与搜索框相接） */
.home-search .hs-titles { font-size: 14px; line-height: 30px; color: #fff; text-align: center; }
.home-search .hs-titles .item { display: inline-block; margin: 0 3px; height: 30px; }
.home-search .hs-titles .item-a {
  display: block; padding: 0 20px; border-radius: 6px 6px 0 0; cursor: pointer;
  color: rgba(255, 255, 255, .92); transition: background .15s, color .15s;
}
.home-search .hs-titles .item-a:hover { background: rgba(255, 255, 255, .16); }
.home-search .hs-titles .current .item-a { background: #fff; color: #000; font-weight: 600; }

/* 搜索框：整块白色 input + 绝对定位的热搜链接与提交按钮 */
.home-search .hs-sform { position: relative; font-size: 14px; margin-bottom: 30px; }
.home-search .hs-input {
  display: block; box-sizing: border-box; padding: 15px 200px 15px 20px;
  background: #fff; border-radius: 6px; font-size: inherit; color: #3c3c3c;
  width: 100%; border: none; outline: none; font-family: inherit;
}
.home-search .hs-input::placeholder { color: #8f8f8f; }
.home-search .hs-hot {
  position: absolute; top: 50%; right: 145px; transform: translate(0, -50%);
  color: #b5b5b5; font-size: 13px; white-space: nowrap;
}
.home-search .hs-hot:hover { color: #ff6000; }
.home-search .hs-btn {
  display: block; position: absolute; right: 0; top: 0; width: 126px; height: 100%;
  border-radius: 0 6px 6px 0; background: var(--star); color: #fff;
  font-size: inherit; font-family: inherit; border: none; cursor: pointer;
  transition: background .15s;
}
.home-search .hs-btn:hover { background: #d98d1f; }
html[data-theme="dark"] .home-search .hs-btn:hover { background: #f0b04a; color: #0c1526; }

/* 热词 */
/* ⚠⚠⚥ 2026-11-04 修复：热词标签第 7 个起被裁掉
 *   原因：.hs-keywords 固定 height:30px + overflow:hidden，
 *        标签多到第二行就直接被切掉（截图里「AI音频」只剩一半）。
 *   修法：改成 flex 横向排列 + 单行不换行 + 超出可横向滚动。
 */
.home-search .hs-keywords {
  height: 30px; overflow: hidden;
  display: flex; align-items: center;
}
.home-search .hs-keywords .kw-list {
  font-size: 12px; line-height: 30px;
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: 4px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0;
}
.home-search .hs-keywords .kw-list::-webkit-scrollbar { display: none; }
.home-search .hs-keywords .kw-list { font-size: 12px; line-height: 2.5em; }
.home-search .hs-keywords .kw {
  display: inline-block; white-space: nowrap; margin: 0 4px;
  background: rgba(0, 0, 0, .1); color: #fff; border-radius: .5em; padding: 0 .66666667em;
}
.home-search .hs-keywords .kw:hover { background: #fff; color: #333; }
.home-search .hs-keywords .kw.kw-light { background: rgba(255, 255, 255, .71); color: #525252; }
.home-search .hs-keywords .kw.kw-light:hover { background: #fff; color: #333; }

/* ============================================================
   ④ 分区标题 + 卡片网格：统一由 nav.css 提供（.nb-* 系列）
   ============================================================ */

/* ============================================================
   ⑤ 首页保留下来的原站功能区块（用同一套卡片语言重绘）
   ============================================================ */

/* 提示词 / 资讯 双列 */

/* 排行三列 */

/* 工具箱 CTA */

/* 赞助条 */

/* 广告位（在首页分区流里） */

/* ============================================================
   ⑥ 响应式
   ============================================================ */
@media (max-width: 1659px) {
  .home-wrap { padding-left: 170px; }
  
}
@media (max-width: 1329px) {
  .nav-block .nb-item { flex-basis: 25%; width: 25%; max-width: 25%; }
}
@media (max-width: 1199px) {
}
@media (max-width: 999px) {
  .home-wrap { padding-left: 0; width: 100%; }
  
  /* 负边距网格在窄屏会撑出容器 —— 窄屏改用普通 padding，不做负边距 */
  .nav-block .nb-loop { margin: 0; }
  .nav-block .nb-item { padding: 0 6px; }
  .nav-block .nb-item { flex-basis: 33.33333333%; width: 33.33333333%; max-width: 33.33333333%; }
  .home-main-inner { padding: 0 12px; }
  .home-search { height: auto; }
  .home-search .hs-bg-l, .home-search .hs-bg-r { display: none; }
  .home-search .hs-title { font-size: 26px; white-space: normal; }
  /* ⚠⚠ 2026-11-04：横幅铺满后内容也要有左右留白，
   *   否则热词标签会紧贴屏幕边缘（第一个「AI绘画」贴着左边）。
   */
  .home-search .hs-form { width: auto; margin: 0 14px; }
  .home-search .hs-main { padding: 30px 6px; }
  .home-search .hs-keywords .kw-list { padding: 0 14px; }
  .home-cats-loop { margin: 0; }

  /* ⚠⚠⚥ 2026-11-05：手机端 banner 加高、搜索框加大下移
   *   用户反馈：「banner 手机端增加高度，并且搜索框太矮了，用户搜索不方便，
   *              应该往下一点，并且高度增加一些，方便用户点击搜索」
   *   调整：
   *     · 整体上下留白更大（30px → 40px）
   *     · 标题与标签之间留空更大
   *     · 搜索框高度 44 → 52，字体加大（更好读、更好点）
   *     · 搜索按钮同步加高加宽
   *     · 热词往下再推一点
   */
  .home-search .hs-main { padding: 40px 6px 44px; }
  .home-search .hs-title { font-size: 27px; margin-bottom: 22px; }
  .home-search .hs-form { margin-bottom: 26px; }
  .home-search .hs-sform { margin-bottom: 0; }
  .home-search .hs-input {
    padding: 15px 132px 15px 16px;
    font-size: 15px;
    line-height: 22px;
    border-radius: 8px;
  }
  .home-search .hs-btn {
    width: 116px; border-radius: 0 8px 8px 0; font-size: 15px;
  }
  .home-search .hs-keywords { margin-top: 22px; height: auto; overflow: visible; }
  .home-search .hs-keywords .kw-list {
    line-height: 32px; flex-wrap: wrap;     /* 手机端换行显示全部热词 */
    overflow: visible; row-gap: 8px;
  }
  .home-search .hs-keywords .kw { line-height: 32px; padding: 0 12px; }

  /* ⚠⚠⚥ 2026-11-04 修复：手机端搜索横幅**背景没有铺满**
   *   原因：.nav-wrap 移动端 padding:0 12px + .nav-main-inner padding:0 12px
   *        → 横幅被挤在中间，两侧留白（截图1 的问题）。
   *   修法：手机端清掉这两层 padding，横幅铺满全宽、去掉圆角。
   */
  .nav-page .nav-wrap,
  .nav-page .nav-main-inner { padding-left: 0; padding-right: 0; }
  .home-search { margin-left: 0; margin-right: 0; border-radius: 0; }
}
@media (max-width: 749px) {
  .nav-block .nb-item { flex-basis: 50%; width: 50%; max-width: 50%; }
  .nav-block .nb-title { padding-bottom: 10px; position: relative; margin-bottom: 15px; }
  .nav-block .nb-title .l strong { font-size: 17px; }
  .nav-block .nb-title .nb-news { display: none; }
  .home-search .hs-titles { font-size: 12px; padding-left: 0; }
  /* ⚠⚠⚥ 2026-11-05：搜索框在 749px 也保持加大后的尺寸
     （原来这里把它改回矮的 13px/96px，把上面 999 断点的调整覆盖掉了） */
  .home-search .hs-input { padding: 15px 124px 15px 15px; font-size: 15px; line-height: 22px; }
  .home-search .hs-btn { width: 112px; font-size: 15px; }
  .home-search .hs-hot { display: none; }
  .nav-block .nb-title .nb-sub { display: none; }

  /* ⚠⚠⚥ 2026-11-04 修复：搜索引擎标签（站内/百度/Google/必应/AI解答）
   *   手机端原本会换行，AI解答 单独掉到第二行（截图1 的问题）。
   *   修法：整行 flex 布局 + 标签等宽 + 字号自适应，5 个标签永远同一行。
   */
  .home-search .hs-titles {
    display: flex; justify-content: center; align-items: flex-end;
    gap: 2px; white-space: nowrap; overflow: hidden;
    font-size: 12px; line-height: 28px; padding-left: 0;
  }
  .home-search .hs-titles .item {
    display: block; margin: 0; height: 28px; flex: 0 1 auto; min-width: 0;
  }
  .home-search .hs-titles .item-a {
    padding: 0 8px; font-size: 12px; line-height: 28px; height: 28px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}

/* 极窄屏（≤360px）搜索引擎标签再压缩一档，避免挤成两行 */
@media (max-width: 360px) {
  .home-search .hs-titles .item-a { padding: 0 5px; font-size: 11px; }
  .home-search .hs-titles { gap: 0; }
}

/* 暗色主题：首页头部同样走蓝色系 */
html[data-theme="dark"] body.home-page .site-header {
  background: rgba(20, 36, 76, .92);
  border-bottom-color: transparent;
}
html[data-theme="dark"] body.home-page .site-header .header-search input {
  background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .18); color: #E7EDFB;
}
