@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
/* Убрать скрол */
:root::-webkit-scrollbar{
  display: none;
}
:root {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/* ------------ */
input.no-select:focus {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input.no-select::selection {
  background: transparent;
}
input.no-select::-moz-selection {
  background: transparent;
}
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: -moz-none;
  -o-user-select: none;
  user-select: none;
}
.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
      -webkit-user-select: none; /* Safari */
       -khtml-user-select: none; /* Konqueror HTML */
         -moz-user-select: none; /* Old versions of Firefox */
          -ms-user-select: none; /* Internet Explorer/Edge */
              user-select: none; /* Non-prefixed version, currently
                                    supported by Chrome, Edge, Opera and Firefox */
}
::selection { background: transparent; }
::-moz-selection { background: transparent; }

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  text-align: center;
}

.hamster {
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

h1 {
  font-size: 1.5rem;
}

.hamster img {
  width: 50wh;
  height: 50vh;
  border-radius: 10px;
  pointer-events: none;
}

.hamster:active {
  transform: scale(0.95);
}

.counter {
  margin-top: 20px;
  font-size: 24px;
  font-weight: bold;
}

@keyframes coin-pop {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100px) scale(0.5); opacity: 0.1; }
}

.coin-animation {
  position: absolute;
  width: 150px;
  height: 150px;
  background-image: url('coin.png');
  background-size: cover;
  animation: coin-pop 0.9s ease-out;
  user-select: none;
  z-index: 17;
}

#shop-toggle, #back-button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#sound-toggle {
  margin-top: 1px;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#sound-toggle:hover, #shop-toggle:hover, #back-button:hover {
  background-color: rgb(0, 86, 179);
  box-shadow: 2px 5px 7px rgba(0, 86, 179, 0.445);
}

.shop-container { 
  display: none;
  text-align: center;
  overflow: hidden;
}

/* Стили для карусели */
.carousel-item:hover {
  transform: scale(1.05);
}

.carousel-item img {
  /* width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: cover; */
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  pointer-events: none;
}

.carousel-item p {
  margin: 5px 0;
  font-size: 14px;
  font-weight: 600;
}

.carousel-button {
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  border-radius: 40%;
  transition: background-color 0.3s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
}

.carousel-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
  left: 0;
}

.carousel-button.next {
  right: 0;
}

/* Стили для карусели */
.carousel {
  display: flex;
  align-items: center;
  position: relative;
  width: 100vh;
  height: auto;
  /* max-width: 100%; */
  margin: 20px auto;
  padding: 0 30px; /* Отступы для кнопок */
}

.carousel-items {
  display: flex;
  overflow-x: auto; /* Горизонтальная прокрутка */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
  width: 100%;
  gap: 15px;
  padding: 10px 0;
}

/* Скрыть scrollbar */
.carousel-items::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 80%; /* Ширина карточки 80% экрана на мобильных */
  scroll-snap-align: start;
  min-width: auto;
  max-width: 200px;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.carousel-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 10px;
}

/* Кнопки для десктопов */
@media (hover: hover) {
  .carousel-button {
      display: block;
  }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .carousel {
      padding: 0 15px;
      /* width: 100%; */
  }

  .popup-content p {
    padding: 15px;
    font-size: 16px;
  }

  h1 {
    font-size: 1.4rem;
    padding: 0 10px;
  }

  #sound-toggle {
    font-size: 1rem;
  }

  .hamster img {
    width: 40wh;
    height: 40vh;
  }
  
  .carousel-item {
      flex: 0 0 85%;
      min-width: auto;
  }

  .carousel-button {
      display: none; /* Скрыть кнопки на мобильных */
  }
}

/* Стили для popup-окна */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 16;
}

.popup-content {
  background-color: white;
  padding: 20px;
  margin: 0 10px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.445);
}

.popup-content p {
  margin: 0 0 20px;
  padding: 18px;
  font-size: 20px;
  font-weight: 700;
}

.popup-content button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.popup-content button:hover {
  background-color: #0056b3;
}

/* Стили для фона с дождем из биткоинов */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.coin-rain {
  position: absolute;
  top: -50px;
  width: 30px;
  height: 30px;
  background-image: url('coin.png');
  background-size: cover;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
      transform: translateY(100vh);
  }
}

/* Стили для лидерборда */
.leaderboard-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.911);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 17;
  max-width: 250px;
  width: 100%;
  text-align: center;
}

.leaderboard-list {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px solid #ddd;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

#leaderboard-close {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  background-color: #007bffd3;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#leaderboard-close:hover {
  background-color: #0056b3;
}

#leaderboard-toggle {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  background-color: #28a745;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#leaderboard-toggle:hover {
  background-color: #218838;
  box-shadow: 2px 5px 7px rgba(0, 179, 15, 0.445);
}

.global-badge {
  background: #fc3f1d;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  margin-left: 10px;
}

.global-entry {
  background-color: #fff9e6;
}

/* Стили для popup-окна с задачей */
.task-popup {
  display: none;
  font-size: 1.5rem;
  position: fixed;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  z-index: 14;
  text-align: center;
}

.task-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

#task-answer {
  font-size: 1rem;
  font-weight: 500;
  color: #212529;
  font-family: inherit;
  padding: 0.475rem 0.75rem;
  margin-bottom: 15px;
  line-height: 2;
  background-clip: padding-box;
  border: 1px solid #bdbdbd;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#task-submit {
  font-size: 1rem;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 15;
}