

.game {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  flex-flow: column nowrap;
  justify-content: center;
}

.game-container {
  display: grid;
  background: #fff;
  padding: 20px;
  margin: 200px 181px;
}

.game-title {
  font-size: 30px;
  font-weight: 800;
  margin: 50px;
}

.gamewrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  justify-items: stretch;
}

canvas {
  border: 2px solid #e8e8e8;
  border-radius: 15px;
  background: #fff;
  display: block;
  margin: auto;
  width: 100%;     
  height: auto;     
  max-width: 500px;
}

.canvas-frame {
    width: 500px;
    height: 500px;
}

button {
  margin: 15px 0;
  padding: 10px 30px;
  font-size: 20px;
  font-weight: 700;
  background: #d71921;
  border: none;
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #f0242f;
}

.stats {
  font-size: 18px;
  margin-top: 10px;
}

.gamerules {
  margin-top: 5px;
  font-size: 18px;
}

#gameOver {
  color: #ffb803;
  font-weight: 700;
  margin-top: 15px;
  font-size: 20px;
}

/* Стрелки управления */
#hintArrows {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

#hintArrows button {
  width: 30px;
  height: 30px;
  font-size: 24px;
  border: none;
  cursor: pointer;
  transition: 0.1s;
  background-color: #fff;
}

#hintArrows button:active {
  background-color: #fff;
}

.gameconditions-desc {
  font-size: 17px;
  font-weight: 400;
  line-height: 23px;
}

.gameconditions-title {
  font-size: 18px;
  font-weight: 400;
  line-height: 23px;
  margin-bottom: 10px;
}

.gameconditions-text {
  font-size: 18px;
  font-weight: 400;
  line-height: 23px;
  margin-bottom: 5px;
}

.gameconditions-mob {
  display: none;
}

.game-form {
  display:none; 
  margin-top:20px;
    font-size: 18px;
  font-weight: 600;
  margin-top: 5px;
}

.game-form input {
  border: 1px solid #e8e8e8;
    border-radius: 30px;
    padding: 7px 19px;
    margin: 10px 0;
}

.game-form button {
      background-color: #122c94;
    color: #fff;
    padding: 15px 25px;
    border-radius: 30px;
}

/* Адаптивные стили */
@media (max-width: 1024px) {
  .game-container {
        margin: 27px;
  }

  .game-title {
    margin: 50px 0 0 0;
  }
  .gamewrapper {
    justify-items: start;
  }
}

@media (max-width: 768px) {
    .gamewrapper {
        grid-template-columns: 1fr;
    }

    #hintArrows {
    display: block;
    }

      .gameconditions-desc {
    display: none;
  }

  .gameconditions-mob {
    display: block;
  }

    .item1 {
    order: 5;
  }
  .item2 {
    order: 1;
  }
  .item3 {
    order: 6;
  }

.item4 {
    order: 4;
  }

  .item5 {
    order: 2;
  }

  .item6 {
    order: 3;
  }
}

@media (max-width: 430.98px) {
    .canvas-frame {
        width: 390px;
        height: 390px;
    }

    #hintArrows {
        display: flex;
    }

    #hintArrowsWrapper {
        width: 360px;
    }
}

@media (max-width: 392.98px) {
    .canvas-frame {
        width: 350px;
        height: 350px;
    }

    #hintArrowsWrapper {
        width: 300px;
    }
}

@media (max-width: 375.98px) {
    .canvas-frame {
        width: 335px;
        height: 335px;
    }
}

@media (max-width: 360.98px) {
    .canvas-frame {
        width: 320px;
        height: 320px;
    }
}
