.direction-change-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 50px;
  align-items: center;
}
.img-top-container {
  height: 40px;
}

.img-container-list-item {
  max-width: 100%;
  max-height: 100%;
}

.reference-save-select {
  margin-bottom: 30px;
}

.direction-change-button {
  width: 200px;
  height: 50px;
  font-size: 20px;
}

.reload-subdirection-btn {
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  height: 50px;
  background-color: aquamarine;
}

.reference-item-img-container {
  justify-content: center;
  height: 100%;
  align-items: end;
  display: flex;
  width: 100%;
  height: 100%;
  margin-bottom: 5px;
}

.reference-item-img {
  max-width: 100%;
  max-height: 85vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  pointer-events: none;
}

.reference-container {
  margin-right: 25px;
  display: flex;
  max-width: 100%;
  padding: 30px 60px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  border-radius: 10px;
}

.reference-item-container {
  gap: 30px;
  display: flex;
  justify-content: space-evenly;
  flex-grow: 2;
  flex-wrap: wrap;
  max-width: 100%;
}
.sub-item-link {
  display: flex;
  max-height: 200px;
}

.reference-item {
  flex-direction: column;
  display: flex;
  width: 20%;
  max-width: 20%;
  flex-grow: 1;
}

.side-indent {
  max-width: 10%;
  min-width: 5%;
  height: 100%;
}

.reference-item:nth-child(4n) {
  margin-right: 0;
}

.reference-item-text {
  margin-top: auto;
  text-align: center;
}

/* Img author */
.img-author-container {
  width: 100%;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: white;
  display: flex;
  padding: 0 10px;
}

.author-link {
  margin-left: auto;
  margin-right: auto;
}

/* Переключатель - коробка вокруг ползунка */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  left: 30px;
  top: 6px;
}

/* Скрыть флажок HTML по умолчанию */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Ползунок */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #de0b0b;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #ccc;
}

input:focus + .slider {
  box-shadow: 0 0 1px #ccc;
}

input:checked + .slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}

/* Закругленные ползунки */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.black-and-white {
  filter: grayscale(100%);
}

/*speed exercise*/

.speed_exercise_item {
  border: 1px solid transparent;
  transition: all 0.1s, border 0.2s;
  border-radius: 20px;
  margin-bottom: 10px;
  justify-content: center;
  align-items: center;
  display: flex;
  text-align: center;
  padding: 20px 30px;
  height: 60px;
  max-height: 60px;
  flex: 1;
  -webkit-box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  -moz-box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  width: 100%;
  text-align: center;
  background-color: white;
  font-size: 20px;
  font-weight: 500;
}

.speed-exercise-container {
  flex-direction: row;
  flex-basis: 100%;
  display: flex;
}

.speed_exercise_list {
  margin-right: 25px;
  flex-direction: column;
  display: flex;
  margin-bottom: 50px;
  flex-shrink: 10;
  flex-grow: 1;
}

.speed_exercise_item:hover {
  color: #de0b0b;
}

.speed-exercise-item-choose {
  color: white;
  background-color: #4a0a0a;
}

.speed-exercise-item-choose:hover {
  color: white;
}

.speed_exercise_desc {
  width: 100%;
  text-align: center;

  font-size: 20px;
  font-weight: 500;
}

.speed_exercise_timer {
  top: 40px;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  margin-right: 25px;
  align-self: flex-start;
  position: sticky;
  width: 423px;
  min-width: 350px;
  padding-bottom: 40px;
  flex: 2;

  max-height: 100%;
  border-radius: 20px;
  -webkit-box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  -moz-box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  justify-content: center;
  align-items: center;
}

.dropdown-speed_exercise_timer {
  display: none;
  margin-bottom: 40px;
  flex-direction: column;

  align-self: flex-start;
  width: 100%;

  padding: 40px;
  flex: 2;

  max-height: 100%;
  border-radius: 20px;
  -webkit-box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  -moz-box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  box-shadow: 0px 8px 24px 0px rgba(56, 12, 12, 0.15);
  justify-content: center;
  align-items: center;
}

.speed-time-container {
  width: 100%;
  height: 60px;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.speed-timer-time {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.speed-time {
  font-size: 40px;
  border-radius: 5px;
  text-align: center;
  width: 80px;
  -webkit-box-shadow: 0px 2px 6px 0px rgba(56, 12, 12, 0.15);
  -moz-box-shadow: 0px 2px 6px 0px rgba(56, 12, 12, 0.15);
  box-shadow: 0px 2px 6px 0px rgba(56, 12, 12, 0.15);
  border: 1px solid rgba(56, 12, 12, 0.2);
  outline: none;
}

.speed-time-separator {
  margin: 0 20px;
  font-size: 40px;
}

.speed_exercise_timer_active {
  letter-spacing: 1px;
  text-align: center;
  font-size: 20px;
  border: none;
  transition: all 0.2s;
  border-radius: 20px;
  background-color: #7eeba8;
  width: 195px;
  height: 54px;
  -webkit-box-shadow: 0px 4px 12px 0px rgba(56, 12, 12, 0.15);
  -moz-box-shadow: 0px 4px 12px 0px rgba(56, 12, 12, 0.15);
  box-shadow: 0px 4px 12px 0px rgba(56, 12, 12, 0.15);
}

.speed_exercise_clock {
  margin-bottom: 10px;
  margin-top: 30px;
  margin-left: auto;
  margin-right: auto;
  width: 218px;
  height: 218px;
}

.speed_exercise_time {
  width: 147px;
  height: 38px;
}

.speed-active-error {
  background-color: #4a0a0a;
}

.speed-exercise-active-error {
  border-color: #4a0a0a;
}

.active-speed-img {
  z-index: 11;
}

.speed-clock-img {
  height: 100%;
  width: 100%;
}
.hidden-img {
  display: none;
}

/* удалить
page-select
slect-page-btn */

/* PAGE */
.page-select-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.page-select-container button {
  background-color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  border: none;
}

.page-select-container button.active-page {
  background-color: #de0b0b;
  color: white;
}

.page-select-container button:hover:not(.active-page) {
  background-color: #ddd;
}

@media (max-width: 1200px) {
  .speed_exercise_timer {
    margin-right: 0px;
  }
  .speed_exercise_list {
    margin-right: 0px;
    padding: 0 15px;
  }
}

@media (max-width: 900px) {
  .speed_exercise_timer {
    max-width: 300px;
    min-width: 300px;
    max-height: 385px;
  }

  .speed-time {
    font-size: 30px;
    width: 60px;
  }
}

@media (max-width: 800px) {
  .speed_exercise_item {
    font-size: 15px;
  }

  .speed-time {
    font-size: 20px;
    width: 50px;
    height: 50px;
  }

  .speed-time-container {
    margin-bottom: 20px;
  }
}

@media (max-width: 700px) {
  .main-container {
    padding: 0 50px;
  }

  .dropdown-speed_exercise_timer {
    display: flex;
  }

  .speed_exercise_timer {
    display: none;
  }
  .speed_exercise_item {
    margin-bottom: 20px;
  }

  .speed_exercise_list {
    margin-bottom: 0px;
    padding: 0 15%;
  }

  .main-container {
    padding: 0 40px;
  }

  .speed-exercise-container {
    flex-direction: column;
  }

  .speed-exercise-container:last-child {
    margin-bottom: 40px;
  }

  .message-container {
    margin-right: 0px;
  }
}

@media (max-width: 600px) {
}

@media (max-width: 500px) {
  .main-container {
    padding: 0 20px;
  }

  .speed_exercise_list {
    padding: 0 10%;
  }
}

@media (max-width: 400px) {
  .speed_exercise_list {
    padding: 0 5%;
  }
}

@media (max-width: 1000px) {
  .reference-container {
    margin-right: 0px;
  }

  .reference-container-pading {
    padding: 0 20px;
    width: 100%;
  }
}

@media (max-height: 600px) {
  .draw-timer-text {
    font-size: 30px;
  }
  .img-author-container {
    margin-bottom: 20px;
  }
}

@media (max-height: 500px) {
  .img-author-container {
    margin-bottom: 10px;
  }
}

@media (max-width: 600px) {
  .reference-container {
    padding: 30px 30px;
  }

  .main-container {
    padding: 0 40px;
  }

  .message-container {
    margin-right: 0px;
  }

  .reference-item-text {
    margin-top: 7px;
    margin-bottom: 0px;
  }

  .reference-item-container {
    gap: 15px 30px;
  }
}

@media (max-width: 500px) {
  .reference-item-container {
    gap: 15px 20px;
  }

  .main-container {
    padding: 0 20px;
  }
}

@media (max-width: 400px) {
  .reference-item {
    width: 40%;
    max-width: 40%;
  }
}

@media (max-width: 320px) {
  .reference-item-container {
    gap: 20px 20px;
  }

  .main-container {
    padding: 0 20px;
  }

  .reference-item-text {
    font-size: 15px;
  }
}

@media (max-height: 400px) {
  .reference-item-img {
    max-height: 80vh;
  }

  .img-author-container {
    font-size: 11px;
  }
}
