* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /*background color var*/
  --bg-primary-color: rgb(0, 0, 0);
  /*text color var*/
  --text-primary-color: rgb(255, 255, 255);
  /*border color var*/
  --border-primary-color: #6c6c6c;
  --bg-fill-color: rgb(228, 244, 209);
  /*space var*/
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 40px;
  --space-3xl: 48px;
  /*border radius var*/
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-2xl: 20px;
  --border-radius-3xl: 24px;

  --bg-food-color:rgb(227, 34, 34);

}
html,
body {
  height: 100%;
  width: 100%;
}
html {
  background-color: var(--bg-primary-color);
  color: var(--text-primary-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

main,
section {
  width: 100%;
  height: 100%;
}

.btn{
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  
}

.btn:hover{
  transform: scale(1.1);
}
section {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: var(--space-lg);
}
section .infos {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.info {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-primary-color);
  border-radius: var(--border-radius-sm);
}

.board {
  border: 1px solid var(--border-primary-color);
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  grid-auto-rows: minmax(50px, 1fr);
}

.block {
  position: relative;
  border-radius: 50%;
}

.fill {
  background: linear-gradient(135deg, #7cffcb, #2dc653);
  border-radius: 60%;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.4);
}

.food {
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #c1121f);
  border-radius: 50%;
  box-shadow: 0 0 6px #ff4d4d, 0 0 12px #ff1a1a;
  animation: pulse 2s infinite alternate;
  transform: scale(0.6);
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    box-shadow: 0 0 6px #ff4d4d;
  }
  50% {
    transform: scale(0.7);
    box-shadow: 0 0 14px #ff1a1a, 0 0 28px #ff0000;
  }
  100% {
    transform: scale(0.5);
    box-shadow: 0 0 6px #ff4d4d;
  }
}

.head {
  background: linear-gradient(135deg, #00ffd5, #2dc653);
  border-radius: 50%;
  transform: scale(0.90);  
  box-shadow: 0 0 10px #2dc653;
}

/* Eyes */
.head::before,
.head::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  top: 12px;
}

.head::before {
  left: 10px;
}

.head::after {
  right: 10px;
}

.head::before,
.head::after {
  box-shadow: inset 2px 2px 0 #000;
}

.modal{
  height: 100vh;
  width: 100vw; 
  position: fixed;
  top:0;
  background-color: rgba(46, 46, 46, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;  
  align-items: center;
  
}

.modal .start-game, .modal .game-over{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.btn-start, .btn-restart{
  background-color: whitesmoke;
}

.modal .game-over{
  display: none;
}

