/* ============================================================
   游戏厅 —— 聚合首页样式
   自包含：变量在此定义，不依赖游戏服务的样式表
   ============================================================ */

:root {
  --bg: #12121a;
  --bg-soft: #1c1c28;
  --panel: #22222f;
  --panel-2: #2b2b3a;
  --line: #383848;
  --text: #f0f0f5;
  --muted: #9a9ab0;
  --a: #ff5c7a;   /* 左栏主色 */
  --b: #4cc9f0;   /* 右栏主色 */
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

body.hub-page {
  background:
    radial-gradient(1000px 560px at 50% -12%, #2a2036 0%, transparent 62%),
    radial-gradient(760px 380px at 100% 100%, #1c2a3a 0%, transparent 58%),
    var(--bg);
}

/* 门户比单页宽，覆盖 #app 的 560px 限制 */
body.hub-page #hub {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px calc(28px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

/* ---------- 页头 ---------- */
.hub-head {
  text-align: center;
  margin-bottom: 22px;
}

.hub-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--b);
  margin-bottom: 8px;
}

.hub-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 6px;
}

.hub-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- 双栏 ---------- */
.hub-cols {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 14px;
  align-items: start;
}

/*
 * 显式指定列位：::before 会成为第一个子元素并自动占据第 1 列，
 * 若不显式定位，hub-col 会被挤到第 2、3 列导致布局错乱。
 */
.hub-col[data-col="left"] { grid-column: 1; }
.hub-col[data-col="right"] { grid-column: 3; }

/* 中缝：1px 分隔线 */
.hub-cols::before {
  content: '';
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.hub-col-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-left: 2px;
}

.hub-col-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- 游戏卡片 ---------- */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 15px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
}

/* 顶部一道主色渐变条，用于区分左/右栏 */
.game-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--a), var(--b));
  opacity: .8;
}
.hub-col[data-col="right"] .game-card::before { opacity: .3; }

.gc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--a);
  flex: none;
}
.hub-col[data-col="right"] .gc-icon { color: var(--b); }

.gc-body { flex: 1; min-width: 0; }

.gc-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.gc-tag {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 8px;
  letter-spacing: .3px;
}

.gc-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #b9b9cc;
  margin: 0;
}

/* 可点击的卡片：整卡是热区 */
.game-card.is-live {
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.game-card.is-live:hover {
  transform: translateY(-3px);
  border-color: var(--a);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 92, 122, .28);
}
.game-card.is-live:active { transform: translateY(-1px); }

.gc-go {
  align-self: flex-start;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #17121c;
  background: linear-gradient(135deg, var(--a), #ffa06b);
}

/* 即将上线 */
.game-card.is-soon { opacity: .92; }
.game-card.is-soon::before { background: var(--b); }

.gc-badge {
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--b);
  background: rgba(76, 201, 240, .12);
  border: 1px solid rgba(76, 201, 240, .3);
}

/* 空槽位：虚线描边，明确表达「这里还可以放东西」 */
.game-card.is-slot {
  border-style: dashed;
  border-color: #2f2f3e;
  background: rgba(28, 28, 40, .42);
  box-shadow: none;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 84px;
}
.game-card.is-slot::before { display: none; }
.game-card.is-slot .gc-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #55556a;
  border-style: dashed;
}
.game-card.is-slot .gc-title {
  font-size: 14px;
  font-weight: 600;
  color: #6f6f86;
  margin: 0;
}
.game-card.is-slot .gc-tag {
  font-size: 11px;
  color: #55556a;
  margin: 3px 0 0;
}

/* ---------- 页脚 ---------- */
.hub-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 11.5px;
  color: #5d5d72;
}

/* ---------- 窄屏：双栏堆叠 ---------- */
/* 560px 以下单栏卡片会被压得读不了字，直接堆叠 */
@media (max-width: 560px) {
  .hub-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* 堆叠后每栏独占一行，中缝也不需要了 */
  .hub-col[data-col="left"],
  .hub-col[data-col="right"] { grid-column: 1; }
  .hub-cols::before { display: none; }
  body.hub-page #hub { padding: 18px 13px calc(24px + env(safe-area-inset-bottom)); }
  .hub-title { font-size: 23px; }
  .game-card { padding: 14px 13px; }
}

@media (min-width: 900px) {
  body.hub-page #hub { max-width: 860px; }
}