.game-page {
  max-width: 760px;
  margin-inline: auto;
  padding-block: 42px 58px;
}

.game-intro {
  margin-bottom: 25px;
}

.game-intro .eyebrow {
  margin-bottom: 8px;
}

.game-intro h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 52px);
  letter-spacing: -2.5px;
}

.game-intro > p:last-child,
.game-how-to-play p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.game-intro > p:last-child {
  max-width: 620px;
  margin-bottom: 0;
}

.game-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 30px #29234a0a;
}

.game-status {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ece7ff;
  border-radius: 12px;
  background: #f4f0ff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.game-board {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid #ece7ff;
  border-radius: 20px;
  background: #f4f0ff;
}

.game-cell {
  min-width: 0;
  min-height: 70px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ece7ff;
  border-radius: 14px;
  background: white;
  color: var(--purple);
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-size: clamp(38px, 12vw, 64px);
  font-weight: 800;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.game-cell:disabled {
  cursor: default;
}

.game-cell:not(:disabled):active {
  transform: scale(0.97);
}

.game-cell:focus-visible,
.restart-button:focus-visible {
  outline: 3px solid #a391ff;
  outline-offset: 3px;
}

.restart-button {
  min-width: 160px;
  min-height: 48px;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.game-how-to-play {
  margin-top: 32px;
}

.game-how-to-play h2 {
  margin-bottom: 10px;
}

.game-how-to-play p {
  margin-bottom: 12px;
}

.game-how-to-play p:last-child {
  margin-bottom: 0;
}

@media (hover: hover) {
  .game-cell:not(:disabled):hover {
    border-color: #d4ccfa;
    background: #fbfaff;
  }
}

@media (min-width: 600px) {
  .game-page {
    padding-block: 52px 68px;
  }

  .game-panel {
    padding: 28px;
  }

  .game-board {
    gap: 12px;
    padding: 12px;
  }

  .game-cell {
    border-radius: 17px;
  }
}

@media (max-width: 520px) {
  .game-page {
    padding-block: 34px 48px;
  }

  .game-intro {
    margin-bottom: 20px;
  }

  .game-intro h1 {
    font-size: 40px;
    letter-spacing: -2px;
  }

  .game-intro > p:last-child,
  .game-how-to-play p {
    font-size: 14px;
  }

  .game-panel {
    gap: 16px;
    padding: 16px 12px;
    border-radius: 18px;
  }

  .game-board {
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
  }

  .game-cell {
    min-height: 64px;
    border-radius: 12px;
  }

  .game-how-to-play {
    margin-top: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-cell {
    transition: none;
  }

  .game-cell:not(:disabled):active {
    transform: none;
  }
}
