/* ==========================================================================
   BigiWorld · 首页页面样式
   --------------------------------------------------------------------------
   整站背景现在统一由 navBarStyle.css 的 body 提供（静态浅色渐变），
   首页不再自己画「跟着鼠标走」的光斑，也不再给文字做 difference 反色。
   这里只剩首页独有的东西：推荐卡片 .card。
   ========================================================================== */

/* ==========================================================================
   推荐卡片：.card
   --------------------------------------------------------------------------
   用法（index.html）：
     section.card[aria-labelledby="cardTitle"]
       h5.card__title#cardTitle     卡片小标题
       ul.card__list
         li > a.card__link          一条入口，右侧自动带箭头

   要加一条入口，就往 .card__list 里再塞一个 li > a.card__link，卡片会往下长。
   ========================================================================== */
.card {
  width: min(340px, 100%);
  margin: clamp(20px, 4vh, 40px) auto 0;   /* 水平居中，别贴着标题 */
  padding: 18px 18px 16px;

  background: var(--surface, rgba(255, 255, 255, 0.72));
  border: 1px solid var(--line, rgba(15, 23, 42, 0.08));
  border-radius: 18px;
  box-shadow: var(--shadow, 0 12px 32px rgba(15, 23, 42, 0.1));
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.card__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted, #475467);
}

.card__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;                /* 去掉 ul 的圆点和小缩进 */
}

/* 一条入口：整行可点，右侧箭头在 hover 时右移一点 */
.card__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;

  background: var(--surface-soft, rgba(255, 255, 255, 0.6));
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink, #0f172a);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card__link::after {
  content: "→";
  font-weight: 400;
  color: var(--brand-a, #4f6bff);
  transition: transform 0.15s ease;
}

.card__link:hover {
  background: rgba(79, 107, 255, 0.1);
  border-color: rgba(79, 107, 255, 0.28);
}

.card__link:hover::after {
  transform: translateX(3px);
}

.card__link:focus-visible {
  outline: 3px solid var(--brand-a, #4f6bff);
  outline-offset: 2px;
}

/* 系统开了「减少动态效果」：不位移、不渐变 */
@media (prefers-reduced-motion: reduce) {
  .card__link,
  .card__link::after {
    transition: none;
  }

  .card__link:hover::after {
    transform: none;
  }
}

/* ==========================================================================
   首页 · Firefox 提示
   --------------------------------------------------------------------------
   DOM（index.html）：
     div.ffNotice[role="status"][hidden]
       span.ffNotice__icon      感叹号
       p.ffNotice__text         文案
       button.ffNotice__close   「知道了」

   默认 hidden，只有 res/script/firefoxNotice.js 确认是 Firefox 才显示；
   其他浏览器完全看不到，也不占位。点「知道了」后本次会话不再出现。
   ========================================================================== */
.ffNotice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(480px, calc(100% - 32px));
  margin: clamp(18px, 3.5vh, 28px) auto 0;
  padding: 12px 14px;

  background: var(--surface, rgba(255, 255, 255, 0.72));
  border: 1px solid var(--line, rgba(15, 23, 42, 0.08));
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  color: var(--muted, #475467);
  font-size: 14px;
  line-height: 1.6;

  animation: ffNoticeIn 240ms ease-out both;
}

/* display: flex 会盖掉浏览器默认的 [hidden] { display: none }，这里补回来 */
.ffNotice[hidden] {
  display: none;
}

.ffNotice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-a, #4f6bff), var(--brand-b, #1fc8a9));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.ffNotice__text {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.ffNotice__close {
  flex: 0 0 auto;
  padding: 6px 10px;

  background: var(--surface-soft, rgba(255, 255, 255, 0.6));
  border: 1px solid var(--line, rgba(15, 23, 42, 0.08));
  border-radius: 8px;
  color: var(--ink, #0f172a);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ffNotice__close:hover {
  color: var(--brand-a, #4f6bff);
  border-color: rgba(79, 107, 255, 0.3);
}

.ffNotice__close:focus-visible {
  outline: 3px solid var(--brand-a, #4f6bff);
  outline-offset: 2px;
}

@keyframes ffNoticeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* 窄屏：换成两行网格——图标 + 文案一行，按钮单独一行靠右，不挤压文案 */
@media (max-width: 480px) {
  .ffNotice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 8px 12px;
  }

  .ffNotice__icon {
    grid-column: 1;
    grid-row: 1;
    margin-top: 2px;
  }

  .ffNotice__text {
    grid-column: 2;
    grid-row: 1;
  }

  .ffNotice__close {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

/* 系统开了「减少动态效果」：不播放进场动画 */
@media (prefers-reduced-motion: reduce) {
  .ffNotice {
    animation: none;
  }
}
