/* ==========================================================
   3D 图标组件（永利图标集）
   用法：<img class="ico ico-md" src="assets/icons/xxx.webp" alt="">
   ========================================================== */
.ico {
  display: inline-block;
  width: var(--ico, 44px);
  height: var(--ico, 44px);
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
  -webkit-user-drag: none;
  user-select: none;
}

.ico-xs { --ico: 20px; }
.ico-sm { --ico: 28px; }
.ico-md { --ico: 44px; }
.ico-lg { --ico: 64px; }
.ico-xl { --ico: 88px; }

/* 宽幅品牌图（logo / banner） */
.ico-wide {
  width: auto;
  height: var(--ico, 32px);
  max-width: 100%;
  object-fit: contain;
}

/* 深色描边图标需要浅色底才看得清 */
.ico-box {
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 243, 248, 0.84));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.ico-box > img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

/* 侧边栏 / 列表行内的小图标（浅底保证深色描边可见） */
.nav-ico {
  width: 24px;
  height: 24px;
  padding: 3px;
  border-radius: 8px;
  flex: 0 0 auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
}

/* ==========================================================
   游戏分类墙（真实运营图）
   ========================================================== */
.cat-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cat-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(150, 196, 255, 0.35);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px rgba(120, 190, 255, 0.35), 0 20px 34px rgba(0, 0, 0, 0.45);
}

.cat-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ==========================================================
   活动中心卡片
   ========================================================== */
.act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.act-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 30, 41, 0.96), rgba(10, 18, 26, 0.96));
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.act-card:hover {
  border-color: rgba(212, 175, 93, 0.4);
  transform: translateY(-2px);
}

.act-card img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
}

.act-card h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.act-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================
   图标库预览
   ========================================================== */
.icon-group { margin-top: 26px; }

.icon-group h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--gold-2);
  letter-spacing: 0.04em;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}

.icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  text-align: center;
}

.icon-cell img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.icon-cell code {
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  word-break: break-all;
}

/* ==========================================================
   游戏大厅磁贴（APP 风格卡面）
   ========================================================== */
.lobby-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.lobby-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.lobby-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.lobby-tabs::-webkit-scrollbar { display: none; }

.lobby-tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lobby-tab.active {
  color: #0a1c2e;
  font-weight: 700;
  border-color: transparent;
  background: linear-gradient(135deg, #bfe1ff, #6fb3ff);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(134px, 1fr));
  gap: 16px;
}

.game-tile {
  position: relative;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(150, 196, 255, 0.28), rgba(16, 26, 48, 0.92));
  border: 1.5px solid rgba(150, 196, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(90, 167, 255, 0.12), 0 18px 32px rgba(0, 0, 0, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.game-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px rgba(120, 190, 255, 0.35), 0 22px 40px rgba(0, 0, 0, 0.45);
}

.tile-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #17203a, #0a1020);
}

.tile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  transition: transform 0.35s ease;
}

.game-tile:hover .tile-bg {
  transform: scale(1.08);
}

.tile-art::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.tile-hot {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0a1c2e;
  background: linear-gradient(135deg, #bfe1ff, #7fb9ff);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.tile-name {
  display: block;
  margin-top: 8px;
  padding: 0 2px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #ffd964;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.tile-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  text-shadow: none;
}

.lobby-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.78rem;
}

.lobby-end::before,
.lobby-end::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150, 196, 255, 0.45), transparent);
}

@media (max-width: 620px) {
  /* 手机端改为横向滑动的游戏跑道 */
  .tile-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .tile-grid::-webkit-scrollbar { display: none; }

  .game-tile {
    flex: 0 0 132px;
    scroll-snap-align: start;
  }
  .tile-name { font-size: 0.76rem; }
}

@media (max-width: 380px) {
  .game-tile { flex: 0 0 118px; }
}

/* ==========================================================
   移动端适配
   ========================================================== */
@media (max-width: 620px) {
  .cat-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cat-card { border-radius: 13px; }

  .act-grid { grid-template-columns: 1fr; gap: 10px; }
  .act-card { padding: 12px 14px; gap: 12px; }
  .act-card img { width: 46px; height: 46px; }

  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  .icon-cell img { width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .cat-wall { grid-template-columns: 1fr; }
}
