@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:ital,wght@0,400..700;1,400..700&display=swap');

/* 🌈 CSS Variables for Theming */
:root {
  --snake-head-color: #2ecc71;
  --snake-body-color: #27ae60;
  --food-gradient: linear-gradient(orange, yellow);
  --board-gradient: linear-gradient(to bottom right, #1e3c72, #2a5298);
  --grid-border: 5px solid #111;
  --score-font: 'Libre Bodoni', serif;
  --cell-size: 20px;
  --eye-color: black;
  --glow-color: rgba(255, 255, 255, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--score-font);
  background-color: #000;
}

.background {
  background: url("bg.avif") no-repeat center center/cover;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board {
  background: var(--board-gradient);
  border: var(--grid-border);
  height: 75vh;
  width: 55vw;
  margin-right: 0px;
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(18, 1fr);
  box-shadow: 0 0 20px var(--glow-color);
  border-radius: 8px;
}

/* 🧮 Score Styling */
.scorebox {
  position: absolute;
  top: 15px;
  right: 150px;
  font-size: 40px;
  color: #000;
  font-weight: bold;
  text-shadow: 2px 2px 4px #fff;
}

/* 🐍 Snake Head */
.head {
  width: var(--cell-size);
  height: var(--cell-size);
  background-color: var(--snake-head-color);
  border-radius: 40% 40% 0 0;
  position: relative;
  transform: rotate(0deg);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.head::before,
.head::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--eye-color);
  border-radius: 50%;
  position: absolute;
  top: 4px;
}

.head::before {
  left: 4px;
}

.head::after {
  right: 4px;
}

/* 🟩 Snake Body */
.snakebody {
  width: var(--cell-size);
  height: var(--cell-size);
  background-color: var(--snake-body-color);
  border-radius: 25%;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* 🍎 Food */
.food {
  background: var(--food-gradient);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 8px 3px orange;
}
