:root {
  color-scheme: light dark;
  --bg: #f4f4f4;
  --text: #101114;
  --muted: #7b7f8a;
  --card: #ffffff;
  --shadow: 0 20px 50px rgba(22, 26, 34, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161d;
    --text: #f7f8fb;
    --muted: #a1a6b4;
    --card: #1d212b;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 64, 109, 0.08), transparent 28rem),
    var(--bg);
}

a,
button {
  font: inherit;
}

.home-shell {
  width: min(100% - 32px, 900px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  flex: 1;
  width: 100%;
  display: grid;
  place-content: center;
  gap: 44px;
  padding: 56px 0;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(3rem, 8vw, 4.25rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.game-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.game-btn {
  position: relative;
  min-width: 170px;
  min-height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: #fff;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.game-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 56px rgba(22, 26, 34, 0.18);
  filter: saturate(1.05);
}

.game-btn:active {
  transform: translateY(0) scale(0.98);
}

.game-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-btn-red {
  background: linear-gradient(135deg, #f2483d, #ff5c51);
}

.game-btn-green {
  background: linear-gradient(135deg, #26ad61, #2ac772);
}

.game-btn-blue {
  background: linear-gradient(135deg, #2e86c1, #3498db);
}

.game-btn-purple {
  background: linear-gradient(135deg, #6d5dfc, #8d6bff);
}

.game-btn-card {
  background: #ff406d !important;
}

.game-btn-sudoku {
  background: #5b7cfa;
}

.game-btn-2048 {
  background: #26ad61;
}

.game-btn-puissance4 {
  background: #4a93ff;
}

.game-btn-dames {
  background: #22252d;
}

.game-btn-echecs {
  background: #7b61ff;
}

.game-btn-bataille {
  background: #0ea5e9;
}

.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.is-disabled:hover,
.is-disabled:active {
  transform: none;
  filter: none;
}

.game-btn small {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 0.66rem;
  line-height: 1;
  font-weight: 800;
  opacity: 0.78;
}

.footer {
  padding: 0 0 22px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .home-shell {
    width: min(100% - 22px, 420px);
  }

  .hero {
    gap: 32px;
  }

  .game-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .game-btn {
    width: 100%;
    min-height: 58px;
    font-size: 1.12rem;
  }
}
