* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Убираем лишнее пространство на всех элементах */
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f1e8 0%, #e8dfc7 100%);
  background-attachment: fixed; /* Фиксируем градиент для производительности */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Выравниваем по верху */
  /* УБИРАЕМ ЛИШНЕЕ ПРОСТРАНСТВО - фиксируем размеры */
  height: 100vh;
  width: 100vw;
  max-height: 100vh;
  max-width: 100vw;
  padding: 15vh 2vw 3vh 2vw; /* Процентные отступы с учетом хедера */
  position: fixed; /* Фиксируем позицию */
  top: 0;
  left: 0;
  /* ПОЛНОСТЬЮ БЛОКИРУЕМ СКРОЛЛ */
  overflow: hidden;
  /* Оптимизация производительности */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Предотвращаем баунс-эффект на iOS */
  overscroll-behavior: none;
  /* ПРЕДОТВРАЩАЕМ ЗУМ ПРИ ДВОЙНОМ ТАПЕ */
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Плавающие эмоджи на фоне */
.floating-emoji {
  position: absolute;
  font-size: 50px; /* Увеличиваем базовый размер с 40px до 50px */
  opacity: 0.25;
  /* filter: blur(1px); - ВЫКЛЮЧЕН для производительности */
  z-index: 0;
  animation: float-emoji ease-in-out infinite;
  pointer-events: none;
  transition: all 0.3s ease;
  /* Оптимизация производительности */
  will-change: transform;
  transform: translateZ(0);
}

/* Креветки кликабельны - выглядят КАК ОБЫЧНЫЕ эмоджи, но с оптимизацией тача */
.floating-emoji.shrimp {
  cursor: pointer;
  pointer-events: auto;
  font-size: 50px; /* Немного больше минимального размера */
  opacity: 0.50; /* Как у обычных эмоджи */
  z-index: 1; /* Чуть выше обычных, но незаметно */
  animation: float-emoji-shrimp ease-in-out infinite; /* Анимация для креветок с повышенной прозрачностью */
  transition: all 0.3s ease;
  /* Оптимизация для мобильных устройств */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* ПРЕДОТВРАЩАЕМ ЗУМ ПРИ ДВОЙНОМ ТАПЕ */
  touch-action: manipulation;
  /* УВЕЛИЧЕННАЯ область клика через псевдоэлемент (невидимая зона вокруг) */
  position: relative;
  will-change: transform;
  transform: translateZ(0);
  /* Добавляем свечение для креветок */
  filter: drop-shadow(0 2px 8px rgba(255, 235, 59, 0.7)) drop-shadow(0 0 16px rgba(255, 193, 7, 0.7));
}

/* Создаем большую невидимую область клика вокруг креветки */
.floating-emoji.shrimp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; /* Большая область клика */
  height: 120px; /* Большая область клика */
  border-radius: 50%;
  /* Для отладки можно раскомментировать: */
  /* background: rgba(255, 0, 0, 0.1); */
  z-index: -1;
  /* Убеждаемся что область кликабельна */
  pointer-events: auto;
}

/* Дополнительная область клика через псевдоэлемент ::after */
.floating-emoji.shrimp::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: auto;
}

/* При наведении - небольшой эффект (подсказка что кликабельна) */
.floating-emoji.shrimp:hover {
  opacity: 0.35 !important;
  transform: scale(1.1) !important;
  filter: drop-shadow(0 0 12px rgba(255, 235, 59, 0.6)) drop-shadow(0 0 24px rgba(255, 193, 7, 0.5)) !important;
}

/* При активном касании - яркий эффект */
.floating-emoji.shrimp:active {
  opacity: 0.6 !important;
  filter: drop-shadow(0 0 20px rgba(255, 235, 59, 0.8)) drop-shadow(0 0 40px rgba(255, 193, 7, 0.8)) !important;
  transform: scale(1.2) !important;
  z-index: 100 !important;
}



@keyframes float-emoji {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    transform: translateY(80vh) translateX(var(--x-offset)) rotate(36deg);
    opacity: 0.25;
  }
  25% {
    transform: translateY(50vh) translateX(0) rotate(90deg);
    opacity: 0.25;
  }
  50% {
    transform: translateY(0vh) translateX(var(--x-offset)) rotate(180deg);
    opacity: 0.25;
  }
  75% {
    transform: translateY(-50vh) translateX(0) rotate(270deg);
    opacity: 0.25;
  }
  90% {
    transform: translateY(-80vh) translateX(var(--x-offset)) rotate(324deg);
    opacity: 0.25;
  }
  100% {
    transform: translateY(-100vh) translateX(0) rotate(360deg);
    opacity: 0;
  }
}

/* Отдельная анимация для креветок с повышенной прозрачностью */
@keyframes float-emoji-shrimp {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    transform: translateY(80vh) translateX(var(--x-offset)) rotate(36deg);
    opacity: 0.5;
  }
  25% {
    transform: translateY(50vh) translateX(0) rotate(90deg);
    opacity: 0.5;
  }
  50% {
    transform: translateY(0vh) translateX(var(--x-offset)) rotate(180deg);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-50vh) translateX(0) rotate(270deg);
    opacity: 0.5;
  }
  90% {
    transform: translateY(-80vh) translateX(var(--x-offset)) rotate(324deg);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) translateX(0) rotate(360deg);
    opacity: 0;
  }
}

.header {
  text-align: center;
  margin: 0;
  padding: 1vh 0; /* Процентная высота viewport */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  height: 15vh; /* Процентная высота viewport */
  min-height: 60px; /* Минимальная высота для очень маленьких экранов */
  max-height: 17%; /* Максимальная высота для больших экранов */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Анимированный хедер */
.animated-header {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Слои с текстом */
.text-layers {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.text-layer {
  position: absolute;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-text {
  top: 1vh; /* Процентное позиционирование */
  transform: translateY(0);
}

.bottom-text {
  bottom: 1vh; /* Процентное позиционирование */
  transform: translateY(0);
}

/* Слой с лицом */
.face-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Изображения */
.header-image {
  max-width: 20vw; /* Процентная ширина viewport */
  max-height: 5vh; /* Процентная высота viewport */
  min-width: 80px; /* Минимальный размер */
  min-height: 20px; /* Минимальный размер */
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.5vh 1vh rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
  /* Убираем font-weight для изображений */
  font-weight: normal;
}

.face-image {
  max-width: 15vw; /* Увеличенная ширина для лучшей видимости */
  max-height: 12vh; /* Увеличенная высота для лучшей видимости */
  min-width: 50px; /* Увеличенный минимальный размер */
  min-height: 50px; /* Увеличенный минимальный размер */
  border-radius: 50%;
  animation: faceShake 1.5s ease-in-out; /* Увеличена длительность до 1.5 секунд */
  transition: all 0.3s ease;
}

/* Анимация лица */
@keyframes faceShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  10% { transform: translateX(-2px) rotate(-1deg); }
  20% { transform: translateX(2px) rotate(1deg); }
  30% { transform: translateX(-1px) rotate(-0.5deg); }
  40% { transform: translateX(1px) rotate(0.5deg); }
  50% { transform: translateX(-1px) rotate(-0.5deg); }
  60% { transform: translateX(1px) rotate(0.5deg); }
  70% { transform: translateX(-1px) rotate(-0.5deg); }
  80% { transform: translateX(1px) rotate(0.5deg); }
  90% { transform: translateX(-1px) rotate(-0.5deg); }
}

/* Анимация расхождения текста */
.animated-header.animate .top-text {
  transform: translateY(-1.5vh); /* Процентное смещение */
}

.animated-header.animate .bottom-text {
  transform: translateY(1.5vh); /* Процентное смещение */
}

/* Ограничиваем анимацию на мобильных устройствах */
@media (max-width: 768px) {
  .animated-header.animate .top-text {
    transform: translateY(-1vh); /* Уменьшенное смещение для мобильных */
  }
  
  .animated-header.animate .bottom-text {
    transform: translateY(1vh); /* Уменьшенное смещение для мобильных */
  }
}

.animated-header.animate .face-layer {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Маленькие экраны (до 480px) - компактный но крупный интерфейс */
@media (max-width: 480px) {
  body {
    padding: 18vh 2vw 2vh 2vw !important; /* Увеличенные отступы для большего хедера */
  }
  
  .header {
    height: 15vh !important; /* Увеличенная высота */
    min-height: 80px !important;
  }
  
  .face-image {
    max-width: 22vw !important; /* Увеличенное лицо */
    max-height: 15vh !important;
    min-width: 70px !important;
    min-height: 70px !important;
  }
  
  .header-image {
    max-width: 30vw !important; /* Увеличенные логотипы */
    max-height: 8vh !important;
    min-width: 90px !important;
    min-height: 25px !important;
    font-weight: 300 !important; /* Понижаем font-weight для мобильных */
  }
  
  .top-text {
    top: 0.3vh !important;
  }
  
  .bottom-text {
    bottom: 0.3vh !important;
  }
  
  .animated-header.animate .top-text {
    transform: translateY(-0.5vh) !important; /* Еще меньше смещение */
  }
  
  .animated-header.animate .bottom-text {
    transform: translateY(0.5vh) !important; /* Еще меньше смещение */
  }
  
  /* Рулетка - компактная но крупная */
  .roulette {
    width: 80vw !important; /* Увеличено для лучшего использования пространства */
    height: 80vw !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  
  /* Оптимизация креветок для мобильных */
  .floating-emoji.shrimp {
    font-size: 45px !important; /* Немного меньше для мобильных */
    filter: drop-shadow(0 0 7px rgba(255, 235, 59, 0.7)) drop-shadow(0 0 12px rgba(255, 193, 7, 0.7)) !important;
  }
  
  /* Оптимизация миниигры для мобильных */
  .minigame-container {
    padding: 15px !important;
    margin: 5px !important;
    max-height: 98vh !important;
    border-radius: 15px !important;
    max-width: 95vw !important;
  }
  
  .minigame-container h2 {
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }
  
  .minigame-container h3 {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }
  
  .minigame-container p {
    font-size: 14px !important;
    margin-bottom: 8px !important;
  }
  
  .minigame-emoji {
    font-size: 60px !important;
    margin: 15px 0 !important;
  }
  
  .fishing-bar {
    height: 250px !important;
  }
  
  .fishing-bar-container {
    margin: 15px 0 !important;
    padding: 10px !important;
  }
  
  .tap-button {
    width: clamp(80px, 18vw, 120px) !important;
    height: clamp(80px, 18vw, 120px) !important;
    font-size: clamp(12px, 3.5vw, 20px) !important;
    margin: 10px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .game-timer,
  .game-score {
    font-size: 16px !important;
    margin: 6px 0 !important;
  }
  
  .center-circle {
    width: 20vw !important; /* Увеличенный центр */
    height: 20vw !important;
    min-width: 70px !important;
    min-height: 70px !important;
  }
  
  .prize-text {
    font-size: clamp(11px, 3.5vw, 15px) !important; /* Увеличенный текст */
    width: 22vw !important;
    min-width: 85px !important;
  }
  
  /* Контролы - компактные но крупные */
  .controls {
    padding: 2vh 4vw !important; /* Увеличенные отступы */
    gap: 2vh !important; /* Увеличенные промежутки */
    width: 95vw !important;
    margin: 2vh auto 0 auto !important;
  }
  
  .roulette-container {
    margin: 2vh 0 2.5vh 0 !important; /* Увеличенные отступы */
  }
  
  input, button {
    padding: 2vh 3vw !important; /* Увеличенные отступы */
    font-size: clamp(15px, 4.5vw, 18px) !important; /* Увеличенный шрифт */
  }
}

/* Средние экраны (481px - 768px) - оптимальный размер */
@media (min-width: 481px) and (max-width: 768px) {
  body {
    padding: 19vh 3vw 3vh 3vw !important; /* Увеличенные отступы для большего хедера */
  }
  
  .header {
    height: 16vh !important; /* Увеличенная высота */
    min-height: 90px !important;
  }
  
  .face-image {
    max-width: 15vw !important; /* Увеличенное лицо */
    max-height: 12vh !important;
    min-width: 60px !important;
    min-height: 60px !important;
  }
  
  .header-image {
    max-width: 20vw !important; /* Увеличенные логотипы */
    max-height: 6vh !important;
    min-width: 100px !important;
    min-height: 30px !important;
    font-weight: 400 !important; /* Понижаем font-weight для средних экранов */
  }
  
  .roulette {
    width: 65vw !important; /* Увеличено для лучшего использования пространства */
    height: 65vw !important;
    max-width: 450px !important;
    max-height: 450px !important;
  }
  
  /* Оптимизация креветок для средних экранов */
  .floating-emoji.shrimp {
    font-size: 48px !important; /* Средний размер */
    filter: drop-shadow(0 0 7px rgba(255, 235, 59, 0.7)) drop-shadow(0 0 14px rgba(255, 193, 7, 0.8)) !important;
  }
  
  /* Оптимизация миниигры для средних экранов */
  .minigame-container {
    padding: 20px !important;
    margin: 10px !important;
    max-height: 90vh !important;
    max-width: 90vw !important;
  }
  
  .minigame-container h2 {
    font-size: 28px !important;
    margin-bottom: 12px !important;
  }
  
  .minigame-container h3 {
    font-size: 20px !important;
    margin-bottom: 8px !important;
  }
  
  .minigame-container p {
    font-size: 15px !important;
    margin-bottom: 8px !important;
  }
  
  .fishing-bar {
    height: 280px !important;
  }
  
  .fishing-bar-container {
    margin: 18px 0 !important;
    padding: 12px !important;
  }
  
  .tap-button {
    width: clamp(90px, 19vw, 140px) !important;
    height: clamp(90px, 19vw, 140px) !important;
    font-size: clamp(14px, 4vw, 24px) !important;
    margin: 12px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .game-timer,
  .game-score {
    font-size: 17px !important;
    margin: 7px 0 !important;
  }
  
  .center-circle {
    width: 16vw !important; /* Увеличенный центр */
    height: 16vw !important;
    max-width: 100px !important;
    max-height: 100px !important;
  }
  
  .prize-text {
    font-size: clamp(11px, 2.5vw, 14px) !important; /* Увеличенный текст */
    width: 18vw !important;
    max-width: 120px !important;
  }
  
  .controls {
    margin: 2.5vh auto 0 auto !important; /* Увеличенные отступы */
    padding: 2.5vh 3vw !important; /* Увеличенные отступы */
    gap: 2.5vh !important; /* Увеличенные промежутки */
  }
  
  .roulette-container {
    margin: 2.5vh 0 3vh 0 !important; /* Увеличенные отступы */
  }
  
  input, button {
    padding: 2.5vh 3vw !important; /* Увеличенные отступы */
    font-size: clamp(15px, 3.5vw, 18px) !important; /* Увеличенный шрифт */
  }
}

/* Большие экраны (от 769px) - пропорциональный размер */
@media (min-width: 769px) {
  body {
    padding: 17vh 4vw 4vh 4vw !important; /* Увеличенные отступы для большего хедера */
  }
  
  .header {
    height: 14vh !important; /* Увеличенная высота */
    max-height: 120px !important;
  }
  
  .face-image {
    max-width: 70px !important; /* Увеличенное лицо */
    max-height: 70px !important;
  }
  
  .header-image {
    max-width: 160px !important; /* Увеличенные логотипы */
    max-height: 40px !important;
    font-weight: 500 !important; /* Умеренный font-weight для больших экранов */
  }
  
  .roulette {
    width: 55vw !important; /* Увеличено для лучшего использования пространства */
    height: 55vw !important;
    max-width: 500px !important;
    max-height: 500px !important;
  }
  
  /* Оптимизация креветок для больших экранов */
  .floating-emoji.shrimp {
    font-size: 50px !important; /* Полный размер */
    filter: drop-shadow(0 0 8px rgba(255, 235, 59, 0.4)) drop-shadow(0 0 16px rgba(255, 193, 7, 0.3)) !important;
  }
  
  /* Оптимизация миниигры для больших экранов */
  .minigame-container {
    padding: 30px !important;
    margin: 15px !important;
    max-height: 85vh !important;
    max-width: 85vw !important;
  }
  
  .minigame-container h2 {
    font-size: 30px !important;
    margin-bottom: 15px !important;
  }
  
  .minigame-container h3 {
    font-size: 22px !important;
    margin-bottom: 10px !important;
  }
  
  .minigame-container p {
    font-size: 17px !important;
    margin-bottom: 10px !important;
  }
  
  .fishing-bar {
    height: 320px !important;
  }
  
  .fishing-bar-container {
    margin: 20px 0 !important;
    padding: 15px !important;
  }
  
  .tap-button {
    width: clamp(100px, 20vw, 180px) !important;
    height: clamp(100px, 20vw, 180px) !important;
    font-size: clamp(16px, 4vw, 28px) !important;
    margin: 15px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .game-timer,
  .game-score {
    font-size: 18px !important;
    margin: 8px 0 !important;
  }
  
  .center-circle {
    width: 14vw !important; /* Увеличенный центр */
    height: 14vw !important;
    max-width: 120px !important;
    max-height: 120px !important;
  }
  
  .prize-text {
    font-size: clamp(12px, 2.2vw, 16px) !important; /* Увеличенный текст */
    width: 16vw !important;
    max-width: 130px !important;
  }
  
  .controls {
    width: 80vw !important;
    max-width: 400px !important; /* Увеличена максимальная ширина */
    margin: 3vh auto 0 auto !important; /* Увеличенные отступы */
    padding: 3vh 3vw !important; /* Увеличенные отступы */
    gap: 3vh !important; /* Увеличенные промежутки */
  }
  
  .roulette-container {
    margin: 3vh 0 4vh 0 !important; /* Увеличенные отступы */
  }
  
  input, button {
    padding: 3vh 3vw !important; /* Увеличенные отступы */
    font-size: clamp(16px, 2.5vw, 20px) !important; /* Увеличенный шрифт */
  }
}

.roulette-container {
  position: relative;
  margin: 2vh 0 3vh 0; /* Процентные отступы */
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  top: 5vh; /* Процентный отступ сверху */
}

.roulette {
  width: 60vw; /* Процентная ширина viewport */
  height: 60vw; /* Квадратная форма */
  max-width: 400px; /* Максимальный размер */
  max-height: 400px; /* Максимальный размер */
  min-width: 200px; /* Минимальный размер */
  min-height: 200px; /* Минимальный размер */
  border-radius: 50%;
  border: clamp(3px, 0.8vw, 10px) solid #12522D; /* Адаптивная толщина границы */
  position: relative;
  overflow: hidden;
  box-shadow: 0 2vh 4vh rgba(18, 82, 45, 0.4), 
              0 0.5vh 1.5vh rgba(0, 0, 0, 0.2),
              inset 0 0.2vh 0.8vh rgba(255, 255, 255, 0.5);
  background: #faf8f3;
  margin-bottom: -2.5vh; /* Процентный отступ снизу */
  z-index: 1;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  transform: rotate(0deg);
  transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: 1;
}

.segment {
  position: absolute;
  width: 50%;
  height: 50%;
  left: 50%;
  top: 0;
  transform-origin: bottom left;
  overflow: visible;
}

.segment::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  border-radius: 50%;
  box-sizing: border-box;
}

.segment span {
  /* Старый стиль - больше не используется */
  display: none;
}

.prize-text {
  position: absolute;
  font-size: clamp(9px, 2.5vw, 14px); /* Упрощенный адаптивный размер */
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 
    0.2vh 0.2vh 0.8vh rgba(0, 0, 0, 1),
    -0.1vh -0.1vh 0.4vh rgba(0, 0, 0, 0.9),
    0 0 1vh rgba(0, 0, 0, 0.8),
    0.3vh 0.3vh 0.3vh rgba(0, 0, 0, 0.7),
    0 0 1.5vh rgba(255, 255, 255, 0.3); /* Процентные тени */
  text-align: center;
  letter-spacing: 0.3px;
  -webkit-text-stroke: clamp(0.6px, 0.2vw, 1px) rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
  z-index: 50;
  pointer-events: none;
  width: 18vw; /* Процентная ширина viewport */
  max-width: 120px; /* Максимальная ширина */
  min-width: 70px; /* Минимальная ширина */
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  filter: contrast(1.2) brightness(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15vw; /* Процентная ширина viewport */
  height: 15vw; /* Квадратная форма */
  max-width: 120px; /* Максимальный размер */
  max-height: 120px; /* Максимальный размер */
  min-width: 50px; /* Минимальный размер */
  min-height: 50px; /* Минимальный размер */
  background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
  border-radius: 50%;
  border: clamp(2px, 0.6vw, 6px) solid #12522D; /* Адаптивная толщина границы */
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.6vh 1.6vh rgba(18, 82, 45, 0.4),
              inset 0 0.2vh 0.4vh rgba(255, 255, 255, 0.8);
  padding: clamp(3px, 1.2vw, 10px); /* Адаптивный padding */
}

.center-text {
  font-size: clamp(20px, 8vw, 45px); /* Адаптивный размер текста */
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.center-logo {
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.arrow {
  width: 0;
  height: 0;
  border-left: clamp(12px, 3vw, 25px) solid transparent; /* Адаптивная ширина */
  border-right: clamp(12px, 3vw, 25px) solid transparent; /* Адаптивная ширина */
  border-top: clamp(24px, 6vw, 50px) solid #ffffff !important; /* Адаптивная высота */
  position: absolute;
  top: -0.5vh; /* Процентный отступ сверху */
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  filter: drop-shadow(0 0.4vh 1.2vh rgba(0, 0, 0, 0.3));
  pointer-events: none;
  -webkit-filter: drop-shadow(0 0.4vh 1.2vh rgba(0, 0, 0, 0.3));
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh; /* Процентные отступы */
  background: rgba(255, 255, 255, 0.9);
  padding: 2vh 3vw; /* Процентные отступы */
  border-radius: 1.5vh; /* Процентный радиус */
  box-shadow: 0 0.8vh 2.4vh rgba(18, 82, 45, 0.15);
  border: clamp(1px, 0.3vw, 2px) solid rgba(18, 82, 45, 0.1);
  position: relative;
  z-index: 10;
  width: 90vw; /* Процентная ширина viewport */
  max-width: 400px; /* Максимальная ширина */
  margin: 2vh auto 0 auto; /* Процентные отступы */
  top: 5vh; /* Процентный отступ сверху */
}

input {
  padding: 1.2vh 2vw; /* Процентные отступы */
  font-size: clamp(14px, 3.5vw, 16px); /* Адаптивный размер шрифта */
  width: 100%;
  max-width: 100%;
  text-align: center;
  border: clamp(1px, 0.3vw, 2px) solid #12522D;
  border-radius: 1vh; /* Процентный радиус */
  background: #faf8f3;
  box-shadow: 0 0.4vh 1.2vh rgba(18, 82, 45, 0.1),
              inset 0 0.2vh 0.4vh rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  font-weight: 500;
  color: #333;
}

input::placeholder {
  color: #888;
}

input:focus {
  outline: none;
  border-color: #1a6d3f;
  box-shadow: 0 6px 16px rgba(18, 82, 45, 0.25),
              inset 0 2px 4px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f5f5f5;
  color: #999;
}

input:disabled::placeholder {
  color: #ccc;
}

button {
  padding: 1.2vh 3vw; /* Процентные отступы */
  background: linear-gradient(135deg, #12522D 0%, #1a6d3f 100%);
  color: #faf8f3;
  border: none;
  border-radius: 1vh; /* Процентный радиус */
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0.4vh 1.5vh rgba(18, 82, 45, 0.4);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(18, 82, 45, 0.5);
}

button:active {
  transform: translateY(-1px);
}

button:disabled {
  background: linear-gradient(135deg, #999 0%, #777 100%);
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

.result {
  font-size: clamp(18px, 4.5vw, 26px); /* Адаптивный размер шрифта */
  font-weight: 700;
  color: #12522D;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
  padding: clamp(15px, 4vw, 20px) clamp(20px, 6vw, 40px); /* Адаптивный padding */
  background: linear-gradient(135deg, rgba(18, 82, 45, 0.1) 0%, rgba(26, 109, 63, 0.1) 100%);
  border-radius: clamp(10px, 2.5vw, 15px); /* Адаптивный радиус */
  border: clamp(1px, 0.5vw, 2px) solid #12522D; /* Адаптивная граница */
  min-height: clamp(50px, 12vw, 70px); /* Адаптивная минимальная высота */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(18, 82, 45, 0.2);
  animation: resultAppear 0.5s ease;
  width: 100%; /* Занимает всю ширину контейнера */
  text-align: center;
}

@keyframes resultAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Анимация скрытия контролов */
@keyframes hideControls {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Анимация показа контролов */
@keyframes showControls {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Классы для анимации */
.controls.hidden {
  animation: hideControls 0.3s ease forwards;
  pointer-events: none;
  display: none;
}

.controls.visible {
  animation: showControls 0.5s ease forwards;
  pointer-events: auto;
}

.result.hidden {
  display: none !important;
}

.result.visible {
  display: flex !important;
  animation: resultAppear 0.6s ease forwards;
}

/* Промо-секция */
.promo-section {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: clamp(15px, 4vw, 25px);
  background: rgba(255, 255, 255, 0.9);
  padding: clamp(20px, 5vw, 30px) clamp(15px, 4vw, 25px);
  border-radius: clamp(12px, 3vw, 15px);
  box-shadow: 0 8px 24px rgba(18, 82, 45, 0.15);
  border: clamp(1px, 0.5vw, 2px) solid rgba(18, 82, 45, 0.1);
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: min(400px, 90vw);
  margin: clamp(15px, 4vw, 25px) auto 0 auto; /* Адаптивные отступы сверху */
  text-align: center;
  top: 40px;
}

.promo-section.show {
  display: flex;
  animation: showControls 0.5s ease forwards;
}

.promo-section.hide {
  animation: hideControls 0.3s ease forwards;
}

.promo-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(15px, 4vw, 25px);
  width: 100%;
}

.promo-title {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  color: #12522D;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.instagram-button {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 12px);
  background: linear-gradient(135deg, #E4405F 0%, #C13584 50%, #833AB4 100%);
  color: white;
  text-decoration: none;
  padding: clamp(12px, 3vw, 16px) clamp(20px, 5vw, 30px);
  border-radius: clamp(10px, 2.5vw, 15px);
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(196, 53, 132, 0.4);
  position: relative;
  overflow: hidden;
  width: 100%;
  justify-content: center;
}

.instagram-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.instagram-button:hover::before {
  left: 100%;
}

.instagram-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 53, 132, 0.6);
}

.instagram-button:active {
  transform: translateY(0);
}

.instagram-icon {
  width: clamp(20px, 5vw, 24px);
  height: clamp(20px, 5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.instagram-text {
  font-weight: 700;
  letter-spacing: 0.5px;
}




/* Модальное окно приза */
.prize-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.prize-modal.active {
  display: flex;
}

.prize-modal-content {
  background: linear-gradient(135deg, #12522D 0%, #1a6d3f 100%);
  padding: 40px;
  border-radius: 30px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.5s ease;
  position: relative;
}

.prize-modal-content h2 {
  color: #faf8f3;
  font-size: 42px;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.prize-emoji {
  font-size: 100px;
  margin: 20px 0;
  animation: bounce 1s ease infinite;
}

.prize-modal-content h3 {
  color: #ffeb3b;
  font-size: 32px;
  margin: 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.prize-description {
  color: #faf8f3;
  font-size: 18px;
  margin: 15px 0 25px 0;
  line-height: 1.6;
}

.secret-hint {
  margin-top: 30px;
  padding-top: 25px;
}

.hint-divider {
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffeb3b, transparent);
  margin: 0 auto 20px auto;
}

.hint-text {
  color: #faf8f3;
  font-size: 20px;
  margin: 0;
  animation: pulse 2s ease-in-out infinite;
}

.prize-close-btn {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
  color: #12522D;
  border: none;
  padding: 15px 40px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 235, 59, 0.4);
}

.prize-close-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 235, 59, 0.6);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Админ-панель */
.admin-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 20000;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.admin-panel.active {
  display: flex;
}

.admin-container {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 40px;
  border-radius: 20px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: slideIn 0.5s ease;
}

.admin-container h2 {
  color: #ffeb3b;
  font-size: 36px;
  margin: 0 0 30px 0;
  text-align: center;
  text-shadow: 0 0 20px rgba(255, 235, 59, 0.5);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 2px solid rgba(255, 235, 59, 0.3);
}

.stat-value {
  color: #ffeb3b;
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
}

.stat-label {
  color: #faf8f3;
  font-size: 14px;
  opacity: 0.8;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.admin-btn {
  padding: 15px 25px;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.admin-btn.danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.admin-btn.danger:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(231, 76, 60, 0.5);
}

.admin-btn.warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.admin-btn.warning:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(243, 156, 18, 0.5);
}

.admin-btn.critical {
  background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
  color: white;
}

.admin-btn.critical:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(142, 68, 173, 0.5);
}

.admin-btn.stress {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: white;
}

.admin-btn.stress:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(230, 126, 34, 0.5);
}

.admin-btn.stress:disabled {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

.admin-log {
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #2ecc71;
  margin-bottom: 20px;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.admin-log:empty::before {
  content: 'Логи появятся здесь...';
  color: #7f8c8d;
  font-style: italic;
}

.admin-log-entry {
  margin-bottom: 8px;
  padding: 5px;
  border-left: 3px solid #2ecc71;
  padding-left: 10px;
}

.admin-log-entry.error {
  border-left-color: #e74c3c;
  color: #e74c3c;
}

.admin-log-entry.warning {
  border-left-color: #f39c12;
  color: #f39c12;
}

.admin-close-btn {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.admin-close-btn:hover {
  background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  transform: scale(1.02);
}

/* Секция стресс-теста */
.stress-test-section {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 2px solid rgba(230, 126, 34, 0.3);
}

.stress-test-section h3 {
  color: #e67e22;
  font-size: 20px;
  margin: 0 0 15px 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(230, 126, 34, 0.5);
}

.stress-progress {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(230, 126, 34, 0.3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e67e22 0%, #d35400 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

.progress-text {
  text-align: center;
  color: #faf8f3;
  font-weight: 700;
  font-size: 16px;
}

.stress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stress-stats .stat-item {
  text-align: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stress-stats .stat-label {
  display: block;
  color: #b0b0b0;
  font-size: 12px;
  margin-bottom: 5px;
}

.stress-stats .stat-value {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #faf8f3;
}

.stress-stats .stat-value.success {
  color: #2ecc71;
  text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.stress-stats .stat-value.error {
  color: #e74c3c;
  text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

/* Секретная миниигра */
.minigame-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.5s ease;
}

.minigame-overlay.active {
  display: flex;
}

.minigame-container {
  background: linear-gradient(135deg, #12522D 0%, #1a6d3f 100%);
  border-radius: 20px; /* Уменьшенный радиус */
  padding: 25px; /* Уменьшенный padding */
  max-width: 500px; /* Уменьшенная максимальная ширина */
  width: 95%; /* Увеличиваем ширину для лучшего использования пространства */
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.5s ease;
  position: relative;
  /* Строго ограничиваем размеры */
  max-height: 85vh; /* Уменьшенная максимальная высота */
  overflow-y: auto;
  margin: 10px; /* Уменьшенные отступы */
  /* Дополнительные ограничения */
  box-sizing: border-box;
}

.minigame-container h2 {
  color: #faf8f3;
  font-size: 32px; /* Уменьшенный размер */
  margin-bottom: 15px; /* Уменьшенный отступ */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.minigame-container h3 {
  color: #faf8f3;
  font-size: 22px; /* Уменьшенный размер */
  margin-bottom: 10px; /* Уменьшенный отступ */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.minigame-container p {
  color: #e8dfc7;
  font-size: 16px; /* Уменьшенный размер */
  margin-bottom: 10px; /* Уменьшенный отступ */
  line-height: 1.4; /* Уменьшенная высота строки */
}

.minigame-emoji {
  font-size: 80px; /* Уменьшенный размер */
  margin: 20px 0; /* Уменьшенный отступ */
  animation: bounce 1s ease infinite;
}

.minigame-button {
  background: #faf8f3;
  color: #12522D;
  border: none;
  padding: 12px 30px; /* Уменьшенный padding */
  font-size: 16px; /* Уменьшенный шрифт */
  font-weight: 700;
  border-radius: 12px; /* Уменьшенный радиус */
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 8px; /* Уменьшенный отступ */
}

.minigame-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.minigame-close {
  background: rgba(255, 255, 255, 0.2);
  color: #faf8f3;
  border: 2px solid #faf8f3;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px;
}

.minigame-close:hover {
  background: #faf8f3;
  color: #12522D;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Игровые элементы */
.game-screen {
  width: 100%;
}

.game-timer,
.game-score {
  color: #faf8f3;
  font-size: 18px; /* Уменьшенный размер */
  font-weight: 700;
  margin: 8px 0; /* Уменьшенный отступ */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-timer span,
.game-score span {
  color: #ffeb3b;
}

.fishing-bar-container {
  margin: 20px 0; /* Уменьшенный отступ */
  padding: 15px; /* Уменьшенный padding */
}

.fishing-bar {
  position: relative;
  width: 100%;
  height: 300px; /* Уменьшенная высота */
  background: linear-gradient(180deg, #0a3d62 0%, #1e5f8c 50%, #2980b9 100%);
  border-radius: 15px; /* Уменьшенный радиус */
  border: 3px solid #faf8f3; /* Уменьшенная граница */
  overflow: hidden;
  box-shadow: inset 0 3px 15px rgba(0, 0, 0, 0.3);
}

.fishing-zone {
  position: absolute;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(76, 175, 80, 0.4);
  border: 3px dashed #4caf50;
  transition: top 0.3s ease;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

.fishing-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: top 0.05s linear;
}

.tap-button {
  width: clamp(100px, 20vw, 180px); /* Уменьшенный размер */
  height: clamp(100px, 20vw, 180px); /* Уменьшенный размер */
  border-radius: 50%;
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
  border: clamp(2px, 0.8vw, 5px) solid #faf8f3; /* Уменьшенная граница */
  font-size: clamp(16px, 4vw, 28px); /* Уменьшенный шрифт */
  font-weight: 900;
  color: #12522D;
  cursor: pointer;
  /* УБИРАЕМ ЗАДЕРЖКУ - мгновенный отклик */
  transition: none;
  margin: 15px auto; /* Центрирование кнопки */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  /* Оптимизация для мобильных */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  /* Идеальное центрирование кнопки */
  text-align: center;
}

.tap-button:active {
  transform: scale(0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  /* Мгновенный отклик без задержки */
  transition: none;
}

.game-hint {
  color: #e8dfc7;
  font-size: 18px;
  margin-top: 15px;
}

.game-final-score {
  margin: 30px 0;
}

.game-final-score h1 {
  font-size: 80px;
  color: #ffeb3b;
  margin: 10px 0;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
}

/* Лидерборд */
.leaderboard {
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 2px solid rgba(255, 235, 59, 0.3);
}

.leaderboard h3 {
  color: #ffeb3b;
  font-size: 24px;
  margin: 0 0 20px 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
}

.leaderboard-list {
  max-height: 200px;
  overflow-y: auto;
  /* Красивый скроллбар для лидерборда */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 235, 59, 0.5) rgba(255, 255, 255, 0.1);
}

/* Стилизация скроллбара для WebKit браузеров */
.leaderboard-list::-webkit-scrollbar {
  width: 8px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(255, 235, 59, 0.5);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 235, 59, 0.7);
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border-left: 4px solid #ffeb3b;
  transition: all 0.3s ease;
}



.leaderboard-item.current-player {
  background: rgba(255, 235, 59, 0.2);
  border-left-color: #4caf50;
  box-shadow: 0 0 15px rgba(255, 235, 59, 0.3);
}

.leaderboard-item .rank {
  font-size: 20px;
  font-weight: 900;
  color: #ffeb3b;
  min-width: 30px;
}

.leaderboard-item .rank.first {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.leaderboard-item .rank.second {
  color: #c0c0c0;
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.leaderboard-item .rank.third {
  color: #cd7f32;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.leaderboard-item .player-info {
  flex: 1;
  margin: 0 15px;
}



.leaderboard-item .player-instagram {
  color: #faf8f3;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

/* Кликабельные Instagram ники */
.leaderboard-item .player-instagram.clickable-instagram {
  cursor: pointer;
  color: #d7e2d7;
  text-decoration: underline;
  transition: all 0.3s ease;
  position: relative;
}

.leaderboard-item .player-instagram.clickable-instagram:hover {
  color: #66bb6a;
  text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
  transform: translateX(2px);
}

.leaderboard-item .player-instagram.clickable-instagram:active {
  color: #388e3c;
  transform: translateX(1px);
}

.leaderboard-item .score {
  font-size: 20px;
  font-weight: 900;
  color: #4caf50;
  text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.loading {
  text-align: center;
  color: #b0b0b0;
  font-style: italic;
  padding: 20px;
}

.game-final-score p {
  color: #faf8f3;
  font-size: 24px;
  margin: 5px 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}





