/* ============================================================
   Backloggd 复刻 — 首页专属样式
   维护者：B
   只放首页（Home）用到的布局，公共组件样式在 components.css。
   ============================================================ */

/* ---------- Hero 区域 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  --wall-top: -66px;
  --wall-grid-top: -37px;
  --wall-grid-left: 0;
  --wall-grid-width: 112%;
  --wall-columns: 16;
  --wall-cell-width: 91px;
  --wall-cell-height: 102px;
  --wall-cell-margin: .25rem;
  --wall-column-step: calc(var(--wall-cell-width) + .5rem);
  --wall-row-step: calc(var(--wall-cell-height) + .5rem);
  padding: 9vw 0 2rem;    /* 底部留白 3rem(48px) → 2rem(32px)：缩小与 Recently trending 的间距 */
  text-align: left;       /* 原站 Hero 内容左对齐，不是居中 */
  background: var(--bg-primary);
}

.home-navbar {
  position: relative;
  z-index: 3;
  background-color: rgba(21, 23, 26, 0.34);
}

.hero-banner {
  position: absolute;
  z-index: 0;
  top: var(--wall-top);
  left: 0;
  width: 100%;
  height: clamp(300px, 28vw, 390px);
  overflow: hidden;
  pointer-events: none;
}

.hero-banner > .col {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
}

#stats-game-banner-container {
  position: absolute;
  top: var(--wall-grid-top);
  left: var(--wall-grid-left);
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(var(--wall-columns), var(--wall-column-step));
  grid-auto-rows: var(--wall-row-step);
  align-content: start;
  gap: 0;
  width: var(--wall-grid-width);
  min-height: calc(100% + 24px);
}

#stats-game-banner-container .cover-col {
  min-width: 0;
  width: var(--wall-cell-width);
  height: var(--wall-cell-height);
  margin: var(--wall-cell-margin);
  overflow: hidden;
  aspect-ratio: 91 / 102;
  border-radius: 4px;
  background: #242832;
  transform: skewX(-8deg);
}

#stats-game-banner-container .cover-col img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner > .gradient {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.hero-banner > .gradient::before,
.hero-banner > .gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-banner > .gradient::before {
  z-index: 0;
  background: rgba(12, 14, 18, 0.12);
}

.hero-banner > .gradient::after {
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(21, 23, 26, 0.50) 0px,
    rgba(21, 23, 26, 0.60) 70px,
    rgba(21, 23, 26, 0.85) 150px,
    var(--bg-primary) 225px,
    var(--bg-primary) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* 原站 Hero 内容位于 col-xl-6 半宽列（内容宽 540px），Logo 80% ≈ 432px */
.hero-col {
  max-width: 540px;
}

/* 主标题：使用原站 Logo 图片（PNG 底部已自带浅蓝下划线，无需 CSS 补线） */
.hero-logo {
  margin: 0;
  font-size: 0;    /* 防止 img 下方出现基线空隙 */
  line-height: 0;
}

.hero-logo img {
  display: block;
  width: 80%;      /* 原站：img width:80%（相对 540px 内容列 = 432px） */
  height: auto;
}

/* 副标题（实测高 38.33px = 2rem/1.2 行高，灰白，紧贴 Logo） */
.hero h2 {
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 5px 0 0;
}

/* 统计行：标签在上、数字在下，左对齐 */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;            /* 原站各项间距（40px 偏紧凑，增大到 56px） */
  margin-top: 16px;     /* 原站 mt-3 = 1rem */
}

.hero-stats .stat {
  text-align: left;
}

.hero-stats .label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  color: #999999;       /* 原站中性灰，而非偏蓝的 --text-secondary(#8f9ca7) */
}

.hero-stats .value {
  display: block;
  font-size: 1.2rem;
  font-weight: 300;     /* 原站数字较常规字重更轻（非 400/bold） */
  color: #e2e6ea;       /* 近白，非纯白 #ffffff */
  margin-top: 2px;
}

/* 彩色小方块（不是圆点） */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

/* 首页统计类目色块：原站统计类专用色，区别于 --status-* 的游戏状态色 */
.dot-played { background-color: #d3467b; }   /* Played 玫红 */
.dot-games { background-color: #59b65f; }    /* Games 绿 */
.dot-ratings { background-color: #587bd1; }  /* Ratings 蓝 */
.dot-reviews { background-color: #d99a4a; }  /* Reviews 橙 */
.dot-lists { background-color: #d74d4e; }    /* Lists 红 */

/* 注册按钮 + 登录提示：同一行，垂直居中 */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;             /* 原站 col 间距约 8px */
  margin-top: 24px;     /* 原站 stats 的 mb-4 = 1.5rem */
}

/* 注册按钮：粉底白字，约 186×36px（px-3 py-2 + 1rem 字号） */
.hero-actions .btn-main {
  font-size: 16px;
  font-weight: 600;
  padding: 8px 16px;
  line-height: 1.2;
  border-radius: var(--radius-sm);
}

.hero-login {
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text-secondary);
  margin: 0;
}

/* 首页 Hero 里的 log in 不用全局粉色，改为灰白（只覆盖 Hero，不影响其它页面） */
.hero-login a {
  color: var(--text-primary);
  text-decoration: none;
}

.hero-login a:hover {
  color: #ffffff;
}

/* ---------- Recently trending：横向封面 ---------- */
/* 6 列等宽，间距 32px：6×158.33 + 5×32 = 1110px（=1140 容器内容宽） */
.trending-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
}

/* 占位阶段隐藏卡片中央的游戏名（数据仍保留在 span 与 aria-label 中） */
.trending-row .cover-name {
  display: none;
}

/* ---------- What is Backloggd？：纵向交替图文介绍 ---------- */
/* 对齐原站 row.landing-feature-showcase：
   图片列 col-12 col-md-5（5/12 宽），文字列 col my-auto；第 2/4 行图片 order-md-2 靠右 */
.about-title {
  font-size: 2.3rem;
  font-weight: 700;        /* 明显重于正文 */
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 8px;
}

.about-intro {
  max-width: none;
  font-size: 1.1rem;
  font-weight: 400;
  color: #a6b0ba;          /* 灰色正文，而非偏亮的 text-primary */
  line-height: 1.5;
  margin: 0 0 24px;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 72px;               /* 四行之间舒展且统一的纵向留白 */
}

.feature-row {
  display: flex;
  align-items: center;     /* 文字在图片高度内垂直居中 */
  gap: 40px;               /* 接近目标图文列间距 */
}

/* 第 2、4 行：图片靠右（原站 order-md-2） */
.feature-row.flip {
  flex-direction: row-reverse;
}

/* 图片占位框：横向矩形，5/12 宽，随列自适应 */
.feature-img {
  flex: 0 0 auto;
  width: 40.1%;            /* 在 1110px 内容列中约 445px */
  aspect-ratio: 445 / 371.16;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 1px;
}

.feature-text {
  flex: 1 1 auto;
  min-width: 0;            /* 防止长文本撑破 flex */
}

/* 桌面正文列按目标自然换行；保留图片尺寸与左右位置 */
@media (min-width: 1200px) {
  .feature-text {
    flex: 0 0 665px;
    max-width: 665px;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .feature-text {
    flex: 1 1 auto;
    max-width: none;
  }
}

.feature-text h3 {
  font-size: 2rem;
  font-weight: 700;        /* 白色粗体标题 */
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 8px;         /* 标题与正文距离较小 */
}

.feature-text p {
  font-size: 1.25rem;
  font-weight: 400;        /* 正常字重 */
  color: #a6b0ba;          /* 浅灰 */
  line-height: 1.5;
  margin: 0;
}

/* 移动端：图片上、文字下（覆盖 row / row-reverse，图片优先） */
@media (max-width: 767.98px) {
  .feature-row,
  .feature-row.flip {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .feature-img {
    width: 100%;
  }
}

/* ---------- Popular reviews：广告位、标题行与双列评论 ---------- */
.popular-reviews-section .ad-placeholder {
  width: 100%;
  max-width: 970px;
  aspect-ratio: 970 / 250;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.popular-reviews-section .reviews-heading {
  align-items: center;
  margin: 4px -15px 16px;
}

.popular-reviews-section .reviews-heading h2 {
  color: var(--text-primary);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin: 0 -15px;
}

.reviews-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.review-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 0 0 14px;
  border-bottom: 1px solid #303744;
}

.review-card .review-cover {
  flex: 0 0 72px;
  width: 72px;
  aspect-ratio: 72 / 97.24;
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

.review-content {
  flex: 1 1 auto;
  min-width: 0;
}

.review-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.review-meta {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.review-meta .user {
  color: #c3ccd4;
  font-weight: 400;
}

.review-meta .reviewed-label {
  color: #87919b;
  font-size: 13px;
  margin: 0 3px;
}

.review-meta .game {
  color: #b6c0c9;
  font-weight: 400;
}

.review-meta .backer-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent-dark);
  color: #16181c;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

.review-date {
  flex: 0 0 auto;
  color: #828c97;
  font-size: 14px;
  white-space: nowrap;
}

.review-detail-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0 7px;
}

.review-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
}

.review-stars .filled-stars {
  color: var(--accent);
}

.review-stars .half-star {
  color: transparent;
  background: linear-gradient(90deg, var(--accent) 50%, #414856 50%);
  background-clip: text;
  -webkit-background-clip: text;
}

.review-stars .empty-stars {
  color: #414856;
}

.review-extra-heart {
  color: #8293e8;
  font-size: 14px;
  line-height: 1;
}

.review-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  font-size: 13px;
}

.review-status .status-square {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--status-completed);
}

.review-text {
  font-size: 15px;
  color: var(--text-review);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: normal;
  text-align: left;
  margin: 0;
}

.review-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-body .review-japanese {
  margin-top: 10px;
  font-weight: 700;
}

.review-bottom-bar {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 24px;
}

.review-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.action-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: currentColor;
  color: #68748a;
}

.open-review {
  color: var(--text-primary);
  white-space: nowrap;
}

.open-review:hover {
  color: #ffffff;
}

.review-expand-label {
  margin-left: auto;
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: 12px;
}

.review-expand-label::before {
  content: "⌄";
  display: inline-block;
  margin-right: 5px;
  font-size: 16px;
  line-height: 1;
  vertical-align: -1px;
}

.status-chip {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.status-chip.completed {
  background-color: rgba(67, 185, 79, 0.15);
  color: var(--status-completed);
}

/* ---------- Latest news and Popular lists ---------- */
.news-section {
  padding-bottom: 12px;
}

.news-section .news-heading,
.popular-lists-section .popular-lists-heading {
  align-items: center;
  margin: 4px -15px 16px;
}

.news-section .news-heading h2,
.popular-lists-section .popular-lists-heading h2 {
  color: var(--text-primary);
}

.news-card {
  min-height: 140.63px;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
  margin: 0 -15px;
}

.news-card .news-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 18px;
}

.news-card h3 {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  margin: 0;
}

.news-card .news-summary {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0;
}

.news-card .news-date {
  font-size: 14px;
  color: #929ba5;
  margin: 0;
}

.news-card .news-img {
  flex: 0 0 17%;
  width: 17%;
  align-self: stretch;
  background: #30394c;
  border-radius: 0;
}

/* ---------- Popular lists：三列拼接封面与榜单信息 ---------- */
.popular-lists-section .lists-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 -15px;
}

.popular-lists-section .list-card {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.popular-lists-section .list-card .list-covers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 2.2 / 1;
  overflow: hidden;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.popular-lists-section .list-card .list-cover {
  min-width: 0;
  height: 100%;
  background: #303644;
}

.popular-lists-section .list-card .list-cover:nth-child(2) { background: #393743; }
.popular-lists-section .list-card .list-cover:nth-child(3) { background: #343b48; }
.popular-lists-section .list-card .list-cover:nth-child(4) { background: #41404a; }
.popular-lists-section .list-card .list-cover:nth-child(5) { background: #303846; }

.popular-lists-section .list-card .list-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.popular-lists-section .list-card .list-meta {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0;
}

.popular-lists-section .list-card .list-meta .by {
  color: inherit;
}

/* ---------- Home footer ad placeholder ---------- */
.home-bottom-ad-wrap {
  width: min(970px, calc(100% - 32px));
  aspect-ratio: 970 / 90;
  margin: 0 auto 30px;
}

.home-bottom-ad {
  width: 100%;
  height: 100%;
  background: #242832;
  border: 1px solid rgba(59, 65, 78, 0.45);
  border-radius: 4px;
}

/* ---------- 三列信息：Coming soon / Anticipated / Sleeper hits ---------- */
.home-info-section {
  padding: 0 0 24px;
}

.home-info-section .info-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.home-info-section .info-column {
  min-width: 0;
}

.home-info-section .info-heading {
  min-height: 23.04px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 17px;
}

.home-info-section .info-heading h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.2;
}

.home-info-section .info-heading a {
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 300;
  line-height: 1.2;
  white-space: nowrap;
}

.home-info-section .info-heading a:hover {
  color: #fff;
}

.home-info-section .info-row {
  min-height: 66.43px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 11px;
}

.home-info-section .mini-cover {
  flex: 0 0 48.33px;
  width: 48.33px;
  height: 66.43px;
  border: 1px solid rgba(59, 65, 78, 0.75);
  border-radius: 4px;
  background: #242832;
}

.home-info-section .info-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-info-section .info-name {
  display: block;
  color: #f0f2f4;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.38;
}

.home-info-section .info-date,
.home-info-section .info-rating {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  white-space: nowrap;
}

.home-info-section .rating-star {
  margin-left: 2px;
  color: #8f9ca7;
  font-size: 14px;
}

/* ---------- Homepage-only footer ---------- */
.home-footer {
  position: static;
  margin-top: 0;
  padding: 14px 0 28px;
  border: 0;
  background: #242832;
}

.home-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.home-footer-main {
  min-width: 0;
}

.home-footer .footer-links {
  gap: 8px;
  margin: 0 0 8px;
}

.home-footer .footer-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}

.home-footer .footer-links a:hover {
  color: #fff;
}

.home-footer .footer-copy {
  color: #737d87;
  font-size: 14px;
  line-height: 1.5;
}

.home-footer .footer-copy strong {
  color: var(--text-primary);
  font-weight: 700;
}

.home-footer-social {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 2px;
}

.home-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #8f9ca7;
}

.home-footer-social a:hover {
  color: #cbd4dc;
}

.home-footer-social svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (max-width: 900px) {
  .trending-row { grid-template-columns: repeat(3, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .review-card { padding-left: 15px; padding-right: 15px; gap: 16px; }
  .popular-lists-section .lists-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lists-grid { grid-template-columns: 1fr; }
  .home-info-section .info-columns { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- 手机宽度：Hero 收窄、按钮与登录提示纵向排列 ---------- */
@media (max-width: 640px) {
  .hero { padding: 40px 0 40px; }
  .hero h2 { font-size: 22px; }
  .hero-stats { gap: 24px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .news-card { flex-direction: column; }
  .news-card .news-content { min-height: 140px; }
  .news-card .news-img {
    flex: 0 0 auto;
    width: 100%;
    min-height: 120px;
  }
  .popular-lists-section .lists-grid { grid-template-columns: 1fr; }
  .home-bottom-ad-wrap { width: calc(100% - 32px); }
  .home-footer-inner { flex-direction: column; gap: 14px; }
  .home-footer .footer-links { column-gap: 16px; }
}
