* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Modern Color Scheme */
  --primary: #6BAE3F;
  --primary-dark: #4A8F2A;
  --primary-light: #8BC74F;
  --accent: #FF6B6B;
  --accent-dark: #E63946;
  --text: #1a1a1a;
  --text-light: #ffffff;
  --bg-light: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.15);

  /* Legacy button colors for backwards compatibility */
  --button-top: #8BC74F;
  --button-mid: #6BAE3F;
  --button-bottom: #4A8F2A;
  --button-shadow: #2d5a1a;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --board-shadow: 0 24px 50px rgba(107, 174, 63, 0.25);
}

html,
body {
  min-height: 100%;
  height: 100%;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Madimi One", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
  animation: fadeIn 0.32s ease-out;
}

/* Page wrapper for overlay pages (startPage, gameOver, pausePage) */
.page-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.page-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
}

body::before {
  top: -5rem;
  left: -5rem;
  width: 18rem;
  height: 18rem;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(22px);
}

body::after {
  right: -6rem;
  bottom: -6rem;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(18px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-140%) skewX(-20deg);
  }

  100% {
    transform: translateX(180%) skewX(-20deg);
  }
}

@keyframes headBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

@keyframes bodyPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.16));
  }

  50% {
    transform: scale(0.95);
    filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.22));
  }
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-5px) scale(1.08);
  }
}

a {
  text-decoration: none;
}

/* ─── Footer ────────────────────────────────────────────────── */
.app-footer {
  flex-shrink: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(10, 10, 10, 0.9);
  border-top: 1px solid rgba(107, 174, 63, 0.2);
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
}

.app-footer p {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ─── Game Layout Wrapper ───────────────────────────────────── */
.game-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.control-panel {
  flex-shrink: 0;
  padding: 1rem;
  min-height: fit-content;
}

.game-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Base imgContainer ─────────────────────────────────────── */
.imgContainer {
  position: relative;
  display: flex;
  width: 90%;
  height: 90%;
  max-width: 1100px;
  max-height: 600px;
  margin: auto;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.imgContainer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 24%);
  pointer-events: none;
}

/* ─── Overlay pages (Start / Pause / GameOver) ──────────────── */
#startPage-imgContainer,
#gameOver-imgContainer,
#pausePage-imgContainer {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: clamp(2rem, 6vw, 3.5rem);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 1) 100%);
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
}
}

/* ─── Title ─────────────────────────────────────────────────── */
.Title {
  color: var(--primary-dark);
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.Title::after {
  content: "";
  display: block;
  width: clamp(130px, 22vw, 210px);
  height: 6px;
  margin: 0.8rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* ─── Buttons (base) ─────────────────────────────────────────── */
button {
  position: relative;
  min-width: 104px;
  padding: 0.85rem 1.4rem;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font: inherit;
  font-size: clamp(0.84rem, 1.7vw, 0.96rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: linear-gradient(135deg, var(--button-top) 0%, var(--button-mid) 50%, var(--button-bottom) 100%);
  box-shadow: var(--shadow-md), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.4) 34%, transparent 52%);
  opacity: 0;
  transform: translateX(-140%) skewX(-20deg);
  transition: opacity 0.2s ease;
}

button:hover {
  transform: translateY(-3px);
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  opacity: 0.95;
}

button:hover::before {
  opacity: 0.5;
  animation: shimmer 0.6s ease;
}

button:active {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

button:focus-visible {
  outline: 3px solid rgba(107, 174, 63, 0.4);
  outline-offset: 2px;
}

/* ─── Top game-page button bar ───────────────────────────────── */
.buttons {
  position: relative;
  top: auto;
  left: auto;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(107, 174, 63, 0.3);
  border-radius: var(--radius-md);
  background: rgba(20, 20, 20, 0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  transform: none;
}

.buttons a {
  display: contents;
}

/* ─── Overlay button groups ──────────────────────────────────── */
.startPage-buttons,
.gameOver-buttons,
.pausePage-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 450px);
  gap: 1.2rem;
}

.startPage-btn,
.pausePage-btn,
.gameOver-btn {
  width: min(100%, 320px);
  min-height: 52px;
  font-weight: 700;
}

.startPage-btn {
  min-height: 58px;
  font-size: clamp(0.98rem, 2.2vw, 1.2rem);
}

/* ─── Specific button IDs ────────────────────────────────────── */
#pausebtn,
#highScorebtn,
#resetbtn {
  color: white;
  background: linear-gradient(180deg, var(--button-top) 0%, var(--button-mid) 46%, var(--button-bottom) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    inset 0 -3px 0 rgba(0, 0, 0, 0.12),
    0 6px 0 var(--button-shadow),
    0 14px 22px rgba(0, 95, 196, 0.22);
}

#pausebtn:hover,
#highScorebtn:hover,
#resetbtn:hover {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    inset 0 -3px 0 rgba(0, 0, 0, 0.12),
    0 8px 0 var(--button-shadow),
    0 18px 26px rgba(0, 95, 196, 0.28);
}

#pausebtn:active,
#highScorebtn:active,
#resetbtn:active {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.72),
    0 2px 0 var(--button-shadow),
    0 8px 12px rgba(0, 95, 196, 0.18);
}

#scorebtn,
#timer {
  cursor: default;
  background: linear-gradient(180deg, var(--button-top) 0%, var(--button-mid) 46%, var(--button-bottom) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    inset 0 -3px 0 rgba(0, 0, 0, 0.1),
    0 6px 0 var(--button-shadow),
    0 12px 18px rgba(0, 76, 163, 0.18);
}

.buttons #scorebtn,
.buttons #timer {
  min-width: 150px;
}

.pausePage-buttons .pausePage-btn {
  min-height: 46px;
}

.pausePage-buttons a {
  display: block;
  width: 100%;
}

.pausePage-buttons>.pausePage-btn,
.pausePage-buttons a .pausePage-btn {
  width: 100%;
}

/* ─── Sound icon ─────────────────────────────────────────────── */
#soundImg {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  padding: 0.8rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--button-top) 0%, var(--button-mid) 100%);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  object-fit: contain;
  filter: brightness(1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#soundImg:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

#soundImg:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: var(--shadow-md);
}

/* ─── Snake / food visuals ───────────────────────────────────── */
.snake-segment {
  border-radius: 38% 38% 42% 42%;
  border: 1px solid rgba(18, 69, 9, 0.35);
  background:
    radial-gradient(circle at 35% 30%, rgba(210, 255, 177, 0.95) 0%, rgba(210, 255, 177, 0.95) 12%, transparent 13%),
    linear-gradient(145deg, #9ae75d 0%, #59b52d 48%, #2d7f18 100%);
  box-shadow:
    inset -4px -7px 0 rgba(24, 91, 11, 0.26),
    inset 3px 3px 0 rgba(238, 255, 223, 0.42),
    0 3px 6px rgba(0, 0, 0, 0.22);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  transform-origin: center;
  animation: bodyPulse 0.75s ease-in-out infinite;
}

.snake-head {
  position: absolute;
  border-radius: 42% 42% 36% 36%;
  background:
    radial-gradient(circle at 32% 28%, rgba(237, 255, 221, 0.95) 0%, rgba(237, 255, 221, 0.95) 10%, transparent 11%),
    linear-gradient(145deg, #b1f56d 0%, #72ce3b 48%, #34871e 100%);
  box-shadow:
    inset -5px -8px 0 rgba(22, 84, 10, 0.28),
    inset 4px 4px 0 rgba(249, 255, 241, 0.44),
    0 4px 8px rgba(0, 0, 0, 0.24);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.24));
  animation: headBounce 0.6s ease-in-out infinite;
}

.snake-head::before,
.snake-head::after {
  content: "";
  position: absolute;
  top: 28%;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: #102307;
  box-shadow: 0 0 0 2px rgba(240, 255, 233, 0.55);
}

.snake-head::before {
  left: 22%;
}

.snake-head::after {
  right: 22%;
}

.snake-body {
  border-radius: 34% 34% 42% 42%;
}

.snake-body:nth-child(odd) {
  background:
    radial-gradient(circle at 35% 30%, rgba(205, 255, 170, 0.9) 0%, rgba(205, 255, 170, 0.9) 10%, transparent 11%),
    linear-gradient(145deg, #8fdb53 0%, #4faa28 50%, #286f15 100%);
}

.food-orb {
  animation: orbFloat 0.85s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(152, 34, 34, 0.22));
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 768px)
   ════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {
  body {
    padding: 0;
  }

  .game-wrapper {
    width: 100%;
    height: 100%;
  }

  .control-panel {
    padding: 0.8rem;
  }

  .buttons {
    width: calc(100% - 1.6rem);
    max-width: 100%;
    padding: 0.8rem;
    gap: 0.6rem;
    margin: 0 0.8rem;
  }

  .imgContainer {
    width: 95%;
    height: 95%;
  }

  .buttons button {
    min-width: 100px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }

  .Title {
    font-size: clamp(2.4rem, 11vw, 4rem);
  }

  .startPage-btn,
  .pausePage-btn,
  .gameOver-btn {
    width: 100%;
    min-height: 50px;
  }

  #startPage-imgContainer,
  #gameOver-imgContainer,
  #pausePage-imgContainer {
    gap: 1.8rem;
  }
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE PORTRAIT  (≤ 520px)
   ════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 520px) {

  html,
  body {
    min-height: 100dvh;
    height: 100dvh;
  }

  body {
    padding: 0;
    flex-direction: column;
  }

  .page-wrapper {
    width: 100%;
    height: 100%;
  }

  .page-content {
    padding: 0.5rem;
    flex: 1;
  }

  .app-footer {
    padding: 0.6rem;
  }

  .app-footer p {
    margin: 0 0 0.3rem 0;
    font-size: 0.7rem;
  }

  .footer-links {
    gap: 1rem;
  }

  .footer-links a {
    font-size: 0.75rem;
  }

  .game-wrapper {
    width: 100%;
    height: 100%;
  }

  .control-panel {
    padding: 0.5rem;
    flex-shrink: 0;
  }

  .buttons {
    top: auto;
    left: auto;
    width: calc(100% - 1rem);
    max-width: 100%;
    margin: 0 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    align-items: center;
  }

  .game-area {
    flex: 1;
    overflow: hidden;
  }

  .imgContainer {
    width: 90%;
    height: 90%;
    min-height: 22rem;
  }

  .buttons button {
    min-width: 0;
    width: 100%;
    padding: 0.65rem 0.6rem;
    font-size: 0.75rem;
    min-height: 40px;
  }

  .buttons #scorebtn,
  .buttons #timer,
  .buttons #pausebtn,
  .buttons #resetbtn {
    min-width: 0;
  }

  .gameOver-buttons,
  .pausePage-buttons,
  .startPage-buttons {
    width: 100%;
    gap: 1rem;
  }

  .gameOver-btn,
  .pausePage-btn,
  .startPage-btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
  }

  #soundImg {
    grid-column: 1 / -1;
    justify-self: center;
    width: 40px;
    height: 40px;
    padding: 0.6rem;
  }

  #startPage-imgContainer,
  #gameOver-imgContainer,
  #pausePage-imgContainer {
    gap: 1.6rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
  }

  .Title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE LANDSCAPE  (max-height: 500px + landscape)
   Covers phones rotated sideways (≈ 667×375, 844×390, 932×430…)
   ════════════════════════════════════════════════════════════════ */
@media screen and (orientation: landscape) and (max-height: 500px) {

  /* ── Body / scroll ── */
  html,
  body {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
  }

  body {
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .game-wrapper {
    width: 100%;
    height: 100%;
    flex-direction: row;
  }

  .control-panel {
    flex: 0 0 auto;
    padding: 0.35rem 0.5rem;
    min-height: auto;
  }

  /* ── Game-page top button bar ── */
  .buttons {
    width: 100%;
    max-width: none;
    padding: 0.35rem 0.5rem;
    gap: 0.4rem;
    border-radius: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-evenly;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  /* shrink all bar buttons so they fit in one row */
  .buttons button {
    min-width: 0;
    flex: 1 1 0;
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
    min-height: 32px;
    box-shadow: var(--shadow-sm);
  }

  .buttons #scorebtn,
  .buttons #timer {
    min-width: 0;
  }

  #soundImg {
    width: 32px;
    height: 32px;
    padding: 0.35rem;
    flex: 0 0 32px;
  }

  .game-area {
    flex: 1;
    overflow: hidden;
  }

  .imgContainer {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
  }

  /* Make the canvas element itself fill its container */
  .imgContainer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }

  /* ── Overlay pages: horizontal split layout ── */
  /*    Title on the left, buttons on the right  */
  #startPage-imgContainer,
  #gameOver-imgContainer,
  #pausePage-imgContainer {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0.8rem 1.2rem;
    border-radius: 0;
    border: none;
    overflow: hidden;
  }

  /* Title: left column */
  .Title {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    text-align: center;
    flex: 0 0 auto;
    max-width: 38%;
  }

  .Title::after {
    width: 100%;
    height: 5px;
    margin-top: 0.4rem;
  }

  /* Button groups: right column, scrollable if needed */
  .startPage-buttons,
  .gameOver-buttons,
  .pausePage-buttons {
    flex: 1 1 auto;
    max-width: 52%;
    max-height: calc(100dvh - 1.6rem);
    overflow-y: auto;
    gap: 0.45rem;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Overlay page buttons — compact */
  .startPage-btn,
  .pausePage-btn,
  .gameOver-btn {
    width: 100%;
    min-height: 36px;
    padding: 0.36rem 0.7rem;
    font-size: clamp(0.72rem, 2vw, 0.84rem);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      inset 0 -2px 0 rgba(0, 0, 0, 0.1),
      0 3px 0 var(--button-shadow),
      0 6px 10px rgba(0, 95, 196, 0.18);
  }

  /* Pause page links must stretch full width */
  .pausePage-buttons a {
    display: block;
    width: 100%;
  }

  .pausePage-buttons>.pausePage-btn,
  .pausePage-buttons a .pausePage-btn {
    width: 100%;
  }
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET LANDSCAPE  (501px–700px height, landscape)
   Catches larger phones / small tablets in landscape
   ════════════════════════════════════════════════════════════════ */
@media screen and (orientation: landscape) and (min-height: 501px) and (max-height: 700px) {

  html,
  body {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .buttons {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    padding: 0.45rem 0.6rem;
    border-radius: 0;
  }

  .buttons+.imgContainer {
    margin-top: 0;
    flex: 1 1 0;
    min-height: 0;
  }

  .imgContainer {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    border-left-width: 0;
    border-right-width: 0;
    border-bottom-width: 0;
    border-top-width: 0;
  }

  .imgContainer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }

  /* Overlay pages: side-by-side */
  #startPage-imgContainer,
  #gameOver-imgContainer,
  #pausePage-imgContainer {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0.9rem 1rem 1.2rem;
    border-radius: 0;
    border-left-width: 0;
    border-right-width: 0;
    overflow: hidden;
  }

  .Title {
    font-size: clamp(2rem, 5.5vw, 3rem);
    flex: 0 0 auto;
    max-width: 40%;
    text-align: center;
    margin-bottom: 0;
  }

  .Title::after {
    margin-top: 0.45rem;
    height: 6px;
  }

  .startPage-buttons,
  .gameOver-buttons,
  .pausePage-buttons {
    flex: 1 1 auto;
    max-width: 50%;
    gap: 0.55rem;
    width: 100%;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
  }

  .gameOver-btn,
  .pausePage-btn,
  .startPage-btn {
    width: 100%;
    min-height: 42px;
  }

  .pausePage-buttons a,
  .gameOver-buttons a,
  .startPage-buttons a {
    display: block;
    width: 100%;
  }
}


/* ════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  body,
  button,
  #soundImg,
  .snake-segment,
  .snake-head,
  .food-orb {
    animation: none;
    transition: none;
  }

  button:hover,
  #soundImg:hover {
    transform: none;
  }
}