@import url("https://fonts.googleapis.com/css?family=Press+Start+2P");

body {
  margin: 0;
  padding: 0;
  color: white;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
}

button {
  width: 50px; /* Ширина кнопки */
  height: 50px; /* Высота кнопки */
  font-size: 1.5rem; /* Размер текста (стрелок) */
  color: white; /* Цвет текста */
  background: linear-gradient(135deg, #0984e3, #74b9ff); /* Градиентный фон */
  border: none; /* Убираем рамку */
  border-radius: 8px; /* Скруглённые углы */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Лёгкая тень */
  cursor: pointer; /* Курсор-указатель */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#buttons button:hover {
  transform: scale(1.1); /* Лёгкое увеличение при наведении */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Усиленная тень */
}

#buttons button:active {
  transform: scale(1); /* Уменьшение эффекта при нажатии */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Слабая тень */
}


a,
a:visited {
  color: inherit;
}

#score {
  position: absolute;
  font-family: "Press Start 2P", cursive;
  font-size: 0.9em;
  color: white;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  max-width: 100px;
  text-align: center;
  line-height: 1.6em;
}

#highScore {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 10px; /* Или любое другое значение для внутреннего отступа */
  background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон для видимости */
  color: white; /* Цвет текста */
  font-size: 16px; /* Размер текста */
  z-index: 100; /* Чтобы блок был поверх других элементов */
  display: none;
}

#controls {
  position: absolute;
  bottom: 50px;
  left: 50px;
  display: none;
}

#controls #buttons {
  width: 80px;
  opacity: 0;
  transition: opacity 2s;
}

#controls #instructions {
  margin-left: 20px;
  max-width: 300px;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px;
  opacity: 0;
  transition: opacity 2s;
}

#controls button {
  width: 100%;
  height: 40px;
  background-color: white;
  border: 1px solid black;
  margin-bottom: 10px;
}

#results {
  position: fixed;
  inset: 0; /* Занимает весь экран */
  background: rgba(0, 0, 0, 0.8); /* Полупрозрачный тёмный фон */
  display: flex;
  justify-content: center; /* Центрирование по горизонтали */
  align-items: center; /* Центрирование по вертикали */
  z-index: 1000; /* Выше всех элементов */
}

/* Стили для контента */
#results .content {
  background: #2c3e50; /* Тёмный фон контента */
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#result-youtube {
  display: flex;
  background-color: white;
  padding: 20px;
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#result-youtube span {
  margin-top: 5px;
  margin-left: 20px;
}

.youtube,
#youtube-card {
  display: none;
  color: black;
}

#youtube-main {
  opacity: 0;
  transition: opacity 2s;
}

@media (min-height: 425px) {
  #score {
    font-size: 1.5em;
    max-width: 150px;
  }

  #controls {
    display: flex;
  }

  /** Youtube logo by https://codepen.io/alvaromontoro */
  .youtube {
    z-index: 50;
    width: 100px;
    min-width: 100px;
    height: 70px;
    position: fixed;
    bottom: 50px;
    right: 50px;
    transform: scale(0.8);
    transition: transform 0.5s;
    display: block;
    background: red;
    border-radius: 50% / 11%;
  }

  #results .youtube {
    position: relative;
    right: 0;
    bottom: 0;
  }

  .youtube:hover,
  .youtube:focus {
    transform: scale(0.9);
    color: black;
  }

  .youtube::before {
    content: "";
    display: block;
    position: absolute;
    top: 7.5%;
    left: -6%;
    width: 112%;
    height: 85%;
    background: red;
    border-radius: 9% / 50%;
  }

  .youtube::after {
    content: "";
    display: block;
    position: absolute;
    top: 20px;
    left: 40px;
    width: 45px;
    height: 30px;
    border: 15px solid transparent;
    box-sizing: border-box;
    border-left: 30px solid white;
  }

  .youtube span {
    font-size: 0;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }

  .youtube:hover + #youtube-card {
    z-index: 49;
    display: block;
    position: fixed;
    bottom: 42px;
    width: 300px;
    background-color: white;
    right: 40px;
    padding: 25px 130px 25px 25px;
  }
}







/* Стили кнопки */
#reset-button {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #2bec04, #03f38f); /* Золотой градиент */
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  display: inline-flex; /* Для центрирования текста внутри кнопки */
  justify-content: center;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

#reset-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#reset-button:active {
  transform: scale(1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}