* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto slab', sans-serif;
  background: #ECE9E6;
  background: linear-gradient(to right, #FFFFFF, #ECE9E6);
  margin: 0;
  padding: 0;
}

img {
  width: 100%;
}

.container {
  display: flex;
  justify-content: center;
  max-width: 1180px;
  margin: auto;
}

table {
  z-index: 2;
  width: 400px;
  height: 400px;
  border: 5px solid #000;
  margin-bottom: 20px;
  background-color: #000;
  transition: all 1s ease 0s;
  background: #000000fa;

}

td {
  width: 35px;
  height: 35px;
  border: 1px solid #000;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: all .3s ease 0s;
  color: #fff;


}



.wrapper-button {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 400px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;

}

.btn {
  font-family: 'Roboto slab', sans-serif;
  width: 170px;
  padding: 0 30px;
  outline: none;
  border: none;
  border-radius: 6px;
  height: 40px;
  line-height: 40px;
  font-size: 17px;
  font-weight: 600;
  color: #385898;
  background-color: #d3e5f8;
  transition: all .4s ease 0s;
}

.btn:disabled {
  background-color: #d3e5f8;
  opacity: .7;
  color: #38589886;
  transition: all .4s ease 0s;
}



.btn:not([disabled]):active {
  transform: scale(0.96);
}


.timer {
  line-height: 40px;
  font-weight: 600;
  font-size: 36px;
  padding: 30px 0 15px 0;


}

.add-time {
  opacity: 0;
  transition: all .6s ease 0s;
  font-size: 20px;
  margin-bottom: 15px;
}

.record {
  font-size: 20px;
  margin-bottom: 15px;
}


.active {
  display: block;
}

.modal {
  display: none;
  position: relative;
  z-index: 3;
}


.modal-content {
  padding: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  position: fixed;
  border-radius: 15px;
  top: 0;
  left: 0;
  z-index: 1;
  background: linear-gradient(to right, #414345, #232526);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.47);
  width: 400px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  background: #8b8a8a92;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.content {
  color: #fff;
  font-size: 25px;
}

.content-promo {
  width: 100px;
}

.time {
  display: none;
}

.cup {
  display: none;
}

.info {
  position: relative;
}

.img-info {
  width: 30px;
  height: 30px;
  align-self: flex-start;
  cursor: pointer;
}

.rules {
  position: absolute;
  bottom: 95px;
  width: 400px;
  height: 420px;
  background: #232526;
  background: linear-gradient(to right, #363738, #232526);
  border-radius: 15px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.47);
  opacity: 0;
  transition: all .1s ease 0s;
  color: #ffffff;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 10px;

}

.rules::before {
  position: absolute;
  bottom: -25px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-top: 30px solid #363738;
  content: '';
  transform: rotate(135deg);

}

.rules-title {
  margin: 0 0 10px 0;
  padding: 0;
}

.rules-subtitle {
  margin-bottom: 5px;
}


.visible {
  opacity: 1;
  transition: all .1s ease 0s;
  z-index: 2;
}

.cell-items {
  padding: 15px 0 0 0;
  margin: 0;
  align-self: flex-start;
  list-style-type: none;

}

.cell-title {
  font-weight: bold;
  display: block;
  margin-bottom: 15px;
}

.cell-item {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 8px;
}

.cell-item:last-child {
  margin-top: 0;
}

.cell-description {
  margin-left: 15px;
  font-size: 12px;
  align-items: center;
}

.list-marker {
  display: block;
  min-width: 28px;
  min-height: 28px;
}

.green {
  background-color: #66CC66;
}

.red {
  background-color: #FF6666;
}

.list-img {
  width: 28px;
  height: 28px;
}

@media (max-width: 1150px) {
  .rules {
    right: -20px;
    bottom: 110px;
  }

  .rules::before {
    bottom: -29px;
    left: 330px;
    border-top: 30px solid transparent;
    border-bottom: 30px solid #232526;
    transform: rotate(45deg);

  }
}

@media (max-width: 475px) {
  .container {
    max-width: 85%;
  }

  table {
    width: 320px;
    height: 320px;
    border: 2px solid #000;
    margin-bottom: 10px;
  }

  td {
    width: 29px;
    height: 29px;
  }

  .timer {
    text-align: center;
    font-size: 27px;
    padding: 20px 0 10px 0;
  }

  .add-time {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .record {
    font-size: 18px;
  }

  .wrapper-button {
    width: 320px;
  }

  .btn {
    font-family: 'Roboto slab', sans-serif;
    width: 120px;
    height: 35px;
    line-height: 34px;
    font-size: 15px;
  }

  .img-info {
    width: 27px;
    height: 27px;
  }

  .rules {
    width: 320px;
    height: 380px;
    bottom: 70px;
    border-radius: 10px;
  }

  .rules::before {
    left: 270px;
    bottom: -25px;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 25px solid transparent;
    border-bottom: 25px solid #232526;
  }

  .rules-title {
    margin-bottom: 7px;
    font-size: 18px;
  }

  .rules-subtitle,
  .rules-description {
    font-size: 13px;
  }

  .cell-title {
    margin-bottom: 10px;
  }

  .cell-items {
    padding: 0;
    margin-top: 10px;
  }

  .cell-item {
    margin-bottom: 7px;
  }

  .cell-description {
    font-size: 11px;
  }

  .list-img {
    width: 27px;
    height: 27px;
  }

  .list-marker {
    min-width: 27px;
    min-height: 27px;
  }

  .red {
    width: 27px;
    height: 27px;
  }

  .modal-content {
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(to right, #414345, #232526);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.47);
    width: 300px;
    height: 200px;
  }

  .cup,
  .time {
    width: 75px;
    height: 75px;
  }

  .content {
    font-size: 18px;
  }
}

@media(max-width: 360px) {
  .table {
    width: 310px;
    height: 310px;
  }

  .wrapper-button {
    width: 310px;
  }

  .timer {
    font-size: 18px;
  }

  .rules {
    width: 310px;
    height: 400px;
    bottom: 80px;
    right: -8px;
  }
}


@media (any-hover: hover) {
  td:hover {
    background-color: #cccc;
    transition: all .3s ease 0s;
  }

  .btn:not([disabled]):hover {
    background-color: #DBE7F2;
    cursor: pointer;

  }

}