.games-heading {
  align-items: center;
}

.wallet-only-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  color: #b9ccff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(76, 141, 255, 0.1);
  border: 1px solid rgba(76, 141, 255, 0.22);
  border-radius: 999px;
}

.game-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.games-panel {
  overflow: hidden;
}

.games-toolbar,
.package-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.games-toolbar {
  margin-bottom: 22px;
}

.games-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.game-status-filter-field {
  width: min(100%, 190px);
}

.game-status-filter-field select {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 14px;
  color: var(--text);
  font: inherit;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
  background: rgba(4, 14, 26, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
}

.game-status-filter-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(66, 232, 180, 0.1);
}

.games-toolbar h2,
.package-heading h3 {
  margin: 7px 0 0;
  letter-spacing: -0.035em;
}

.games-toolbar h2 {
  font-size: 24px;
}

.package-heading h3 {
  font-size: 20px;
}

.games-table,
.packages-table {
  width: 100%;
  border-collapse: collapse;
}

.games-table th,
.games-table td,
.packages-table th,
.packages-table td {
  padding: 16px 13px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.games-table th,
.packages-table th {
  color: #8299b4;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.games-table tbody tr:last-child td,
.packages-table tbody tr:last-child td {
  border-bottom: 0;
}

.games-table tbody tr:hover,
.packages-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.game-identity-cell {
  min-width: 250px;
}

.game-identity {
  display: grid;
  gap: 5px;
}

.game-identity strong,
.package-name {
  overflow-wrap: anywhere;
}

.game-app-package,
.package-code,
.package-updated {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.package-total {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 6px 10px;
  color: #b9ccff;
  font-size: 11px;
  font-weight: 850;
  background: rgba(76, 141, 255, 0.1);
  border-radius: 999px;
}

.game-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.game-status::before {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.game-status.active {
  color: var(--accent);
}

.game-status.disabled {
  color: var(--danger);
}

.game-actions-cell {
  min-width: 180px;
}

.game-modal-card {
  width: min(100%, 980px);
}

.game-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 12px;
}

.game-detail-summary > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px;
  background: rgba(5, 16, 29, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 15px;
}

.game-detail-summary span,
.package-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.game-detail-summary strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

#game-app-package {
  font-family: Consolas, "Courier New", monospace;
}

#game-modal-status.active {
  color: var(--accent);
}

#game-modal-status.disabled {
  color: var(--danger);
}

.game-modal-message {
  margin-top: 14px;
}

.package-panel {
  margin-top: 18px;
  padding: 20px;
  background: rgba(5, 16, 29, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
}

.package-heading {
  margin-bottom: 14px;
}

.package-count {
  padding: 6px 10px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 999px;
}

.package-name-cell {
  min-width: 190px;
}

.package-code-cell {
  min-width: 180px;
}

.package-price {
  color: #eaf2ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.package-action-cell {
  min-width: 90px;
}

@media (max-width: 980px) {
  .game-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .game-metrics,
  .game-detail-summary {
    grid-template-columns: 1fr;
  }

  .wallet-only-pill,
  .games-toolbar .games-filters,
  .games-toolbar .search-field,
  .game-status-filter-field {
    width: 100%;
  }

  .wallet-only-pill {
    justify-content: center;
  }

  .games-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .games-table,
  .games-table tbody,
  .games-table tr,
  .games-table td,
  .packages-table,
  .packages-table tbody,
  .packages-table tr,
  .packages-table td {
    display: block;
    width: 100%;
  }

  .games-table thead,
  .packages-table thead {
    display: none;
  }

  .games-table tr,
  .packages-table tr {
    margin-bottom: 12px;
    padding: 15px;
    background: rgba(5, 16, 29, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
  }

  .games-table td,
  .packages-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }

  .games-table td::before,
  .packages-table td::before {
    flex: 0 0 auto;
    color: #8299b4;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .games-table td:last-child,
  .packages-table td:last-child {
    border-bottom: 0;
  }

  .game-identity,
  .package-name,
  .package-code {
    max-width: 68%;
    text-align: right;
  }

  .package-panel {
    padding: 14px;
  }

  .package-heading {
    align-items: flex-start;
  }
}
