/* ── cat-game.css · 游戏分类 panel · C 样式沉浸大卡 + Detail Sheet (参考老项目方向骨架) ── */

/* ── Container ── */
.v2-cat-game { display: none; padding: 0; box-sizing: border-box; width: 100%; min-width: 0; }
.v2-cat-game.v2-cat-game--show { display: block; animation: v2CatGameFadeIn 0.28s ease-out; }
@keyframes v2CatGameFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Filter Bar (限免/VIP/金币) ── */
.v2-game-filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v2-game-filter-bar::-webkit-scrollbar { display: none; }
.v2-game-filter-label {
  font-size: 12px; color: rgba(255,255,255,0.4);
  flex-shrink: 0; margin-right: 4px;
}
.v2-game-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2-game-pill.v2-game-pill--active {
  color: #fff;
  background: linear-gradient(135deg, #ff3b6b, #ff5e3a);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(255,59,107,0.35);
}

/* ── Grid (1 列大卡) ── */
.v2-game-grid {
  padding: 8px 14px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.v2-cat-game__empty {
  text-align: center; padding: 32px 16px;
  color: rgba(255,255,255,0.38); font-size: 13px;
}

/* ── Card · C 样式 沉浸大图 + 标题/CTA 叠加 ── */
.v2-game-card {
  position: relative;
  width: 100%; aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: #15171c;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 22px rgba(0,0,0,0.55);
  transition: transform 0.18s ease-out;
}
.v2-game-card:active { transform: scale(0.985); }
.v2-game-card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.v2-game-card__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a1f 0%, #2a2330 100%);
  color: rgba(255,255,255,0.32);
  font-size: 14px; font-weight: 600; letter-spacing: 1.5px;
}
.v2-game-card__shade {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 58%;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 35%, transparent 100%);
  pointer-events: none;
}

/* 角标 (贴左上边角 · 玻璃态融入封面) · 通用样式, 三色覆盖见底部 */
.v2-game-card__badge {
  position: absolute; top: 0; left: 0;
  font-size: 11px; font-weight: 800;
  padding: 6px 13px;
  border-radius: 0 0 14px 0;
  letter-spacing: 0.8px; line-height: 1.4;
  z-index: 3;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* 卡片底部：标题大字 + meta + CTA */
.v2-game-card__bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 16px 18px;
  z-index: 2;
}
.v2-game-card__title {
  font-size: 22px; font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.v2-game-card__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.v2-game-card__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(255,255,255,0.72);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  min-width: 0; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-game-card__dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.v2-game-card__cta {
  flex-shrink: 0;
  padding: 8px 18px; border-radius: 99px;
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.4px;
  pointer-events: none;
  white-space: nowrap;
  color: #fff;
}

/* ── Badge 三色 (卡片 + sheet 复用) ── */
.v2-game-badge--free {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,200,83,0.55);
}
.v2-game-badge--vip {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  box-shadow: 0 2px 10px rgba(168,85,247,0.55);
}
.v2-game-badge--coin {
  background: linear-gradient(135deg, #f5a623, #ffd740);
  color: #5a2800;
  box-shadow: 0 2px 8px rgba(245,166,35,0.55);
}

/* 卡片角标三色覆盖 (玻璃态 + 文字色, override .v2-game-badge--*) */
.v2-game-card__badge.v2-game-badge--free {
  background: rgba(0,0,0,0.42);
  color: #4ade80;
  box-shadow: none;
}
.v2-game-card__badge.v2-game-badge--vip {
  background: rgba(0,0,0,0.42);
  color: #f0abfc;
  box-shadow: none;
}
.v2-game-card__badge.v2-game-badge--coin {
  background: rgba(0,0,0,0.42);
  color: #fcd34d;
  box-shadow: none;
}

/* ── CTA 三色 (卡片 + sheet 复用) ── */
.v2-game-cta--free {
  background: linear-gradient(135deg, #00c853, #00e676);
  box-shadow: 0 3px 12px rgba(0,200,83,0.45);
}
.v2-game-cta--vip {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 3px 14px rgba(168,85,247,0.5);
}
.v2-game-cta--coin {
  background: linear-gradient(135deg, #f5a623, #ffd740);
  color: #5a2800;
  box-shadow: 0 3px 12px rgba(245,166,35,0.5);
}

/* ════════════════════════════════════════════ */
/* ── Detail Sheet · 挂 #modal-root, absolute inset:0 ── */
/* ════════════════════════════════════════════ */

.v2-game-detail-layer {
  position: absolute; inset: 0;
  pointer-events: none;
}
.v2-game-detail-layer--show { pointer-events: auto; }

.v2-game-detail-mask {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.34s ease-out;
}
.v2-game-detail-layer--show .v2-game-detail-mask {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.v2-game-detail-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 88%;
  background: linear-gradient(180deg, #1e1228 0%, #0f1a2e 45%, #0a0c14 100%);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  box-shadow: 0 -10px 36px rgba(0,0,0,0.75);
  transform: translateY(900px);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column;
}
.v2-game-detail-layer--show .v2-game-detail-sheet { transform: translateY(0); }

.v2-game-detail-sheet__drag {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}
.v2-game-detail-sheet__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  font-size: 22px; line-height: 1;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.v2-game-detail-sheet__scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.v2-game-detail-sheet__scroll::-webkit-scrollbar { display: none; }

/* Detail · Banner */
.v2-game-detail__banner {
  margin: 8px 16px 0;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #15171c;
}
.v2-game-detail__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.v2-game-detail__img-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a1f 0%, #2a2330 100%);
  color: rgba(255,255,255,0.32);
  font-size: 14px; letter-spacing: 1.5px;
}
.v2-game-detail__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
  pointer-events: none;
}

/* Detail · Body */
.v2-game-detail__body {
  padding: 16px 16px 0;
}
.v2-game-detail__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.v2-game-detail__title {
  flex: 1; min-width: 0;
  font-size: 19px; font-weight: 800;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.2px;
}
.v2-game-detail__badge {
  flex-shrink: 0;
  font-size: 11px; font-weight: 800;
  padding: 4px 11px; border-radius: 99px;
  letter-spacing: 0.5px; line-height: 1.4;
}
.v2-game-detail__tag {
  font-size: 12px;
  color: rgba(255,255,255,0.42);
  margin-bottom: 14px;
}

/* Detail · Stats */
.v2-game-detail__stats {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.v2-game-detail__stat {
  flex: 1;
  padding: 12px 0;
  text-align: center;
}
.v2-game-detail__stat-num {
  font-size: 16px; font-weight: 800; color: #fff;
}
.v2-game-detail__stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}
.v2-game-detail__stat-sep {
  width: 1px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* Detail · CTA */
.v2-game-detail__cta {
  display: block;
  width: 100%;
  padding: 15px 0;
  border-radius: 14px;
  font-size: 16px; font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
  margin-bottom: 22px;
}
.v2-game-detail__cta:active { transform: scale(0.98); }

/* Detail · Section */
.v2-game-detail__section {
  margin-bottom: 22px;
}
.v2-game-detail__section-title {
  font-size: 14px; font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.v2-game-detail__desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.75;
  white-space: pre-line;
}
