/* Import Google font */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
}
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #E3F2FD;
  overflow: hidden;
}
.wrapper {
  width: 65vmin;
  height: 70vmin;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  border-radius: 5px;
  background: #293447;
  box-shadow: 0 20px 40px rgba(52, 87, 220, 0.2);
}
.game-details {
  color: #B8C6DC;
  font-weight: 500;
  font-size: 1.2rem;
  padding: 20px 27px;
  display: flex;
  justify-content: space-between;
}
.play-board {
  height: 100%;
  width: 100%;
  display: grid;
  background: #212837;
  grid-template: repeat(30, 1fr) / repeat(30, 1fr);
  background: #212837;
  grid-template: repeat(30, 1fr) / repeat(30, 1fr);
  gap: 1px;
}
.play-board .food {
  background: #FF003D;
  border-radius: 3px;
  transition: transform 0.1s ease;
}
.play-board .head {
  background: #60CBFF;
  border-radius: 3px;
  transition: transform 0.1s ease;
  background: #00CFFF; 
}

.controls {
  display: none;
  justify-content: space-between;
  background: #1e2533;
  border-top: 1px solid #171B26;
}
.controls i {
  padding: 25px 0;
  text-align: center;
  font-size: 1.3rem;
  color: #B8C6DC;
  width: calc(100% / 4);
  cursor: pointer;
  border-right: 1px solid #171B26;
}

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.overlay .message {
  text-align: center;
  background: #293447;
  padding: 20px 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.overlay .message button {
  margin-top: 15px;
  padding: 8px 20px;
  font-size: 16px;
  background-color: #60CBFF;
  border: none;
  color: #000;
  border-radius: 5px;
  cursor: pointer;
}

#pauseBtn {
  background-color: #445675;
  border: none;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  color: #212837;
  transition: background-color 0.3s;
}

#pauseBtn:hover {
  background-color: #0765f1;
}


@media screen and (max-width: 500px) {
  .controls {
    display: none !important;
  }
}

@media screen and (max-width: 800px) {
  .wrapper {
    width: 90vmin;
    height: 115vmin;
  }
  .game-details {
    font-size: 1rem;
    padding: 15px 27px;
  }
  .controls {
    display: flex;
  }
  .controls i {
    padding: 15px 0;
    font-size: 1rem;
  }
  .controls {
    background: #1e2533;
    border-top: 1px solid #171B26;
  }
  

}

.wrapper {
  margin-bottom: 40px;
}

footer {
  text-align: center;
  padding: 12px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  font-size: 14px;
  border-top: 1px solid #ccc;
}

footer a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  margin-left: 5px;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #0073e6;
}
