/* 趣玩小游戏 自定义样式 */
:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --accent: #f59e0b;
}

body {
  background: #f5f6fa;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

.site-navbar {
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 60%, #6d28d9 100%);
  box-shadow: 0 2px 10px rgba(55, 48, 163, .35);
}

.brand-emoji { font-size: 1.2em; }

/* 游戏卡片 */
.game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, .18);
  color: inherit;
}
.game-card .card-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #fdf4ff);
}
.game-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.game-card:hover img { transform: scale(1.06); }
.game-card .card-body { padding: .65rem .8rem .75rem; }
.game-card .game-title {
  font-size: .92rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-card .game-meta { font-size: .75rem; color: #94a3b8; }
.game-card .play-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(15,23,42,.55);
  color: #fff; font-size: .72rem;
  border-radius: 20px; padding: 2px 8px;
  backdrop-filter: blur(2px);
}

/* 区块标题 */
.section-title {
  display: flex; align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}
.section-title::before {
  content: "";
  width: 5px; height: 1.1em;
  background: var(--brand);
  border-radius: 3px;
}
.section-title .more { margin-left: auto; font-size: .8rem; font-weight: 400; }

/* 首页轮播 */
.banner-carousel { border-radius: 14px; overflow: hidden; }
.banner-carousel img { width: 100%; height: 400px; object-fit: cover; }
.banner-caption { left: 0; right: 0; bottom: 0; padding-bottom: 1.5rem; background: linear-gradient(transparent, rgba(0,0,0,.72)); }

/* 详情页播放器 */
.player-frame {
  width: 100%;
  /* 屏幕高度 - 导航栏(~56px) - 面包屑(~36px) - 控制栏(~42px) - 页边距 */
  height: calc(100vh - 56px - 36px - 42px - 3rem);
  height: calc(100dvh - 56px - 36px - 42px - 3rem); /* iOS 动态视口，避免地址栏伸缩导致跳动 */
  min-height: 400px;
  border: none;
  background: #0f172a;
  border-radius: 0 0 14px 14px;
}
@media (max-width: 768px) {
  .banner-carousel img { height: auto; } /* 手机图 1.8:1 随宽自适应，整图完整不裁 */
  .player-frame {
    height: calc(100vh - 56px - 30px - 42px - 1.5rem);
    height: calc(100dvh - 56px - 30px - 42px - 1.5rem);
    min-height: 320px;
  }
  /* 移动端标签页保持一行，超宽横向滑动，避免折行错位 */
  .nav-tabs, .nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar, .nav-pills::-webkit-scrollbar { display: none; }
  .nav-tabs .nav-link, .nav-pills .nav-link { white-space: nowrap; }
}

.detail-info-card { border-radius: 14px; }
.tag-pill {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  margin: 0 4px 4px 0;
}
.tag-pill:hover { background: #4f46e5; color: #fff; }

/* 评论 */
.comment-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: .9rem;
  margin-bottom: .8rem;
  background: #fff;
}
.comment-box .reply-box { border-left: 3px solid #c7d2fe; }

/* 排行榜 */
.rank-row {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .8rem;
  border-radius: 10px;
  background: #fff;
  margin-bottom: .5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.rank-no {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  background: #e2e8f0; color: #64748b;
}
.rank-no.top1 { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #fff; }
.rank-no.top2 { background: linear-gradient(135deg,#cbd5e1,#94a3b8); color: #fff; }
.rank-no.top3 { background: linear-gradient(135deg,#d97706,#b45309); color: #fff; }
.rank-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

/* 标签云 */
.tag-cloud-item {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: .45rem 1rem;
  border-radius: 30px;
  text-decoration: none;
  margin: 0 .4rem .4rem 0;
  transition: all .15s;
}
.tag-cloud-item:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 页脚 */
.site-footer { background: #0f172a; }

/* 游戏 iframe 容器 */
#gameStage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(15,23,42,.25);
}

/* 工具类 */
.text-brand { color: var(--brand); }
