body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Popup Overlay (optional if used in error.html) */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.525);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: #222;
  border-radius: 10px;
  box-shadow: 0 0 20px #fff;
  width: 95vw;
  max-width: 600px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.game-frame {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  flex-grow: 1;
  display: block;
}

.close-popup {
  margin-top: 10px;
  background: rgb(255, 0, 0);
  color: rgb(255, 255, 255);
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
}

.game-container {
  color: rgb(255, 255, 255);
  text-align: center;
  font-family: Arial, sans-serif;
  padding: 10px;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-board {
  width: 90vmin;
  height: 90vmin;
  max-width: 400px;
  max-height: 400px;
  margin: 0 auto;
  background-color: rgb(0, 0, 0);
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(20, 1fr);
  border: 4px solid rgb(243, 71, 255);
  box-shadow: 0 0 10px rgb(243, 71, 255);
}

.cell {
  width: 100%;
  height: 100%;
  display: flex;           /* Enable flex layout */
  justify-content: center; /* Horizontal center */
  align-items: center;     /* Vertical center */
  box-sizing: border-box;
  border-radius: 6px;
}

.food {
  background-color: red;
  width: 50%;
  height: 50%;
  border-radius: 50%;
}


.snake {
  background-color: limegreen;
}
.score {
  margin-top: 12px;
  font-size: 18px;
}

/* Snake Head Eyes */
.snake-head {
  position: relative;
}

.eye {
  width: 5px;
  height: 4px;
  background: rgb(0, 0, 0);
  border-radius: 50%;
  position: absolute;
  top: 5px;
}

.eye-left {
  left: 3px;
}

.eye-right {
  right: 3px;
}

/* Mobile Control Buttons */
.mobile-controls {
  margin-top: 10px;
  display: none;
}

.arrow-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
 
}

.arrow-btn {
  background: white;
  color: black;
  font-size: 20px;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold; 
  box-shadow: 0 0 10px #fff;
}
#pauseBtn {
  background-color: #ffffff;
  font-size: 20px;
   justify-content: center;
}

/* Show only on screens smaller than 768px */
@media screen and (max-width: 768px) {
  .mobile-controls {
    display: block;
  }
}
select#level {
  padding: 6px 10px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  margin: 20px auto;
  max-width: 200px;
  width: 100%;
  box-sizing: border-box;
  display: block;
}
