/* 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;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #E3F2FD;
}
.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);
}
.play-board .food {
  background: #FF003D;
}
.play-board .head {
  background: #60CBFF;
}

.controls {
  display: none;
  justify-content: space-between;
}
.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;
}

@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 {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 5px; /* 아이콘 간격 조정 */
  width: fit-content; /* 키보드 크기에 맞게 조정 */
  padding: 10px; /* 키보드 주변 여백 */
  background-color: #f0f0f0; /* 키보드 배경색 */
  border: 1px solid #ccc; /* 키보드 테두리 */
  border-radius: 5px; /* 키보드 모서리 둥글게 */
}

.controls i {
  font-size: 24px; /* 아이콘 크기 조정 */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.controls i:nth-child(1) {
  grid-column: 2;
  grid-row: 1;
}

.controls i:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.controls i:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.controls i:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.controls i:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
}
