/* СБРОС БРАУЗЕРНЫХ СТИЛЕЙ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ОБЩИЕ СТИЛИ ДЛЯ BODY */
html, body {
  /* background: #1a1a1a;
  background: rgba(57, 52, 97, 0.3); */
  background-image: url('background/background1.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: #e0e0e0;
  font-family: 'Futura', 'Trebuchet MS', 'Segoe UI', sans-serif;
  overflow: hidden; /* Убираем прокрутку всей страницы */
  height: 100%; /* Оставляем гибкость для JS */
}


/* КОНТЕЙНЕР ОГРАНИЧЕНИЯ ШИРИНЫ */
.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  padding-bottom: 70px;  /* Добавлено: чтобы нижний контент не заходил под панель */
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ЗАГОЛОВОК */
h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #00bfff;  /* Яркий голубой акцент */
  font-family: 'Press Start 2P', cursive;
  font-size: 20px;
}

/* ----- ОСНОВНОЙ БЛОК ИГРЫ ----- */
#game {
  /* background: rgba(255, 255, 255, 0.1); */
  /* background: rgba(39, 39, 39, 0.8); */
  /* background: rgba(100, 100, 100, 0.3); */
  /* background: rgba(147, 135, 255, 0.3); */
  /* background: rgba(80, 78, 109, 0.5); */
  /* background: rgba(57, 52, 97, 0.3); */
  padding: 5%;
  margin-top: -5%;
  border-radius: 10px;
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Шапка: Имя игрока + баланс */
.top-row {
  margin-bottom: 5%;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
}

/* Крупный баланс по центру */
.big-balance-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 1rem;
  margin-top: 10px;
}
.big-balance-display .icon {
  width: 40px;
  height: 40px;
}

/* ----- ПОЛОСА УРОВНЯ / ОПЫТА ----- */
.level-bar-container {
  position: relative;
  background: #333333;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  height: 25px;
  margin: 20px 0;
}

.level-bar {
  height: 100%;
  width: 0%; /* заполнение будем менять из JS */
  background: linear-gradient(270deg, #00bfff, #53ffe2, #ae00ff, #ff5dc9, #00bfff);
  background-size: 600% 600%;
  animation: gradient-animation 20s ease infinite;
  transition: width 3s ease;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.level-bar-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.8rem;
  pointer-events: none;
}


/* ----- РЯД С КРУГЛЫМИ ТАЙМЕРАМИ ----- */
.timer-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  font-family: 'Press Start 2P', cursive;
}

/* Контейнер для (Кнопка) + (Таймер) в колонку */
.timer-with-btn {
  display: flex;
  flex-direction: column; /* вертикально */
  align-items: center;
  gap: 8px;              /* расстояние между кнопкой и таймером */
}


/* Красивый ободок и свечение */
.circular-timer {
  position: relative;
  width: 90px; 
  height: 35px;       /* делаем такую же высоту, чтобы было круглым */
  border-radius: 10%; /* чтобы было кругом, а не прямоугольником */
  background: #2f2f2f;
  border: 3px solid #4f3b8c;
  box-shadow: 
    0 0 10px rgba(79,59,140,0.5),
    inset 0 0 5px rgba(255,255,255,0.1);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transition: box-shadow 0.3s, transform 0.3s;
  /* Остальные стили оставьте, как у вас были, если нужно */
}

/* При наведении чуть увеличиваем и усиливаем свечение */
.circular-timer:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 15px rgba(79,59,140,0.7),
    inset 0 0 5px rgba(255,255,255,0.1);
}

.timer-label {
  font-size: 0.5rem;
  margin-bottom: 2px;
}

.timer-value {
  font-size: 0.6rem;
  font-weight: bold;
}

/* ---- Новая псевдо-кнопка "BOOST" ---- */
.boost-container {
  position: relative;
  width: 90px; 
  height: 35px;        /* такая же высота, как у таймера */
  border-radius: 10%;
  background: #2f2f2f;
  border: 3px solid #4f3b8c;
  box-shadow: 
    0 0 10px rgba(79,59,140,0.5),
    inset 0 0 5px rgba(255,255,255,0.1);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;            /* между gif и текстом BOOST */
  
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.3s;
  /* Можно добавить disable outline */
  outline: none;
}

/* Эффект при наведении */
.boost-container:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 15px rgba(79,59,140,0.7),
    inset 0 0 5px rgba(255,255,255,0.1);
}

/* Картинка-гиф внутри кнопки */
.boost-gif {
  width: 35px; /* подберите нужный размер */
  height: 35px;
  object-fit: cover;
}

/* Текст "BOOST" */
.boost-text {
  font-family: 'Press Start 2P';
  font-size: 0.5rem;
  color: #ffffff;
  line-height: 1;
}

/* ----- ЗОНА С МОНСТРОМ ----- */
.game-area {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 20px;
}

.circle-container {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  border-radius: 50%;
  /* background: #292929; */
  background: #000000;
  background-image: url('background/blackhole.jpg');
  padding: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.circle-container:hover {
  box-shadow: 0 0 14px rgba(0,191,255,0.7);
}
.circle-container:active {
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(0,191,255,0.9);
}
.circle-container {
  transform-origin: center center;
}


.dino-floating {
  max-width: 100%;
  height: auto;
  user-select: none;
  animation: floatDino 2s infinite ease-in-out;
}
@keyframes floatDino {
  0%   { transform: translateY(0);   }
  50%  { transform: translateY(-5px);}
  100% { transform: translateY(0);   }
}



/* ----- УЛЕТАЮЩИЕ ЦИФРЫ "+5" ----- */
#floatingNumbersContainer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.floating-number {
  position: absolute;
  font-size: 1.5rem;
  color: #ffffff;
  animation: floatUp 1s ease-out forwards;
  transform: translate(-50%, -50%);
}
@keyframes floatUp {
  0%   { opacity: 1; }
  100% { transform: translate(-50%, -150%); opacity: 0; }
}


/* ----- ЭФФЕКТ "ХИТ" ПРИ КЛИКЕ ----- */
.hit-effect {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* ----- ИНДИКАТОРЫ (ЭНЕРГИЯ, ПАССИВ) ----- */
.indicators-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 10px;
  padding: 0 10px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
}
.indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
}
.indicator .icon {
  width: 50px;
  height: 50px;
}

/* ----- КНОПКИ ВНИЗУ ----- */
.bottom-buttons {
  position: fixed;          /* Закрепляем относительно окна */
  bottom: 0;                /* Прижимаем к нижней части экрана */
  left: 46%;                /* Центрирование по горизонтали */
  transform: translateX(-50%); /* Точная центровка */
  width: 100%;
  max-width: 85%;         /* По значению, совпадающему с вашим контейнером */
  padding: 2% 0%;          /* Внутренние отступы сверху и снизу */
  /* background: rgba(57, 52, 97, 0.3);  (Опционально) полупрозрачный фон */
  display: flex;
  justify-content: space-around; /* Равномерное распределение кнопок */
  z-index: 1000;            /* Чтобы панель была поверх остальных элементов */
  gap: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #4f3b8c00;
  color: #ffffff;
  border: none;
  padding: 0;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
  font-family: 'Press Start 2P', cursive; font-size: 9px;
  padding-bottom: 5px;
}
.btn:hover {
  background: #6b52b9;
}
.section-icon {
  width: 100%; 
  height: 100%;
}
.section-icon-mod {
  width: 100%; 
  height: 100%;
}

.btn2 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #4f3b8c00;
  color: #ffffff;
  border: none;
  /* padding-bottom: 100%; */
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
  font-family: 'Press Start 2P', cursive; font-size: 25px;
}
.btn2:hover {
  background: #6b52b9;
}

.btn3 {
  display: flex; /* Или inline-flex, если важна определённая верстка внутри кнопки */
  align-items: left;
  background: #4f3b8c00;
  color: #ffffff;
  border: none;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
  font-family: 'Press Start 2P';
  font-size: 15px;
}

.btn3:hover {
  background: #6b52b9;
}


/* ----- ЭКРАН АПГРЕЙДОВ ----- */
#upgradesView {
  display: none; /* Изначально скрыто, как и в HTML */
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 10px;
  overflow-y: auto;
  max-height: 100%;
}

#upgradesView::-webkit-scrollbar {
  display: none; /* Для Webkit-браузеров (Chrome, Safari) */
}

#upgradeView {
  height: 300px; /* тестовая фиксированная высота */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* для плавного скролла на iOS */
  box-sizing: border-box;
  border: 1px solid red; /* временная отладочная рамка, чтобы видеть область */
}

.upgrades-header {
  margin: 10px;
  padding: 0px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrades-header h2 {
  margin: 10px; /* убираем отступы */
  padding: 0px; 
  display: flex;
  align-items: center;
  font-size: 25px;
  font-family: 'Press Start 2P', cursive;
  color: #00bfff;
}




/* --- Сетка для апгрейдов --- */
#passiveUpgradesContainer,
#tapUpgradesContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 20px;
  width: 100%;
}

/* --- Карточка апгрейда --- */
.upgrade-card {
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 14px 10px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-width: 0;
  min-height: 220px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.upgrade-card:hover {
  box-shadow: 0 4px 16px rgba(0,191,255,0.18);
  transform: translateY(-2px) scale(1.03);
}

/* --- Картинка апгрейда --- */
.upgrade-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 8px;
  border-radius: 8px;
}

/* --- Название, уровень, бонус --- */
.upgrade-name {
  font-size: 16px;
  height: 38px;
  line-height: 19px;
  font-weight: bold;
  color: #d2a3fc;
  margin-bottom: 4px;
  text-align: center;
  word-break: break-word;
}
.upgrade-level {
  font-size: 25px;
  color: #fff;
  margin-bottom: 2px;
  font-family: 'VT323', monospace;
}
.upgrade-bonus {
  font-size: 20px;
  color: #ffe853;
  margin-bottom: 2px;
  font-family: 'VT323', monospace;
  text-align: center;
}
.upgrade-cost {
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
  font-family: 'VT323', monospace;
}
.cost-value {
  color: #00bfff;
  font-weight: bold;
  margin-left: 2px;
  font-size: 20px;
}

.collect-text.disabled {
  animation: none !important;
  opacity: 0.5; /* Можно сделать тусклее */
}

/* --- Кнопка покупки --- */
.upgrade-buy-btn {
  background: #4f3b8c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 36px;
  font-family: 'Press Start 2P', cursive;
  font-size: 20px;
  margin-top: auto;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px #0002;
}
.upgrade-buy-btn:active {
  background: #6b52b9;
  transform: scale(0.97);
}
.upgrade-buy-btn:disabled {
  background: #333;
  color: #aaa;
  cursor: not-allowed;
  opacity: 0.7;
}

/* --- Статусы (SOLD, LOCKED, NO FUNDS) --- */
.upgrade-status {
  font-size: 16px;
  font-family: 'VT323', monospace;
  margin-top: 4px;
  color: #fff;
  text-align: center;
  min-height: 18px;
}
.upgrade-status.sold {
  color: #2ecc71;
}
.upgrade-status.locked {
  color: #c93030;
}
.upgrade-status.no-funds {
  color: #ffdf00;
}

/* --- Анимация покупки --- */
.upgrade-card.purchased-animation {
  animation: purchaseShake 0.6s ease;
}
@keyframes purchaseShake {
  0% { transform: scale(1); }
  20% { transform: scale(1.1) rotate(1deg); }
  40% { transform: scale(0.9) rotate(-1deg); }
  60% { transform: scale(1.05) rotate(0.6deg); }
  80% { transform: scale(1); }
  100% { transform: scale(1); }
}

.small-desc {
  font-size: 9px;
  opacity: 0.8;
}
.btn .coin-icon {
  width: 16px;
  height: 16px;
}


#passivePoolAmount {
  margin-left: 4px;
  font-weight: normal;
  color: #ffdf00; /* яркий золотистый для наглядности */
  font-size: 0.9rem;
  opacity: 0.9;
}

.passive-pool-display-circle {
  position: absolute;
  bottom: -20px; /* Расположение снизу от кружка – подберите значение по вкусу */
  left: 50%;
  transform: translateX(-50%);
  background: #ff00dd67;  /* Золотой фон для выделения */
  color: #000;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}


.tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.tab-icon {
  width: 120px; /* Укажите нужный размер, можно изменять */
  height: auto;
  display: block;
}
.tabs-icon-spec {
  display: flex;
  gap: 50%;
  margin-top: 10px;
  justify-content: center;
}


/* Стили для экранов Social и Daily Tasks */
#socialView {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px; /* Отступ сверху для отделения от основного контента */
}


.social-header, .daily-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.social-header h2, .daily-tasks-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: 'Press Start 2P', cursive;
  color: #00bfff;
}

/* Стили для табов внутри Social и Daily Tasks */
#socialView .tabs, 
#dailyTasksView .tabs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

#socialView .tab-btn, 
#dailyTasksView .tab-btn {
  background: rgba(79, 59, 140, 0.8);
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: #fff;
  transition: background 0.3s;
}

#socialView .tab-btn.active, 
#dailyTasksView .tab-btn.active,
#socialView .tab-btn:hover, 
#dailyTasksView .tab-btn:hover {
  background: #6b52b9;
}

#dailyTasksView {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  flex: 1;
  overflow: hidden;
  margin-top: 20px;
  max-height: 100%;
}

#announcementsContainer {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
  font-family: 'Futura', 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #e0e0e0;
  overflow-y: auto;
  max-height: 80%;
  flex-grow: 1;
}

#announcementsContainer::-webkit-scrollbar {
  display: none; /* Для Webkit-браузеров (Chrome, Safari) */
}

/* Дополнительное оформление нижнего меню и стрелок */
/* Опускаем стрелки, увеличив отступ у блока */
.bottom-buttons {
  margin-top: 10px;
  gap: -10px;
}


@keyframes purchaseShake {
  0% { transform: scale(1); }
  20% { transform: scale(1.1) rotate(1deg); }
  40% { transform: scale(0.9) rotate(-1deg); }
  60% { transform: scale(1.05) rotate(0.6deg); }
  80% { transform: scale(1); }
  100% { transform: scale(1); }
}


/* ==== DAILY TASKS ==== */

/* Каждый отдельный блок задания */
.daily-task {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #555;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s;
  font-family: 'Futura', 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-size: 13px;
}

.daily-task:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Заголовок задания (например, "Make 120 taps") */
.daily-task h4 {
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-family: 'Press Start 2P', cursive;
  color: #00bfff;
  text-transform: uppercase;  /* или убери, если не нравится */
}

/* Строка с прогрессом и т. п. */
.daily-task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
}

/* Текстовое описание прогресса (Progress: X / Y) */
.task-progress {
  color: #ccc;
  font-size: 0.6rem;
  font-family: 'Press Start 2P', cursive;
}

/* Можно вывести награду отдельно, если хочешь */
.task-reward {
  color: #ffdf00;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Кнопка "Claim reward" и т. п. */
.daily-task .btn {
  margin-top: 6px;
  background: #4f3b8c;  /* Твоя фиолетовая кнопка */
  padding: 6px 10px;
  font-size: 10px;
  border-radius: 8px;
}
.daily-task .btn:hover {
  background-color: #6b52b9;
}

/* ===== СТИЛИ ДЛЯ ШАПКИ С ТЕЛЕГРАМ-ВИДЖЕТОМ ===== */

/* Обёртка, объединяющая Telegram Login и кнопку группы */
.telegram-container {
  display: inline-flex;              /* Можно и flex, если нужно, чтобы тянулось на всю ширину */
  align-items: center;
  gap: 15px;                         /* Расстояние между виджетом и кнопкой */
  
  background: rgba(57, 52, 97, 0.3); /* Полупрозрачный фон в духе общего оформления */
  border: 1px solid #6b52b9;        /* Акцентная фиолетовая рамка */
  border-radius: 10px;
  
  padding: 10px 15px;
  margin-bottom: 20px;              /* Отступ снизу, чтобы визуально отделить от остального */
  
  /* Тот же шрифт, что и в остальных элементах */
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
}

/* Кнопка «Main group» в том же стиле, что и остальные .btn */
.main-group-button {
  display: inline-block;             /* Чтобы сохранять стили кнопки */
  background: #4f3b8c;              /* Основной фиолетовый цвет */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s;
  
  /* Подобие шрифта для согласованности */
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
}

/* Ховер-эффект */
.main-group-button:hover {
  background: #6b52b9;
}

/* ===== АНАЛОГИЧНО СТИЛЮ DAILY-TASK ===== */

.announcement-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #555;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s;
  font-family: 'Futura', 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-size: 13px;
}

.announcement-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Заголовок анонса (например, h4 у вас в renderAnnouncements) */
.announcement-item h4 {
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-family: 'Press Start 2P', cursive;
  color: #00bfff;
  text-transform: uppercase; /* как и в дейликах */
}

/* Текст анонса (p) – например, стиль чуть меньше */
.announcement-item p {
  color: #ccc;
  font-size: 0.6rem; 
  font-family: 'Press Start 2P', cursive; 
  margin-bottom: 6px;
}

/* Кнопка "Check & Claim Reward" */
.announcement-item .btn {
  margin-top: 6px;
  background: #4f3b8c;
  padding: 6px 10px;
  font-size: 10px;
  border-radius: 8px;
}

.announcement-item .btn:hover {
  background-color: #6b52b9;
}

.game-area,
.game-area * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}



/* Custom Modal Styles */
.modal {
  display: none; /* Скрыто по умолчанию */
  position: fixed;
  z-index: 1000; /* Поверх всего */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7); /* Более тёмное затемнение фона */
}

.modal-content {
  background-color: #292929; /* Тёмный фон, соответствующий общей теме */
  color: #e0e0e0; /* Светлый текст */
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #4f3b8c; /* Акцентная рамка в тон вашим кнопкам */
  width: 80%;
  max-width: 400px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-family: 'Press Start 2P', cursive;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #e0e0e0;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover,
.close:focus {
  color: #00bfff;
  text-decoration: none;
}

@keyframes shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0, 0); }
}

.shake {
  animation: shake 0.5s;
}

.red-number {
  color: #ff44c1; /* красный оттенок */
  transition: color 5s;
  font-family: 'Press Start 2P', cursive;
}

#dinoContainer {
  transition: box-shadow 2s ease; /* Переход длительностью 1 секунда, можно увеличить время по желанию */
  border-radius: 50%;
  overflow: hidden; /* чтобы эффект не выходил за границы */
}

/* Пример базовых стилей для всплывающих чисел */
.floating-number {
  transition: color 5s;
  font-family: 'Press Start 2P', cursive;
  color: #ffffff; /* исходный цвет */
  position: absolute;
}

/* Классы для разных диапазонов количества тапов */
.color-tap-low {
  color: #44c1ff; /* светло-голубой */
  transition: color 5s;
  font-family: 'Press Start 2P', cursive;
}

.color-tap-medium {
  color: #aa44ff; /* фиолетовый */
  transition: color 5s;
  font-family: 'Press Start 2P', cursive;
}

.color-tap-high {
  color: #ff44c1; /* розово-красный */
  transition: color 5s;
  font-family: 'Press Start 2P', cursive;
}

/* Позиционирование уровня в правом верхнем углу полосы */
.level-display {
  position: absolute;
  top: 83px; /* Настройте отступ сверху по необходимости */
  right: 25px;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
}


/* Стили для контейнеров, чтобы они соответствовали общему оформлению */
.referrals-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  font-family: 'Futura', 'Trebuchet MS', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #e0e0e0;
}

.referrals-container h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 18px;
  color: #00bfff;
  margin-bottom: 10px;
}


/* Контейнер для всего списка рефералов */
.referrals-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Каждый отдельный элемент списка */
.referral-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s;
}

/* Убираем нижнюю границу у последнего элемента */
.referral-item:last-child {
  border-bottom: none;
}

/* Стили для имени (акцентный цвет) */
.referral-name {
  flex: 2;
  color: #00bfff;
  font-weight: bold;
}

/* Стили для количества монет */
.referral-coins {
  flex: 1;
  color: #ccc;
  font-size: 12px;
  text-align: center;
}

/* Стили для уровня */
.referral-level {
  flex: 1;
  color: #ccc;
  font-size: 12px;
  text-align: center;
}

/* Опционально: эффект при наведении на элемент списка */
.referral-item:hover {
  background: rgba(0, 0, 0, 0.4);
}

.slash-effect {
  width: 120px;         /* любой размер под вкус */
  height: auto;
  pointer-events: none; /* чтобы клик не перехватывался slash'ом */
}

.red-indicator {
  background-color: red;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
}


/* Новый блок состояния */
.status-row {
  margin-top: -5%;
  padding: 10 10px;
  display: flex;
  flex-direction: column;
}

/* Отдельные блоки для Energy и Passive */
.status-energy,
.status-passive {
  margin: 3% 3%;
}

/* Заголовок с меткой и (при необходимости) кнопкой */
.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Метка для блока */
.status-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  width: 50px;
  text-align: right;
}

/* Контейнер для полосок (аналог level-bar-container) */
.status-bar-container {
  flex-grow: 1;
  background: #333333;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  height: 20px;
}

/* Горизонтальная полоска (для энергии) */
.status-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(270deg, #66d9ff, #7700ff, #d280ff, #2ef1ff, #66d9ff);
  background-size: 600% 600%;
  animation: gradient-animation-energy 40s ease infinite;
  transition: width 3s ease;
}

@keyframes gradient-animation-energy {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Кнопка для BOOST (используется и для autotap) */
.boost-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0px 10px;
  background: #2f2f2f;
  border: 3px solid #4f3b8c;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(79, 59, 140, 0.5);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}

.boost-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(79, 59, 140, 0.7);
}

.boost-btn img {
  width: 25px;
  height: 25px;
}

/* PASSIVE: кнопка-пул – выводит сумму накопленного пассива */
.pool-btn {
  background: #2f2f2f;
  border: 3px solid #3201c5;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  cursor: pointer;
}

/* Контейнер для индикатора пассивного дохода */
.passive-indicator-container {
  flex-grow: 1;
  background: #333333;
  border-radius: 10px;
  overflow: hidden;
  margin-left: 10px;
  height: 20px;
}

/* Индикатор пассивного дохода – прогресс-бар, внутри которого текст */
.passive-indicator {
  height: 100%;
  width: 0%;
  background: linear-gradient(270deg, #FFD700, #FFC107, #FFEB3B, #FFD54F, #FFD700);
  background-size: 600% 600%;
  animation: gradient-animation-passive 20s ease infinite;
  transition: width 3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}

@keyframes gradient-animation-passive {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
/* Расположение элементов в блоке PASSIVE */
.passive-info {
  display: flex;
  align-items: center;
}

/* Обёртка для кнопки, чтобы можно было позиционировать надпись относительно неё */
.collect-wrapper {
  position: relative;
  display: inline-block; /* или flex, если вам нужно выравнивание по центру */
}

/* Если нужно, можно задать специфичные стили для самой кнопки */
.pool-btn {
  position: relative; /* чтобы при абсолютном позиционировании потомков опирались на эту кнопку */
  /* Остальные стили кнопки остаются без изменений */
}

/* Стили для надписи Collect */
.collect-text {
  position: absolute;
  left: 50%;
  bottom: -10px; /* значение можно регулировать – оно задаёт, насколько надпись будет выступать за кнопку */
  transform: translateX(-50%);
  font-size: 14px; /* подберите размер шрифта по вкусу */
  font-weight: bold;
  color: #ffffff; /* задайте нужный цвет для этой надписи */
  animation: shaker 2s infinite; /* анимация «дрожания» */
  z-index: 3;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}

/* Анимация для эффекта легкого движения */
@keyframes shaker {
  0%   { transform: translateX(-50%) skewX(0deg) rotate(0deg); }
  20%  { transform: translateX(-50%) skewX(-3deg) rotate(4deg); }
  40%  { transform: translateX(-50%) skewX(3deg) rotate(-4deg); }
  60%  { transform: translateX(-50%) skewX(-2deg) rotate(2deg); }
  80%  { transform: translateX(-50%) skewX(2deg) rotate(-2deg); }
  100% { transform: translateX(-50%) skewX(0deg) rotate(0deg); }
}

/* Пример изменения цвета текста внутри кнопки boost */
/* Если у вас кнопка boost имеет класс .boost-btn, можно добавить: */
.boost-btn span {
  color: #00bcd4; /* пример цвета, замените на нужный */
}

.pool-btn span {
  color: #ffffff; /* Цвет для pool-btn */
}
.boost-btn span {
  color: #00bcd4; /* Цвет для boost-btn */
}

#referralsList p {
  font-family: 'VT323', 'Press Start 2P', cursive, monospace;
  font-size: 22px; /* Можно увеличить или уменьшить по вкусу */
  color: #e0e0e0;  /* Цвет под вашу тему */
  letter-spacing: 1px;
  text-align: center;
  margin-top: 12px;
}



.leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  border: 1.5px solid #444;
  margin-right: 8px;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-size: 20px;
  font-family: 'VT323', monospace;
  padding: 4px 0;
}
.leaderboard-nick {
  width: 120px;
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.leaderboard-coins {
  font-size: 10px;
  text-align: right;
  font-family: 'Press Start 2P', monospace;
}
.leaderboard-coins {
  width: 160px;
  text-align: right;
  font-family: 'Press Start 2P', monospace;
}


.leaderboard-top-btn {
  background: rgba(79, 59, 140, 0.8);
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: #fff;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 0.3s, transform 0.12s;
  box-shadow: 0 2px 8px #0002;
  outline: none;
  user-select: none;
}

.leaderboard-top-btn:hover,
.leaderboard-top-btn:focus {
  background: #6b52b9;
}

.leaderboard-top-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 16px rgba(0,191,255,0.18);
}


#leaderboardContainer {
  max-width: 100%;
  overflow-x: auto;
}

#leaderboardList {
  max-height: 420px; /* или другое значение по вкусу */
  overflow-y: auto;
  width: 100%;
  min-width: 0;
}

/* --- ОБЕРТКА ВСЕГО ПРИЛОЖЕНИЯ --- */
.app{
  transform-origin: top left;   /* чтобы масштаб шёл из верхнего-левого угла */
  /* пока без transform – на нормальных экранах 1 к 1 */
}

/* --- МЕДИА-ЗАПРОСЫ (ширина ≤ … px) --- */

@media (max-height: 9990px){
  .app{
    transform: scale(1);          /* ужимаем до 90 % */
    width:  calc(100% / 1);       /* убираем горизонтальный скролл */
    height: calc(100% / 1);
  }
}


/* iPhone SE / Android-mini (~360 px) */
@media (max-height: 690px){
  .app{
    transform: scale(0.95);          /* ужимаем до 90 % */
    width:  calc(100% / 0.95);       /* убираем горизонтальный скролл */
    height: calc(100% / 0.95);
  }
}

/* iPhone SE / Android-mini (~360 px) */
@media (max-height: 660px){
  .app{
    transform: scale(0.85);          /* ужимаем до 90 % */
    width:  calc(100% / 0.85);       /* убираем горизонтальный скролл */
    height: calc(100% / 0.85);
  }
}

/* “совсем маленькие” телефоны (< 330 px) */
@media (max-height: 590px){
  .app{
    transform: scale(0.80);
    width:  calc(100% / 0.80);
    height: calc(100% / 0.80);
  }
}
