.ui-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.ui-icon.is-chip {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.ui-icon.is-stat {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}

.game-shell {
  --game-accent: #f4bd4d;
  --game-accent-2: #ff7d56;
  --game-accent-soft: rgba(244, 189, 77, 0.18);
  --game-accent-deep: rgba(255, 125, 86, 0.12);
  position: relative;
  display: grid;
  gap: 18px;
  min-height: 100%;
  padding: 26px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, var(--game-accent-soft), transparent 34%),
    radial-gradient(circle at bottom center, var(--game-accent-deep), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.game-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--game-accent), var(--game-accent-2), transparent 78%);
  opacity: 0.82;
}

.game-shell-glow {
  position: absolute;
  inset: auto -16% -32% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--game-accent-soft), transparent 68%);
  filter: blur(14px);
  pointer-events: none;
}

.game-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  z-index: 1;
}

.game-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.game-emblem {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--game-accent), var(--game-accent-2));
  color: #1d1507;
  font-size: 1.8rem;
  box-shadow: 0 18px 32px var(--game-accent-soft);
}

.game-hero-copy {
  max-width: 680px;
}

.game-kicker {
  margin: 0 0 8px;
  color: rgba(255, 248, 219, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 10px;
  font-weight: 800;
}

.game-shell h3 {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: clamp(32px, 4vw, 42px);
  line-height: 0.95;
}

.game-copy {
  margin: 0;
  color: #d7dff2;
  line-height: 1.65;
}

.game-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.game-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eef4ff;
}

.game-chip-copy {
  display: grid;
  gap: 3px;
}

.game-chip b {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.game-chip strong {
  font-size: 13px;
}

.game-chip.is-primary {
  background: rgba(244, 189, 77, 0.12);
  border-color: rgba(244, 189, 77, 0.24);
}

.game-chip.is-secondary {
  background: rgba(93, 217, 255, 0.12);
  border-color: rgba(93, 217, 255, 0.22);
}

.game-chip.is-danger {
  background: rgba(255, 94, 143, 0.12);
  border-color: rgba(255, 94, 143, 0.24);
}

.game-chip.is-warn {
  background: rgba(255, 221, 112, 0.12);
  border-color: rgba(255, 221, 112, 0.22);
}

.game-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.game-stat {
  padding: 15px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(7, 12, 23, 0.5);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.game-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.game-stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.game-stat span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.game-stat strong {
  display: block;
  font-size: 15px;
  line-height: 1.45;
}

.game-stat.is-accent {
  background:
    linear-gradient(135deg, var(--game-accent-soft), rgba(255, 255, 255, 0.04)),
    rgba(7, 12, 23, 0.52);
  border-color: rgba(255, 255, 255, 0.16);
}

.game-surface {
  position: relative;
  z-index: 1;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(6, 11, 23, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 36px rgba(0, 0, 0, 0.2);
}

.game-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 30%);
}

.game-footer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(237, 243, 255, 0.72);
  line-height: 1.6;
}

.board {
  display: grid;
  gap: 12px;
  justify-content: center;
}

.cell {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
}

.cell,
.checker-square,
.chess-square,
.connect4-drop {
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.cell:hover:not(:disabled),
.checker-square:hover:not(:disabled),
.chess-square:hover:not(:disabled),
.connect4-drop:hover:not(:disabled) {
  transform: translateY(-2px);
}

.cell:disabled,
.checker-square:disabled,
.chess-square:disabled,
.connect4-drop:disabled {
  cursor: not-allowed;
}

.cell:focus-visible,
.checker-square:focus-visible,
.chess-square:focus-visible,
.connect4-drop:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.42);
  outline-offset: 3px;
}

.board-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.board-section-title h4 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 20px;
}

.board-section-title span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

@media (max-width: 900px) {
  .game-hero {
    flex-direction: column;
  }

  .game-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .game-shell {
    padding: 18px;
    border-radius: 24px;
  }

  .game-hero-main {
    flex-direction: column;
  }

  .game-emblem {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 1.4rem;
  }

  .game-surface {
    padding: 14px;
  }
}
