/* =========================================================================
   AI导航 · 首页（faxianai 风格）专用样式
   仅在 index.html 通过 <link href="/css/home.css"> 引入。
   与 style.css（全局基础）并用：style.css 提供 :root 变量、reset、toast、
   以及 admin/submit 共享的 .btn/.logo 等；本文件负责首页布局与视觉。
   ========================================================================= */

/* ---------- 首页布局骨架 ---------- */
.nav-top {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
  height: 60px;
}
.nav-top-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
/* 渐变字标 AIWINDHUB.COM（红→橙渐变，替换原 AI导航） */
.brand-word {
  background: linear-gradient(90deg, #8B0000 0%, #E60012 45%, #FF8A00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: clamp(20px, 2.5vw, 34px);
  letter-spacing: -2px;
  line-height: 1;
  font-family: 'Montserrat', 'Arial Black', 'Segoe UI', Roboto, Arial, sans-serif;
  white-space: nowrap;
  font-weight: 900;
}

/* 顶部搜索框 */
.nav-search {
  flex: 1; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center;
  background: #f4f5f7; border-radius: 20px; padding: 0 6px 0 14px;
  height: 38px;
}
.ns-icon { color: #9aa0a6; font-size: 15px; margin-right: 4px; }
#navSearch {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 14px; color: #333; height: 100%;
}
.ns-btn {
  background: #f1404b; color: #fff; border: none;
  border-radius: 16px; height: 28px; padding: 0 14px;
  font-size: 13px; cursor: pointer; flex-shrink: 0;
}
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.stat-chip {
  font-size: 13px; color: #888; background: #f7f8fa;
  padding: 6px 12px; border-radius: 16px; white-space: nowrap;
}
.stat-chip b { color: #f1404b; font-size: 15px; }
.nav-link { font-size: 14px; color: #444; white-space: nowrap; }
.nav-link:hover { color: #f1404b; }
.nav-link.ghost { color: #999; }
/* 顶部“提交收录”：左侧小方块笔图标 */
.submit-link { display: inline-flex; align-items: center; gap: 7px; color: #f1404b; font-weight: 600; }
.submit-link:hover { color: #c92f38; }
.submit-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
  background: #fff; border: 1.5px solid #f1404b; border-radius: 5px; color: #f1404b;
}
.submit-ico svg { display: block; }

/* 主体：左栏 + 内容 */
.layout {
  max-width: 1600px; margin: 0 auto; padding: 18px 20px 40px;
  display: flex; gap: 20px; align-items: flex-start;
}

/* -------- 左侧固定分类导航（faxianai 式：可收起为仅图标） -------- */
.sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 78px;
  background: #fff; border: 1px solid #eef0f3; border-radius: 12px;
  padding: 10px 8px; max-height: calc(100vh - 96px);
  overflow-y: auto; overflow-x: hidden;
  transition: width .2s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #e3e5e8; border-radius: 4px; }
/* 收起按钮（位于分类栏顶部） */
.side-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; margin-bottom: 4px; border-radius: 8px;
  cursor: pointer; color: #8a8f98; font-size: 13px; user-select: none;
  transition: background .2s;
}
.side-toggle:hover { background: #f5f6f8; color: #f1404b; }
.side-toggle-bar { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.side-toggle-name { white-space: nowrap; overflow: hidden; }
.side-toggle-chev { margin-left: auto; font-size: 16px; transform: rotate(0); transition: transform .2s; }
.side-toggle-chev.flip { transform: rotate(180deg); }

.sidebar-head {
  font-size: 12px; color: #a2a7ad; padding: 4px 10px 8px; font-weight: 700;
  letter-spacing: .4px; white-space: nowrap; overflow: hidden;
}
.side-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 14px; color: #444; line-height: 1.2;
  cursor: pointer; border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden;
}
.side-nav a:hover { background: #faf1f1; color: #f1404b; }
.side-nav a.active {
  background: linear-gradient(135deg, #f1404b, #ff6b6b);
  color: #fff; border-left-color: #c92f38; font-weight: 600;
}
.side-nav .sico { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.side-nav .slabel { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 收起状态（仅图标） ---- */
.sidebar.min { width: 62px; padding: 10px 6px; }
.sidebar.min .sidebar-head { display: none; }
.sidebar.min .side-toggle { justify-content: center; }
.sidebar.min .side-toggle-name, .sidebar.min .side-toggle-chev { display: none; }
.sidebar.min .side-nav a { justify-content: center; padding: 9px 6px; border-left: none; gap: 0; }
.sidebar.min .side-nav .slabel { display: none; }
.sidebar.min .side-nav .sico { width: auto; font-size: 17px; }
/* 收起状态悬停：临时展开显示文字 */
.sidebar.min.hover { width: 200px; padding: 10px 8px; }
.sidebar.min.hover .side-toggle { justify-content: flex-start; }
.sidebar.min.hover .side-toggle-name, .sidebar.min.hover .side-toggle-chev { display: inline-flex; }
.sidebar.min.hover .side-nav a { justify-content: flex-start; border-left: 3px solid transparent; gap: 9px; }
.sidebar.min.hover .side-nav .slabel { display: block; }
.sidebar.min.hover .sidebar-head { display: block; }

/* -------- 主内容区 -------- */
.content { flex: 1; min-width: 0; }
.loading { color: #999; text-align: center; padding: 80px 0; font-size: 14px; }

/* ===== 分组容器（faxianai content-card：白色圆角12 + padding12，卡片间露浅灰底） ===== */
.fx-card-block {
  background: #fff; border-radius: 12px; padding: 12px;
  margin-bottom: 18px; scroll-margin-top: 76px;
}
/* 分组标题行（faxianai .io-slider-tab：左 图标+标题，右 more+） */
.fx-block-head {
  display: flex; align-items: center;
  margin-bottom: 8px; padding: 0;
}
.fx-block-title {
  font-size: 16px; font-weight: 500; color: #484b4f;
  display: flex; align-items: center; gap: 4px;
  margin: 0 8px 0 0; line-height: 1.2; min-height: 22px;
}
.fx-block-title .gico {
  font-size: 16px; color: #484b4f; line-height: 1;
  font-style: normal; width: 18px; text-align: center;
}
.fx-block-more {
  margin-left: auto; font-size: 12px; font-weight: 400;
  color: #484b4f; line-height: 18px;
}
.fx-block-more:hover { color: #f1404b; }

/* ===== 站点卡片网格：faxianai 每卡片 margin 8px，留出白容器底 ===== */
.fx-grid {
  display: flex; flex-wrap: wrap; margin: -8px;
}
.fx-card {
  box-sizing: border-box;
  width: calc(100% / 6 - 16px);
  margin: 8px;
  background: #fff; border: 0; border-radius: 12px;
  cursor: pointer;
  /* faxianai .posts-item 默认 inset 浅影；hover 收窄内影并投下底部大阴影 */
  transition: box-shadow .3s, transform .3s ease, background-color .3s;
  box-shadow: inset 0 0 25px 0 rgba(116,116,116,.1), 0 0 0 0 rgba(116,116,116,.1);
}
.fx-card:hover {
  box-shadow: inset 0 0 2px 0 rgba(116,116,116,.1), 0 20px 25px -10px rgba(116,116,116,.25);
}
/* 卡片内部（faxianai .sites-body：padding10、flex 居中、整卡高 60px） */
.fx-card-inner {
  display: flex; align-items: center;
  padding: 10px; width: 100%; height: 60px; box-sizing: border-box;
}
/* 左侧圆形 Logo 区（faxianai item-media：40px 圆、浅灰底 rgba(116,116,116,.1)） */
.fx-media {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(116,116,116,.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-right: 8px; overflow: visible;
}
.fx-logo {
  width: 40px; height: 40px; object-fit: contain;
  /* faxianai：图标默认 scale 1.05，卡片 hover 时回缩到 1.0 */
  transform: scale(1.05); transition: transform .4s ease;
}
.fx-fallback {
  width: 36px; height: 36px; border-radius: 50%;
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; overflow: hidden;
}
.fx-card:hover .fx-logo,
.fx-card:hover .fx-fallback {
  transform: scale(1);
}
/* 右侧文字：名称行（徽标前缀 + 加粗名称）+ 简介行（faxianai 14px/700 + 12px 灰） */
.fx-card-body { flex: 1; min-width: 0; }
.fx-name {
  font-size: 14px; font-weight: 400; color: #484b4f; line-height: 21px;
  display: flex; align-items: center; gap: 0; min-height: 21px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-name b {
  font-weight: 700; color: #484b4f; overflow: hidden; text-overflow: ellipsis;
}
/* 徽标（faxianai badge-title：位于名称之前；热 红、新 粉紫渐变、方形 .8em/.2em 圆角） */
.fx-tag-hot, .fx-tag-new {
  display: inline-block; flex-shrink: 0;
  width: 1.4em; height: 1.4em; margin-right: 4px;
  font-size: 11.2px; font-weight: 400; line-height: 1.4em; text-align: center;
  color: #fff; border-radius: 0.45em 0.2em;
  box-sizing: border-box;
}
.fx-tag-hot { background: linear-gradient(135deg, #ff7a59 10%, #f1404b 100%); }
.fx-tag-new {
  background: linear-gradient(135deg, #ff5cfc 10%, #955cff 100%);
  color: #e4ddff;
}
.fx-desc {
  font-size: 12px; color: #93959a; line-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* -------- 空态 / 返回顶部 / 页脚 / toast -------- */
.empty-tip { text-align: center; color: #999; padding: 60px 0; font-size: 14px; }
.back-top {
  position: fixed; right: 28px; bottom: 60px; z-index: 300;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #888; font-size: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  border: 1px solid #eee; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.back-top.show { display: flex; }
.back-top:hover { color: #f1404b; }

.footer {
  border-top: 1px solid #eef0f3; background: #fff;
  margin-top: 20px; padding: 22px 0;
}
.footer-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-inner p { color: #999; font-size: 13px; line-height: 1.7; margin: 0; }
.footer-inner a { color: #888; }
.footer-inner a:hover { color: #f1404b; }
/* 版权文案（左侧）+ 底部右侧链接（联系我们） */
.footer-copyright { color: #999; }
.footer-links { display: flex; align-items: center; gap: 14px; margin: 0; white-space: nowrap; }
.footer-links a { position: relative; }
.footer-links a + a::before {
  content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 12px; background: #e3e5e8;
}
@media (max-width: 720px) {
  .footer-inner { justify-content: center; text-align: center; }
}

/* -------- 响应式：卡片列数随屏宽递减（桌面 6 → 5/4/3 → 平板/手机 3/2） -------- */
/* faxianai row 网格：每卡 margin 8px（左右各占 16px），列宽 = 100%/n - 16px */
@media (max-width: 1560px) { .fx-card { width: calc(100% / 5 - 16px); } }
@media (max-width: 1320px) { .fx-card { width: calc(100% / 4 - 16px); } }
@media (max-width: 1080px) { .fx-card { width: calc(100% / 3 - 16px); } }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  /* 移动端侧栏变为顶部横向滚动的分类条，收起按钮/仅图标模式不再适用 */
  .sidebar { position: static; width: 100%; max-height: none; overflow-x: auto; padding: 8px; }
  .sidebar.min, .sidebar.min.hover { width: 100%; padding: 8px; }
  .side-toggle { display: none; }
  .sidebar-head { display: none; }
  .sidebar.min .sidebar-head { display: none; }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .side-nav a {
    flex-shrink: 0; padding: 7px 12px; border-left: none;
    white-space: nowrap; border-radius: 16px; background: #f5f6f8;
  }
  .sidebar.min .side-nav a, .sidebar.min .side-nav a:hover { justify-content: flex-start; padding: 7px 12px; gap: 6px; }
  .sidebar.min .side-nav .slabel { display: inline; }
  .side-nav a.active { background: linear-gradient(135deg, #f1404b, #ff6b6b); }
  .side-nav .sico { width: auto; font-size: 14px; }
  .side-nav .slabel { flex: none; }
  .nav-search { order: 3; flex: 0 0 100%; margin: 8px auto 0; max-width: none; }
  .nav-top { height: auto; padding: 6px 0; }
  .nav-top-inner { height: auto; flex-wrap: wrap; }
  .nav-right .stat-chip { display: none; }
}
/* 窄屏：每行 3 个 → 更窄 2 个 */
@media (max-width: 720px) { .fx-card { width: calc(100% / 3 - 16px); } }
@media (max-width: 520px) {
  .fx-card { width: calc(100% / 2 - 16px); }
  .fx-card-inner { height: 56px; padding: 8px; }
  .fx-media { width: 36px; height: 36px; margin-right: 7px; }
  .fx-logo { width: 36px; height: 36px; }
  .fx-fallback { width: 32px; height: 32px; font-size: 15px; }
  .fx-name { font-size: 13px; }
  .fx-desc { display: none; }
  .fx-card-block { padding: 10px; margin-bottom: 12px; }
  .nav-link.ghost { display: none; }
}

/* ============ 2026-10-16 改版：隐藏已收录 / 夜间模式 / 各国时间条 ============ */
/* 1. 隐藏“已收录”统计 */
.stat-chip { display: none !important; }

/* 2. 各国时间显示条 */
.world-time-strip {
  background: #fff; border: 1px solid #eef0f3; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
  font-size: 13px; color: #484b4f; line-height: 1.4;
}
.world-time-group { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.world-time-flags { display: inline-flex; align-items: center; gap: 3px; font-size: 15px; }
.world-time-flags img {
  width: 20px; height: 14px; object-fit: cover; border-radius: 2px;
  display: block; box-shadow: 0 0 0 0.5px rgba(0,0,0,.12); flex-shrink: 0;
}
.world-time-labels { display: inline-flex; gap: 6px; color: #666; }
.world-time-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-variant-numeric: tabular-nums; color: #f1404b; font-weight: 700;
}
.world-time-sep { width: 1px; height: 14px; background: #e3e5e8; margin: 0 2px; }
@media (max-width: 900px) {
  .world-time-strip { gap: 6px 12px; font-size: 12px; padding: 10px; }
  .world-time-sep { display: none; }
}
