:root {
  --felt: #123a2d;
  --felt-dark: #071714;
  --panel: #f4efe7;
  --ink: #17181c;
  --muted: #6e675d;
  --red: #e52d32;
  --yellow: #f4c334;
  --blue: #2776cf;
  font-family: "Arial Black", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #fff;
  background:
    radial-gradient(circle at 16% 18%, rgba(229, 45, 50, 0.26), transparent 18rem),
    radial-gradient(circle at 82% 20%, rgba(244, 195, 52, 0.2), transparent 18rem),
    linear-gradient(135deg, #07090d 0%, #16382d 58%, #07090d 100%);
}

button,
a {
  border-radius: 8px;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.lobby-shell {
  display: grid;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.lobby-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12), transparent 62%),
    radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-dark) 78%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  padding: 26px;
}

.lobby-header p,
.game-tag {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.lobby-header h1 {
  margin: 4px 0 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  letter-spacing: 0;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}

.lobby-header > span {
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 900;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.game-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 16px;
  min-height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 16px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.game-card[href],
.game-card[data-href] {
  cursor: pointer;
}

.game-card[href]:hover,
.game-card[href]:focus-visible,
.game-card[data-href]:hover,
.game-card[data-href]:focus-visible {
  border-color: rgba(244, 195, 52, 0.78);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
  outline: 0;
  transform: translateY(-4px);
}

.game-card--empty {
  opacity: 0.76;
}

.game-preview {
  display: grid;
  place-items: center;
  min-height: 196px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(229, 45, 50, 0.18), rgba(39, 118, 207, 0.18)),
    #101217;
  overflow: hidden;
}

.game-preview img {
  display: block;
  width: 86px;
  height: auto;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.5));
}

.game-preview--empty span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 3rem;
}

.game-preview--uno {
  background:
    radial-gradient(circle at center, rgba(244, 195, 52, 0.3), transparent 56%),
    linear-gradient(145deg, #d82228 0%, #8f1219 100%);
}

.uno-logo-card {
  display: grid;
  place-items: center;
  width: 104px;
  height: 154px;
  border: 5px solid #08090d;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at center, #f3d52f 0 35%, transparent 36%),
    #e52d32;
  color: #fff;
  font-size: 2.1rem;
  text-shadow:
    0 3px 0 #08090d,
    2px 0 0 #08090d,
    -2px 0 0 #08090d;
  transform: rotate(-7deg);
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.42);
}

.game-info {
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.game-info h2 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 1.55rem;
  letter-spacing: 0;
}

.game-tag {
  color: var(--muted);
  font-size: 0.85rem;
}

.game-state {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(36, 160, 90, 0.16);
  color: #137441;
  padding: 5px 9px;
  font-size: 0.82rem;
}

.game-state--muted {
  background: rgba(23, 24, 28, 0.1);
  color: var(--muted);
}

.game-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.game-button {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 680px) {
  .lobby-header {
    align-items: start;
    flex-direction: column;
    min-height: 0;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .game-preview {
    min-height: 180px;
  }
}
