:root {
  --hub-ink: #231826;
  --hub-muted: #5d5062;
  --hub-gold: #ffc83d;
  --hub-mint: #9cf2d1;
  --hub-coral: #ff6f61;
  --hub-blue: #37c7ff;
  --hub-shadow: 0 18px 44px rgba(35, 24, 38, 0.18);
}

* {
  box-sizing: border-box;
}

body.dm-games-page {
  margin: 0;
  color: var(--hub-ink);
  background:
    radial-gradient(circle at 10% 7%, rgba(255, 200, 61, 0.66), transparent 25%),
    radial-gradient(circle at 88% 12%, rgba(55, 199, 255, 0.44), transparent 26%),
    radial-gradient(circle at 50% 98%, rgba(255, 111, 97, 0.24), transparent 32%),
    linear-gradient(140deg, rgba(156, 242, 209, 0.62), rgba(255, 215, 220, 0.46)),
    #f7fbff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.games-header,
.games-main,
.games-footer {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0 10px;
  flex-wrap: wrap;
}

.games-brand,
.games-nav a,
.games-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
}

.games-brand {
  padding: 10px 16px;
  color: #ffffff;
  background: var(--hub-ink);
  box-shadow: 0 4px 0 rgba(35, 24, 38, 0.24);
}

.games-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.games-nav a {
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(35, 24, 38, 0.1);
  font-size: 0.92rem;
}

.games-hero {
  padding: 28px 0 18px;
}

.games-kicker {
  margin: 0 0 8px;
  color: #117a76;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.games-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.25rem, 9vw, 4.5rem);
  line-height: 1.02;
  text-wrap: balance;
}

.games-summary {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--hub-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 700;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  padding: 8px 0 28px;
}

.game-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 4px solid rgba(35, 24, 38, 0.96);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 200, 61, 0.62), transparent 26%),
    linear-gradient(150deg, #ffffff 0%, #fff3bd 47%, #d9fff2 100%);
  box-shadow: 0 12px 0 rgba(35, 24, 38, 0.16), var(--hub-shadow);
}

.game-card:nth-child(2) {
  background:
    radial-gradient(circle at 18% 0%, rgba(55, 199, 255, 0.34), transparent 26%),
    linear-gradient(150deg, #ffffff 0%, #dff9ff 48%, #fff1a8 100%);
}

.game-card-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px 20px 6px;
}

.game-card-media::before {
  content: "";
  position: absolute;
  width: min(58vw, 250px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 26%, rgba(255, 200, 61, 0.46) 27% 44%, rgba(55, 199, 255, 0.2) 45% 60%, transparent 61%);
}

.game-card img {
  position: relative;
  z-index: 1;
  width: min(58vw, 180px);
  height: auto;
  filter: drop-shadow(0 16px 12px rgba(35, 24, 38, 0.2)) drop-shadow(0 0 22px rgba(255, 200, 61, 0.38));
}

.game-chip {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border: 2px solid #ffffff;
  border-radius: 16px;
  color: var(--hub-ink);
  background: linear-gradient(145deg, #fff9c7, var(--hub-gold));
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 7px 0 rgba(35, 24, 38, 0.16), 0 12px 22px rgba(35, 24, 38, 0.18);
}

.game-chip.bad {
  right: 14%;
  bottom: 22%;
  color: #ffffff;
  background: linear-gradient(145deg, #6b4d91, #171923);
}

.game-chip.good {
  left: 13%;
  top: 22%;
}

.game-card-body {
  padding: 0 clamp(16px, 4vw, 24px) clamp(18px, 4vw, 24px);
}

.game-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 2.2rem);
  line-height: 1.05;
}

.game-card p {
  margin: 10px 0 0;
  color: var(--hub-muted);
  font-weight: 700;
}

.game-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.game-meta span {
  display: block;
  padding: 9px 10px;
  border: 2px solid rgba(35, 24, 38, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.game-prize {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 3px solid rgba(35, 24, 38, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.game-prize img {
  width: 74px;
  filter: drop-shadow(0 8px 10px rgba(35, 24, 38, 0.18));
}

.game-prize strong,
.game-prize span {
  display: block;
}

.game-prize strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.game-prize span {
  margin-top: 3px;
  color: var(--hub-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.games-button {
  width: 100%;
  border: 2px solid var(--hub-ink);
  padding: 12px 18px;
  color: var(--hub-ink);
  background: linear-gradient(145deg, #fff78e, var(--hub-gold) 54%, #ff9f1c);
  box-shadow: 0 5px 0 rgba(35, 24, 38, 0.2);
  cursor: pointer;
  font: inherit;
  line-height: 1.1;
  text-align: center;
}

.games-note {
  margin: 0 0 28px;
  padding: clamp(16px, 4vw, 24px);
  border: 1px solid rgba(35, 24, 38, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--hub-muted);
  font-weight: 700;
}

.games-footer {
  padding: 22px 0 30px;
  color: var(--hub-muted);
  font-weight: 700;
}

.dm-games-page[dir="rtl"] .game-card-body,
.dm-games-page[dir="rtl"] .games-hero,
.dm-games-page[dir="rtl"] .games-note,
.dm-games-page[dir="rtl"] .games-footer {
  text-align: right;
}

@media (max-width: 620px) {
  .games-header {
    align-items: stretch;
  }

  .games-brand,
  .games-nav,
  .games-nav a {
    width: 100%;
  }

  .games-nav {
    justify-content: stretch;
  }

  .game-prize {
    grid-template-columns: 62px 1fr;
  }

  .game-prize img {
    width: 62px;
  }
}
