/* game-hall.css — 游戏大厅 */

.game-hall-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 246, 246, 0.98)),
    var(--c-surface, #fbfbfb);
  color: var(--c-text, #3a3a3a);
  overflow: hidden;
  font-family: var(--font, -apple-system, "PingFang SC", sans-serif);
}

.game-hall-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 12px;
}

.game-hall-heading {
  min-width: 0;
  padding-top: 1px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.game-hall-heading:active { opacity: .58; }

.game-hall-kicker {
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--c-sub, #888);
  letter-spacing: 0;
}

.game-hall-heading h1 {
  margin: 1px 0 0;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  color: var(--c-text, #3a3a3a);
  letter-spacing: 0;
}

.game-hall-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px));
}

.game-hall-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.game-api-section {
  margin-top: 14px;
}

.game-api-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--c-border, rgba(0, 0, 0, 0.05));
  border-radius: 8px;
  background: var(--c-bg, #fff);
  color: var(--c-text, #3a3a3a);
  box-shadow: var(--shadow-sm, 0 1px 6px rgba(0, 0, 0, 0.05));
  text-align: left;
}

.game-api-card:active {
  background: var(--c-surface-2, #f3f3f3);
}

.game-api-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #5e6570;
  color: #fff;
  font-size: 16px;
}

.game-api-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.game-api-copy strong {
  font-size: 15px;
  line-height: 1.3;
}

.game-api-copy small {
  color: var(--c-sub, #888);
  font-size: 11px;
  line-height: 1.45;
}

.game-api-value {
  max-width: 92px;
  overflow: hidden;
  color: var(--c-sub, #888);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-api-arrow {
  color: var(--c-hint, #aaa);
  font-size: 12px;
}

.game-api-form-note {
  padding: 12px 16px 4px;
  color: var(--c-sub, #888);
  font-size: 12px;
  line-height: 1.6;
}

.game-card {
  position: relative;
  min-width: 0;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--c-border, rgba(0, 0, 0, 0.05));
  border-radius: 8px;
  background: var(--c-bg, #fff);
  color: var(--c-text, #3a3a3a);
  box-shadow: var(--shadow-sm, 0 1px 6px rgba(0, 0, 0, 0.05));
  text-align: left;
  transition: transform 0.15s var(--ease, ease), background 0.15s var(--ease, ease), border-color 0.15s var(--ease, ease);
}

.game-card:active {
  transform: scale(0.97);
  background: var(--c-surface, #fbfbfb);
  border-color: var(--c-border-m, rgba(0, 0, 0, 0.09));
}

.game-card-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  background: #555;
}

.game-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.game-card-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
  color: var(--c-text, #3a3a3a);
}

.game-card-meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
  color: var(--c-sub, #888);
}

.game-card-status {
  align-self: flex-start;
  max-width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--c-surface-2, #f3f3f3);
  color: var(--c-sub, #888);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.game-card-wolf .game-card-icon {
  background: #545b66;
}

.game-card-bar .game-card-icon {
  background: #7a6753;
}

.game-card-chat .game-card-icon {
  background: #4f6d68;
}

.game-card-vote .game-card-icon {
  background: #8a5c67;
}

:root.theme-dark .game-hall-page {
  background:
    linear-gradient(180deg, rgba(22, 22, 24, 0.98), rgba(16, 16, 17, 0.98)),
    var(--c-bg, #0f0f10);
}

:root.theme-dark .game-card {
  background: var(--c-surface, #171719);
  border-color: var(--c-border, rgba(255, 255, 255, 0.08));
}

:root.theme-dark .game-api-card {
  background: var(--c-surface, #171719);
  border-color: var(--c-border, rgba(255, 255, 255, 0.08));
}

:root.theme-dark .game-api-card:active {
  background: var(--c-surface-2, #222326);
}

:root.theme-dark .game-card:active {
  background: var(--c-surface-2, #222326);
  border-color: var(--c-border-m, rgba(255, 255, 255, 0.14));
}

:root.theme-dark .game-card-status {
  background: var(--c-surface-2, #222326);
}

@media (max-width: 360px) {
  .game-hall-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 118px;
  }
}
