/* Сброс стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
 .rainbow-bg {
 background: linear-gradient(45deg, rgb(66, 4, 4), rgb(58, 39, 3), rgb(44, 44, 3), rgb(4, 46, 4), rgb(3, 3, 43), rgb(29, 4, 48), rgb(63, 8, 63));
}
.gold-bg {
 background: #464023; /* золотой цвет */
}
.highlight {
 border: 2px solid #bd0a0a; /* например, зеленая рамка для выделения текущего игрока */
}
/* Основные стили для body */
body {
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: radial-gradient(
                circle at 10% 90%,  /* центр слева снизу */
                #808080 0%,        /* серый */
                #1a1a1a 60%,       /* темный */
                #000000 100%       /* черный */
            ), 
            radial-gradient(
                circle at 90% 10%,  /* центр справа сверху */
                #808080 0%,        /* серый */
                #1a1a1a 60%,       /* темный */
                #000000 100%       /* черный */
            );
  background-blend-mode: overlay;
  font-family: Arial, sans-serif;
  transition: background 0.5s ease-in-out, background-image 0.5s ease-in-out;
  position: relative;
}

/* Gray-gradient как базовый фон */
body.gray-gradient {
    background: radial-gradient(
                circle at 10% 90%,  /* центр слева снизу */
                #808080 0%,        /* серый */
                #1a1a1a 60%,       /* темный */
                #000000 100%       /* черный */
            ), 
            radial-gradient(
                circle at 90% 10%,  /* центр справа сверху */
                #808080 0%,        /* серый */
                #1a1a1a 60%,       /* темный */
                #000000 100%       /* черный */
            );
  background-blend-mode: overlay;
  transition: background 0.5s ease-in-out, background-image 0.5s ease-in-out;
}

/* Pink-gradient для радужного эффекта */
body.pink-gradient {
    background: radial-gradient(
                circle at 10% 90%,  /* центр слева снизу */
                #808080 0%,        /* серый */
                #1a1a1a 60%,       /* темный */
                #000000 100%       /* черный */
            ), 
            radial-gradient(
                circle at 90% 10%,  /* центр справа сверху */
                #808080 0%,        /* серый */
                #1a1a1a 60%,       /* темный */
                #000000 100%       /* черный */
            );
  background-blend-mode: overlay;
  transition: background 0.5s ease-in-out, background-image 0.5s ease-in-out;
}
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-cube {
    width: 100px; /* или другой размер по вашему желанию */
    height: 100px;
    margin-bottom: 20px;
}

#loading-text {
    color: white;
    font-size: 24px;
    font-family: Arial, sans-serif;
}
/* --- Фон и анимации модального окна --- */
#quests-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 14, 14, 0.5);
  backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0s 0.4s;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

#quests-menu-content {
  position: relative;
  background: #0c0c0c;
  width: 100%;
  height: 65%;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* --- Состояния модального окна --- */
#quests-menu.show {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0s 0s;
}
#quests-menu.show #quests-menu-content {
  transform: translateY(0);
  opacity: 1;
}
#quests-menu.hide {
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0s 0.4s;
}
#quests-menu.hide #quests-menu-content {
  transform: translateY(100%);
  opacity: 0;
}
#quests-menu.hidden {
  visibility: hidden;
}

/* --- Заголовок и кнопки --- */
.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  padding: 0 10px;
  width: 100%;
}

.header-left {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.button-group-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.button-group {
  display: flex;
  gap: 10px;
}

.button-group button {
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  min-width: 120px;
  text-align: center;
}

.button-group button.active {
  background: #444;
}

/* --- Список квестов --- */
.quests-list {
  width: 100%;
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 10px;
  padding: 0 10px;
}
/* Стили для квестов */
#quests-list .quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: #555252;
  border-radius: 10px;
  margin: 10px 5px;
  width: calc(100% - 10px);
}

/* Элемент ачивки (удаляем дубликат и исправляем ширину) */
#achievements-list .achievement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: #222; /* Оставляем один фон */
  border-radius: 10px;
  margin: 10px 5px; /* Без !important, так как нет конфликтов */
  width: calc(100% - 10px); /* Убираем !important, так как достаточно calc */
  box-sizing: border-box; /* Учитываем padding в ширине */
}

/* Делаем иконки круглыми */
.quest-icon,
.achievement-icon {
  width: 50px;
  height: 50px;
  margin-right: 10px;
  border-radius: 50%;
}

.quest-info, .achievement-info {
  flex-grow: 1;
  color: white;
}
.quest-title, .achievement-title {
  font-weight: bold;
}
/* --- Обновленный стиль наград --- */
.quest-reward, .achievement-reward {
  color: #777; /* Темно-серый цвет */
  font-size: 14px;
  display: block;
  margin-top: 5px;
}
/* Затемняем невыполненные ачивки */
.achievement-item.incomplete {
  position: relative;
  filter: brightness(0.5); /* Затемнение */
  pointer-events: none; /* Отключаем взаимодействие */
}

/* Оставляем картинку яркой */
.achievement-item.incomplete .achievement-icon {
  filter: brightness(1);
}

/* --- Кнопка "Go" стабильного размера --- */
.quest-btn {
  background: #333534;
  border: none;
  width: 50px;
  font-size: 14px;
  color: white;
  cursor: pointer;
  border-radius: 5px;
  min-width: 60px;
  text-align: center;
}
.quest-btn.completed {
  background: #680606 !important; /* Зеленый цвет */
  cursor: default !important; /* Запрещаем клик */
  pointer-events: none;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    background: transparent; /* Прозрачный фон контейнера */
}

.progress-circle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #ff0000 var(--progress, 0%),  /* Красный прогресс */
        #000000 var(--progress, 0%)   /* Черный фон кольца */
    );
    transform: rotate(-90deg); /* Начало сверху */
    -webkit-mask: radial-gradient(circle at center, transparent 50%, black 60%); /* Уменьшаем прозрачную область */
    mask: radial-gradient(circle at center, transparent 50%, black 60%); /* Уменьшаем прозрачную область */
}

.progress-circle span {
    display: none;
}
/* --- Новый стиль списка ачивок --- */
.achievement-info {
  display: flex;
  flex-direction: column; /* Название сверху, награда снизу */
}
.achievement-title {
  font-weight: bold;
  margin-bottom: 4px;
}

/* Звёзды и анимации */
.stars,
.flying-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.star {
  position: absolute;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  opacity: 0.2;
  animation: twinkle 5s infinite alternate;
}

@keyframes twinkle {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.4;
  }
}

.flying-star {
  position: absolute;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  opacity: 0.8;
  animation: flyUp 5s linear infinite;
}

@keyframes flyUp {
  0% {
    transform: translateY(100vh);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh);
    opacity: 0;
  }
}



@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.1);
    opacity: 0.8;
  }
}


.progress {
  margin-top: 10px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.2);
  width: 80%;
  max-width: 300px;
  height: 8px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  height: 100%;
  width: 0%;
  background: #00c6ff;
  border-radius: 4px;
  transition: width 0.1s ease-in-out;
}

/* Стили для canvas */
#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Счетчики и текст */
#coins {
  font-size: 3rem;
  font-weight: bold;
  position: absolute;
  top: 10%;
  right: 10%;
  color: rgb(162, 175, 175);
}

#bestLuck {
  font-weight: bold;
  position: absolute;
  top: calc(10% + 4.063rem);
  font-size: 1.25rem;
  color: rgb(162, 175, 175);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Изображение куба */
#cube {
  width: 22rem;
  height: 22rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  outline: none;
}


/* Прогресс-бар внизу экрана */
#progressBar {
  position: absolute;
  bottom: 25%;
  width: 80%;
  height: 0.625rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.313rem;
  overflow: hidden;
}

#progressBar div {
  height: 100%;
  width: 0;
  background: #F80000;
}

/* Меню */
.menu {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(139, 138, 138, 0.9), rgba(100, 100, 100, 0.9));
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  flex-basis: 0;
}


.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 20px;
  color: #555;
}

.menu-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}

.menu-item:hover {
  color: #000;
}

/* Класс для скрытия элементов */
.hidden {
  display: none;
}

/* Модальное окно профиля */
#profile-menu {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: rgba(0, 0, 0, 0.5);
 backdrop-filter: blur(10px);
 visibility: hidden;
 opacity: 0;
 display: flex;
 align-items: flex-end; /* Исправлено: теперь меню внизу */
 transition: opacity 0.4s ease, visibility 0s 0.4s;
}


/* Контент модального окна */
#profile-menu-content {
 position: relative;
 background: linear-gradient(217deg, rgb(22, 22, 22) 0%, rgba(0, 0, 0, 0.89) 70.71%),
              linear-gradient(127deg, rgb(20, 84, 99) 0%, rgba(0, 0, 0, 0) 70.71%),
              linear-gradient(336deg, rgb(45, 45, 158) 0%, rgba(0, 0, 0, 0) 70.71%);
 width: 100%;
 height: 35%;
 border-top-left-radius: 15px;
 border-top-right-radius: 15px;
 padding: 20px;
 box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 text-align: center;
 font-size: 24px;
 font-weight: bold;
 color: rgb(122, 114, 114);
 transform: translateY(100%); /* Начальная позиция снизу */
 opacity: 0; /* Скрытый контент */
 transition: transform 0.4s ease, opacity 0.4s ease; /* Плавная анимация */
}

/* Когда меню открыто */
#profile-menu.show {
 visibility: visible; /* Меню становится видимым */
 opacity: 1; /* Меню становится непрозрачным */
 transition: opacity 0.4s ease, visibility 0s 0s; /* Плавное изменение прозрачности */
}

/* Когда контент меню открывается */
#profile-menu.show #profile-menu-content {
 transform: translateY(0); /* Контент появляется сверху */
 opacity: 1; /* Контент становится видимым */
}

/* Когда меню закрывается */
#profile-menu.hide {
 opacity: 0; /* Меню становится прозрачным */
}

#profile-menu.hide #profile-menu-content {
 transform: translateY(100%); /* Контент уходит вниз */
 opacity: 0; /* Контент исчезает */
}

/* Полностью скрываем после анимации */
#profile-menu.hidden {
 visibility: hidden; /* Меню скрыто */
 transition: visibility 0s 0.4s; /* Задержка скрытия после анимации */
}



#profile-name {
  margin-top: auto;
  padding-bottom: 20px;
}

/* Фон модального окна */
#skins-menu {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: rgba(0, 0, 0, 0.5);
 backdrop-filter: blur(10px);
 display: flex;
 justify-content: center;
 align-items: flex-end;
 visibility: hidden; /* Скрываем, но элемент остаётся на месте */
 opacity: 0;
 transition: visibility 0s 0.4s, opacity 0.4s ease;
}

/* Контент модального окна */
#skins-menu-content {
 position: relative;
 background: linear-gradient(217deg, rgb(22, 22, 22) 0%, rgba(0, 0, 0, 0.89) 70.71%),
              linear-gradient(127deg, rgb(20, 84, 99) 0%, rgba(0, 0, 0, 0) 70.71%),
              linear-gradient(336deg, rgb(45, 45, 158) 0%, rgba(0, 0, 0, 0) 70.71%);
 width: 100%;
 height: 60%;
 border-top-left-radius: 15px;
 border-top-right-radius: 15px;
 padding: 20px;
 box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
 overflow-y: auto;
 transform: translateY(100%);
 opacity: 0;
 transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Открытие */
#skins-menu.show {
 visibility: visible;
 opacity: 1;
 transition: opacity 0.4s ease;
}

#skins-menu.show #skins-menu-content {
 transform: translateY(0);
 opacity: 1;
}

/* Закрытие */
#skins-menu.hide {
 opacity: 0;
}

#skins-menu.hide #skins-menu-content {
 transform: translateY(100%);
 opacity: 0;
}

/* Полное скрытие после анимации */
#skins-menu.hidden {
 visibility: hidden;
 transition: visibility 0s 0.4s;
}




.skin-row {
  margin-bottom: 20px;
  color: rgb(219, 214, 214);
}

.skin-row h3 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 10px;
}

.skins {
  display: flex;
  justify-content: flex-start;
  overflow-x: scroll;
  margin-bottom: 10px;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  outline: none;
}

.skins img {
  width: 123px;
  height: 123px;
  border-radius: 10px;
  transition: transform 0.3s;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  outline: none;
}

.skins img:hover {
  transform: scale(1.1);
}

/* Стили для кнопок */
button {
  width: 100%;
  padding: 10px;
  font-size: 18px;
  background-color: #462424;
  color: #cecece;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  outline: none;
}

button:hover {
  background-color: #212122;
}

/* --- Фон и анимации модального окна --- */
#leaderboard-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0s 0.4s;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

#leaderboard-menu-content {
  position: relative;
  background: #0c0c0c;
  width: 100%;
  height: 75%;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Состояния модального окна */
#leaderboard-menu.show {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0s 0s;
}
#leaderboard-menu.show #leaderboard-menu-content {
  transform: translateY(0);
  opacity: 1;
}
#leaderboard-menu.hide {
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0s 0.4s;
}
#leaderboard-menu.hide #leaderboard-menu-content {
  transform: translateY(100%);
  opacity: 0;
}
#leaderboard-menu.hidden {
  visibility: hidden;
}

/* --- Верхняя секция --- */
.top-section {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0c0c0c;
  width: 100%;
  padding-bottom: 10px;
  transition: margin-top 0.3s ease;
}

/* --- Кубок --- */
.trophy-container {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 10px; /* Постоянный отступ */
  transition: transform 0.3s ease, margin-bottom 0.3s ease;
}

.trophy {
  width: 150px;
  height: auto;
  transition: transform 0.3s ease;
  z-index: 2;
  position: relative;
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(92, 88, 88, 0.8) 0%, rgba(92, 87, 87, 0) 70%);
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: transform 0.3s ease;
}

/* --- Заголовок и кнопки --- */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 10px;
  width: 100%;
  transition: margin-top 0.3s ease;
}

.header-left {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.header-right {
  background: #222;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.button-group-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 10px;
  transition: margin-top 0.3s ease;
}

.button-group {
  display: flex;
  gap: 10px;
}

.button-group button {
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  min-width: 120px;
  text-align: center;
}

.button-group button.active {
  background: #444;
}

/* --- Анимация при уменьшении кубка --- */
.scrolled .trophy-container {
  transform: scale(0.5) translateY(-50px); /* Поднимаем кубок выше */
  margin-bottom: -40px;
}

.scrolled .header-container,
.scrolled .button-group-container {
  margin-top: 5px;
}

/* --- Список лидеров --- */
.leaderboard-list {
  width: 100%;
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 10px;
  padding: 0 10px;
}

/* --- Элемент списка лидеров --- */
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #222;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
}

/* --- Изменён порядок элементов: ник, иконка слева; монеты справа --- */
.leaderboard-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.player-right {
  order: 1;
  display: flex;
  align-items: center;
}

.player-left {
  order: 2;
  display: flex;
  align-items: center;
}

/* --- Информация об игроке --- */
.player-info {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-size: 16px;
  font-weight: bold;
}

.player-rank {
  font-size: 14px;
  color: #666;
}

/* --- Аватар --- */
.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

/* --- Значения (монеты/мин. число) --- */
.player-coins,
.player-luck {
  font-weight: bold;
  margin-left: 10px;
}

/* --- Подсветка текущего пользователя --- */
.highlight {
  background: #663333;
}



/* Модальное окно приглашения друзей */
#friend-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 14, 14, 0.6);
  backdrop-filter: blur(12px);
  visibility: hidden;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: opacity 0.4s ease, visibility 0s 0.1s;
}

#friend-menu-content {
  position: relative;
  background: linear-gradient(217deg, rgb(22, 22, 22) 0%, rgba(0, 0, 0, 0.89) 70.71%),
              linear-gradient(127deg, rgb(20, 84, 99) 0%, rgba(0, 0, 0, 0) 70.71%),
              linear-gradient(336deg, rgb(45, 45, 158) 0%, rgba(0, 0, 0, 0) 70.71%);
  width: 100%;
  height: 60%;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 20px;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: #b68383;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

#friend-menu.show {
 visibility: visible;
 opacity: 1;
}

#friend-menu.show #friend-menu-content {
 transform: translateY(0);
 opacity: 1;
 transition-delay: 0.1s;
}

#friend-menu.hide {
 opacity: 0;
}

#friend-menu.hide #friend-menu-content {
 transform: translateY(100%);
 opacity: 0;
}

#friend-menu.hidden {
 visibility: hidden;
}

.avatar-icon img {
  width: 140px;
  height: 140px;
  margin-bottom: 15px;
}

#friend-menu-content h2,  
#friend-menu-content p {  
   align-self: flex-start;  
   text-align: left;  
   width: 100%;  
   padding-left: 20px; 
}

.referral-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #222;
  padding: 12px;
  border-radius: 16px;
  width: 100%;
  min-height: 50px;
  flex-wrap: nowrap;
}

#referral-link {
  flex-grow: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: #fff;
  outline: none;
  word-break: break-all;
}

#copy-referral {
  background: #3a1919;
  color: white;
  border: none;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  width: auto;
  max-width: 120px;
  text-align: center;
  flex-shrink: 0;
}

#copy-referral:hover {
  background: #251010;
}

.bottom-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-bottom: 10px;
}

#share-link {
  background: #3d1b1b;
  color: white;
  border: none;
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 18px;
  cursor: pointer;
  width: 100%;
  min-height: 56px;
}

#share-link:hover {
  background: #1b0c0c;
}

.friends-count {
  font-size: 16px;
  color: #777;
  margin-bottom: 10px;
}

@media (max-height: 826px) {
  .referral-container {
     flex-direction: row;
     align-items: center;
     padding: 8px;
     border-radius: 12px;
  }

  #referral-link {
     font-size: 14px;
  }

  #share-link {
     font-size: 16px;
     padding: 14px;
     min-height: 50px;
  }
}

@media (max-height: 796px) {
  #referral-link {
     font-size: 12px;
  }
  #copy-referral {
     font-size: 12px;
     padding: 8px 8px;
     max-width: 100px;
  }
  #friend-menu-content h2 {
     font-size: 30px;
  }
  #friend-menu-content p {
     font-size: 20px;
  }
  .avatar-icon img {
     width: 100px;
     height: 100px;
     margin-bottom: 15px;
  }
}


/* Стили для десктопного и мобильного контента */
#desktop-content {
  background: black;
  color: white;
  padding: 50px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#desktop-content h1 {
  margin-bottom: 10px;
}

#mobile-content {
  padding: 20px;
}

#desktop-content img {
  margin-top: 10px;
  max-width: 100%;
  height: auto;
}

/* Адаптивные стили */
@media screen and (max-height: 670px) {
  #cube {
    width: 18rem;
    height: 18rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    outline: none;
  }
  #coins {
    font-size: 3rem;
    font-weight: bold;
    position: absolute;
    top: 10%;
    right: 10%;
    color: rgb(162, 175, 175);
  }
}

@media screen and (min-width: 634px) and (min-height: 872px) {
  .skins img {
    width: 200px;
    height: 200px;
  }
  #bestLuck {
    font-weight: bold;
    position: absolute;
    top: calc(10% + 4.063rem);
    font-size: 1.25rem;
    color: rgb(162, 175, 175);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    right: 10%;
  }
}

@media screen and (min-width: 1000px) and (min-height: 1000px) {
  #cube {
    width: 25rem;
    height: 25rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    outline: none;
  }
  #coins {
    font-size: 3rem;
    font-weight: bold;
    position: absolute;
    top: 10%;
    right: 10%;
    color: rgb(162, 175, 175);
  }
  .leaderboard-list {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: gray;
  }
}