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

:root {
  /* Единые отступы (минималистичная сетка) */
  --page-gutter: max(12px, env(safe-area-inset-left, 0px));
  --page-gutter-right: max(12px, env(safe-area-inset-right, 0px));
  --sheet-radius: 16px;
  --color-border-subtle: rgba(18, 82, 45, 0.08);

  /* До конца приветствия — только отступ под вырез (шапки с лого больше нет после интро) */
  --layout-header-h: calc(env(safe-area-inset-top, 0px) + 10px);

  --welcome-pass-duration: 3.2s;
  /*
   * Рулетка — круг (квадрат по размеру): максимум места.
   * Ширина: весь экран минус вырезы и по 2px с каждого края.
   * Высота: то же число пикселей (круг), но не больше места под шапкой и нижней зоной.
   */
  --wheel-edge: 2px;
  --wheel-max-w: calc(
    100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) -
      2 * var(--wheel-edge)
  );
  /* Одна полоса снизу: панель, стрелка «над» кругом (запас внутри формулы), safe-area */
  --wheel-bottom-band: calc(
    env(safe-area-inset-bottom, 0px) + clamp(96px, 25vmin, 172px)
  );
  --wheel-max-h: calc(100svh - var(--layout-header-h) - var(--wheel-bottom-band));
  --wheel-size: min(var(--wheel-max-w), var(--wheel-max-h));
}

/* Убираем лишнее пространство на всех элементах */
html {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

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: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  width: 100%;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  max-height: 100svh;
  overflow-x: hidden;
  /* Высота фиксированного хедера уже включает отступ под вырез через его padding-top */
  padding-top: var(--layout-header-h);
  padding-bottom: 0;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  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: default;
  pointer-events: none;
  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: none;
}

/* Создаем большую невидимую область клика вокруг креветки */
.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.5 !important;
  transform: none !important;
  filter: none !important;
}

/* При активном касании - яркий эффект */
.floating-emoji.shrimp:active {
  opacity: 0.5 !important;
  filter: none !important;
  transform: none !important;
  z-index: 1 !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;
  }
}

/* Полноэкранное приветствие: логотипы проезжают, лицо в центре; затем фон гаснет */
@keyframes welcomeLogoPassLTR {
  0% {
    transform: translate(-50%, 0) translateX(-118vw);
  }
  30% {
    transform: translate(-50%, 0) translateX(-16vw);
  }
  50% {
    transform: translate(-50%, 0) translateX(0);
  }
  68% {
    transform: translate(-50%, 0) translateX(16vw);
  }
  100% {
    transform: translate(-50%, 0) translateX(118vw);
  }
}

@keyframes welcomeLogoPassRTL {
  0% {
    transform: translate(-50%, 0) translateX(118vw);
  }
  30% {
    transform: translate(-50%, 0) translateX(16vw);
  }
  50% {
    transform: translate(-50%, 0) translateX(0);
  }
  68% {
    transform: translate(-50%, 0) translateX(-16vw);
  }
  100% {
    transform: translate(-50%, 0) translateX(-118vw);
  }
}

@keyframes welcomeFaceReveal {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  14% {
    opacity: 0;
    transform: scale(0.9);
  }
  38% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@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); }
}

.welcome-intro {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.welcome-intro.welcome-intro--hidden {
  visibility: hidden;
  pointer-events: none;
}

.lang-switcher {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 9000;
  padding: 2px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72));
  border: 1px solid rgba(18, 82, 45, 0.14);
  box-shadow:
    0 8px 22px rgba(18, 82, 45, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lang-switcher__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-switcher__select {
  min-width: 118px;
  height: 38px;
  padding: 0 34px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(18, 82, 45, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 248, 0.94));
  color: #12522d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 4px 10px rgba(18, 82, 45, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #12522d 50%),
    linear-gradient(135deg, #12522d 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 12px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.16s ease;
}

.lang-switcher__select:hover {
  border-color: rgba(18, 82, 45, 0.34);
  box-shadow:
    0 6px 14px rgba(18, 82, 45, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.lang-switcher__select:focus {
  outline: none;
  border-color: #12522d;
  box-shadow:
    0 0 0 3px rgba(18, 82, 45, 0.16),
    0 6px 14px rgba(18, 82, 45, 0.2);
}

.welcome-intro__backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f5f1e8 0%, #e8dfc7 100%);
  opacity: 1;
  transition: opacity 0.48s cubic-bezier(0.33, 0.02, 0.22, 1);
}

.welcome-intro--exit .welcome-intro__backdrop {
  opacity: 0;
}

.welcome-intro__stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100svh;
  overflow: hidden;
}

.welcome-intro__track {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  will-change: transform;
}

.welcome-intro__track--top {
  top: clamp(16%, 26svh, 36%);
  transform: translate(-50%, 0) translateX(-118vw);
}

.welcome-intro__track--bottom {
  bottom: clamp(16%, 26svh, 36%);
  transform: translate(-50%, 0) translateX(118vw);
}

.welcome-intro__logo-img {
  max-width: min(38vw, 176px);
  max-height: min(9svh, 52px);
  min-width: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: none;
  pointer-events: none;
}

.welcome-intro__face {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.welcome-intro__face-img {
  width: auto;
  height: auto;
  max-width: min(46vw, 200px);
  max-height: min(22svh, 140px);
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  object-fit: contain;
  opacity: 0;
}

.welcome-intro--playing .welcome-intro__track--top {
  animation: welcomeLogoPassLTR var(--welcome-pass-duration) linear forwards;
}

.welcome-intro--playing .welcome-intro__track--bottom {
  animation: welcomeLogoPassRTL var(--welcome-pass-duration) linear forwards;
}

.welcome-intro--playing .welcome-intro__face-img {
  animation: welcomeFaceReveal var(--welcome-pass-duration) ease forwards;
}

/* Интро — одна и та же анимация для всех: не сжимаем keyframes при prefers-reduced-motion */

/* До tablet/desktop: колесо по центру стадии, панель снизу */
@media (max-width: 767px) {
  :root {
    --wheel-bottom-band: calc(
      env(safe-area-inset-bottom, 0px) + clamp(88px, 24vmin, 158px)
    );
  }

  body {
    padding-top: var(--layout-header-h) !important;
    padding-bottom: 0 !important;
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter-right) !important;
    align-items: stretch;
    justify-content: flex-start;
  }

  .roulette-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: env(safe-area-inset-left, 0px) !important;
    padding-right: env(safe-area-inset-right, 0px) !important;
    padding-top: clamp(4px, 1vmin, 10px);
    padding-bottom: clamp(2px, 0.6vmin, 8px);
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .controls {
    flex-shrink: 0;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    padding: 8px var(--page-gutter-right) calc(14px + env(safe-area-inset-bottom)) var(--page-gutter) !important;
    gap: 8px !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    top: auto !important;
  }

  .controls.controls--embedded-code {
    gap: 10px !important;
    padding-top: 8px !important;
    padding-bottom: calc(22px + env(safe-area-inset-bottom)) !important;
  }

  input:not(.access-input),
  button:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn) {
    padding: 1.25vh 3vw !important;
    font-size: clamp(14px, 4vw, 17px) !important;
  }

  .center-circle {
    width: min(18vw, 82px) !important;
    height: min(18vw, 82px) !important;
    min-width: 52px !important;
    min-height: 52px !important;
  }

  .prize-text {
    font-size: var(--prize-font-size, 12px) !important;
    letter-spacing: 0.035em !important;
  }

  .floating-emoji.shrimp {
    font-size: 42px !important;
    filter: drop-shadow(0 0 6px rgba(255, 235, 59, 0.65)) drop-shadow(0 0 11px rgba(255, 193, 7, 0.65)) !important;
  }

  .minigame-container {
    padding: 14px !important;
    margin: 8px auto !important;
    max-height: 94vh !important;
    border-radius: 14px !important;
    max-width: min(96vw, 520px) !important;
  }

  .leaderboard {
    margin: 11px 0 !important;
    padding: 10px !important;
    max-height: 34vh !important;
  }

  .leaderboard h3 {
    font-size: clamp(17px, 4.3vw, 21px) !important;
    margin: 0 0 9px !important;
  }

  .leaderboard-item {
    padding: 8px 11px !important;
    margin: 5px 0 !important;
  }

  .leaderboard-item .rank {
    font-size: 16px !important;
    min-width: 23px !important;
  }

  .leaderboard-item .player-instagram {
    font-size: 13px !important;
  }

  .leaderboard-item .score {
    font-size: 16px !important;
  }

  .minigame-container h2 {
    font-size: clamp(19px, 5vw, 26px) !important;
    margin-bottom: 7px !important;
  }

  .minigame-container h3 {
    font-size: clamp(15px, 3.9vw, 19px) !important;
    margin-bottom: 6px !important;
  }

  .minigame-container p {
    font-size: clamp(13px, 3.4vw, 15px) !important;
    margin-bottom: 6px !important;
  }

  .minigame-emoji {
    font-size: 52px !important;
    margin: 10px 0 !important;
  }

  .fishing-bar {
    height: clamp(205px, 40vh, 265px) !important;
  }

  .fishing-bar-container {
    margin: 9px 0 !important;
    padding: 7px !important;
  }

  .tap-button {
    width: clamp(74px, 16vw, 126px) !important;
    height: clamp(74px, 16vw, 126px) !important;
    font-size: clamp(11px, 3.3vw, 17px) !important;
    margin: 7px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .game-timer,
  .game-score {
    font-size: 14px !important;
    margin: 4px 0 !important;
  }

  .prize-modal-content {
    padding: 22px 18px !important;
    border-radius: 18px !important;
    width: min(92vw, 420px) !important;
    margin: 0 auto !important;
  }

  .prize-modal-content h2 {
    font-size: clamp(26px, 7vw, 34px) !important;
    margin: 0 0 10px !important;
  }

  .prize-emoji {
    font-size: 62px !important;
    margin: 10px 0 !important;
  }

  .prize-modal-content h3 {
    font-size: clamp(18px, 5.2vw, 26px) !important;
    margin: 10px 0 !important;
  }

  .prize-description {
    font-size: 14px !important;
    margin: 8px 0 14px !important;
    line-height: 1.45 !important;
  }

  .secret-hint.secret-hint--visible {
    margin-top: 16px !important;
    padding-top: 12px !important;
  }

  .hint-text {
    font-size: 14px !important;
  }

  .prize-close-btn {
    padding: 11px 26px !important;
    font-size: 16px !important;
    margin-top: 16px !important;
    width: 100%;
    max-width: 260px;
  }

  .result {
    padding: clamp(8px, 2.5vw, 14px) clamp(12px, 3.5vw, 20px) !important;
    min-height: clamp(40px, 10vw, 52px) !important;
    font-size: clamp(15px, 4vw, 22px) !important;
  }

  @media (max-width: 380px) {
    :root {
      --wheel-bottom-band: calc(
        env(safe-area-inset-bottom, 0px) + clamp(82px, 22vmin, 142px)
      );
    }
  }
}

/* Низкая высота окна — ужимаем низ, колесо считается от оставшегося места */
@media (max-height: 640px) {
  :root {
    --wheel-bottom-band: calc(
      env(safe-area-inset-bottom, 0px) + clamp(76px, 21vmin, 132px)
    );
  }
}

@media (max-height: 640px) and (max-width: 767px) {
  .access-shell__track {
    height: 48px;
  }
}

/* От 768px — десктоп / крупный планшет */
@media (min-width: 768px) {
  :root {
    --wheel-bottom-band: calc(
      env(safe-area-inset-bottom, 0px) + clamp(102px, 24vmin, 178px)
    );
  }

  body {
    padding-top: var(--layout-header-h) !important;
    padding-bottom: 0 !important;
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter-right) !important;
    align-items: stretch;
  }

  /* Оптимизация креветок для больших экранов */
  .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;
  }
  
  /* Адаптивный лидерборд для больших экранов */
  .leaderboard {
    margin: 20px 0 !important;
    padding: 18px !important;
    max-height: 40vh !important;
  }
  
  .leaderboard h3 {
    font-size: 24px !important;
    margin: 0 0 18px 0 !important;
  }
  
  .leaderboard-item {
    padding: 12px 16px !important;
    margin: 8px 0 !important;
  }
  
  .leaderboard-item .rank {
    font-size: 20px !important;
    min-width: 30px !important;
  }
  
  .leaderboard-item .player-instagram {
    font-size: 16px !important;
  }
  
  .leaderboard-item .score {
    font-size: 20px !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: var(--prize-font-size, 12px) !important;
  }
  
  .roulette-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: env(safe-area-inset-left, 0px) !important;
    padding-right: env(safe-area-inset-right, 0px) !important;
    padding-top: clamp(8px, 1.5svh, 16px);
    padding-bottom: clamp(8px, 1.5svh, 16px);
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
  }

  .controls {
    flex-shrink: 0;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    padding: 12px var(--page-gutter-right) calc(26px + env(safe-area-inset-bottom)) var(--page-gutter) !important;
    gap: 14px !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    top: auto !important;
  }

  input:not(.access-input),
  button:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn) {
    padding: 2.35vh 3vw !important;
    font-size: clamp(16px, 2.5vw, 20px) !important;
  }
}

.roulette-container {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  /* Full-bleed: рулетка на всю ширину экрана, поля только под вырезы */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-sizing: border-box;
}

.roulette {
  width: var(--wheel-size);
  height: var(--wheel-size);
  max-width: 100%;
  max-height: 100%;
  min-width: min(148px, 72vmin);
  min-height: min(148px, 72vmin);
  flex-shrink: 0;
  border-radius: 50%;
  border: clamp(3px, 0.8vw, 10px) solid #12522D; /* Адаптивная толщина границы */
  position: relative;
  /* overflow:hidden + transform у потомков даёт баг обрезки половины колеса в части браузеров */
  overflow: visible;
  -webkit-clip-path: circle(49.5% at 50% 50%);
  clip-path: circle(49.5% at 50% 50%);
  box-shadow: 0 12px 32px rgba(18, 82, 45, 0.22),
              0 4px 12px rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.45);
  background: #faf8f3;
  margin-bottom: 0;
  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;
  overflow: visible;
  /* Отдельный слой композиции — меньше артефактов клипа при clip-path у родителя */
  isolation: isolate;
}

.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;
  margin: 0;
  padding: 0 2px;
  font-size: var(--prize-font-size, 12px);
  font-weight: 900;
  color: #ffffff !important;
  
  text-align: center;
  text-wrap: balance;
  letter-spacing: 0.03em;
  -webkit-text-stroke: max(0.45px, 0.05em) rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
  writing-mode: horizontal-tb;
  white-space: normal;
  /* До двух слов / двух строк — только перенос по пробелам, без разрыва слов */
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  z-index: 50;
  pointer-events: none;
  box-sizing: border-box;
  line-height: 1.18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.prize-text--font-measure {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 0;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-wrap: unset;
}

.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 */
  overflow: visible; /* лицо может выступать за круг хаба */
}

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

/* Одно лицо бренда: после интро переносится в хаб (см. brandFaceImg в script.js) */
/* +40% к прежним 80% → 112%: крупнее круг хаба, слегка перекрывает колесо */
.center-circle #brandFaceImg {
  width: 112%;
  height: 112%;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain;
  background: none;
  background-color: transparent;
  filter: none;
  -webkit-filter: none;
  border-radius: 50%;
  opacity: 1;
  pointer-events: none;
}

#brandFaceImg.brand-face--shake-once {
  animation: faceShake 1.5s ease-in-out 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  #brandFaceImg.brand-face--shake-once {
    animation: none;
  }
}

/* Стрелка привязана к верху колеса (.roulette), не к контейнеру со свободным местом сверху */
.roulette .arrow {
  width: 0;
  height: 0;
  border-left: clamp(11px, 2.8vw, 22px) solid transparent;
  border-right: clamp(11px, 2.8vw, 22px) solid transparent;
  border-top: clamp(18px, 4.8vw, 40px) solid #ffffff !important;
  position: absolute;
  left: 50%;
  top: clamp(-30px, -4vmin, -12px);
  transform: translateX(-50%);
  z-index: 180;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
  pointer-events: none;
  -webkit-filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

/* Плавающая панель: код → кнопка «Крутить» */
.controls.controls--embedded-code .access-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.controls.controls--embedded-code .access-shell__track {
  box-shadow: 0 8px 28px rgba(18, 82, 45, 0.14);
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: 0;
  align-self: stretch;
  gap: 12px;
  width: 100%;
  max-width: none;
  background: transparent;
  padding: 12px var(--page-gutter-right) calc(22px + env(safe-area-inset-bottom)) var(--page-gutter);
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 50;
  top: auto;
  box-sizing: border-box;
}

.controls .result {
  width: min(460px, 100%);
  max-width: 460px;
}

.access-shell {
  width: min(440px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 10px 28px rgba(18, 82, 45, 0.12));
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
  overflow: visible;
  transition:
    opacity 0.4s cubic-bezier(0.33, 0.02, 0.22, 1),
    transform 0.45s cubic-bezier(0.34, 1.15, 0.64, 1),
    max-height 0.48s cubic-bezier(0.33, 0.02, 0.22, 1),
    margin 0.35s ease,
    filter 0.35s ease;
}

.access-shell__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.access-shell__track {
  position: relative;
  height: 52px;
  width: 100%;
  border-radius: 999px;
}

.access-input,
.access-spin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  border-radius: 999px;
  transition:
    opacity 0.38s ease,
    transform 0.42s cubic-bezier(0.34, 1.15, 0.64, 1),
    box-shadow 0.28s ease,
    border-color 0.25s ease;
}

.access-input {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  padding: 0 1.35rem;
  text-align: center;
  /* ≥16px — iOS не увеличивает страницу при фокусе на инпуте */
  font-size: clamp(16px, 3.9vw, 17px);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #1a2e22;
  background: #ffffff;
  border: 1.5px solid rgba(18, 82, 45, 0.22);
  box-shadow: 0 4px 14px rgba(18, 82, 45, 0.07);
}

.access-input::placeholder {
  color: #8b9a90;
  font-weight: 500;
  letter-spacing: normal;
}

.access-input:focus {
  outline: none;
  border-color: #12522d;
  box-shadow:
    0 0 0 3px rgba(18, 82, 45, 0.14),
    0 8px 22px rgba(18, 82, 45, 0.1);
}

.access-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f4f6f4;
  color: #7a8580;
}

.access-spin {
  z-index: 1;
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fafcf9;
  background: linear-gradient(145deg, #0f5a30 0%, #178a4a 42%, #12522d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 26px rgba(18, 82, 45, 0.38);
}

.access-spin::before {
  display: none !important;
}

.access-spin:hover:not(:disabled) {
  transform: scale(1);
  filter: brightness(1.05);
}

.access-spin:active:not(:disabled) {
  transform: scale(0.98);
}

.access-spin:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.15);
}

.access-shell--ready .access-input {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  z-index: 1;
}

.access-shell--ready .access-spin:not(:disabled) {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}

.access-shell--ready .access-spin:disabled {
  opacity: 0.45;
}

.access-shell--checking .access-input:not(:disabled) {
  opacity: 0.72;
}

.access-feedback {
  margin: 10px 6px 0;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(26, 46, 34, 0.75);
  text-align: center;
  max-width: 36rem;
}

.access-feedback--error {
  color: #b83226;
}

input:not(.access-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:not(.access-input)::placeholder {
  color: #888;
}

input:not(.access-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:not(.access-input):disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f5f5f5;
  color: #999;
}

input:not(.access-input):disabled::placeholder {
  color: #ccc;
}

button:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn) {
  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:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn)::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:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn):hover::before {
  left: 100%;
}

button:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(18, 82, 45, 0.5);
}

button:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn):active {
  transform: translateY(-1px);
}

button:not(.access-spin):not(.tap-button):not(.minigame-button):not(.minigame-close):not(.prize-close-btn):not(.admin-close-btn):not(.admin-btn):not(.promo-help-btn):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);
  width: 100%; /* Занимает всю ширину контейнера */
  text-align: center;
  transition:
    opacity 0.4s cubic-bezier(0.33, 0.02, 0.22, 1),
    transform 0.45s cubic-bezier(0.34, 1.15, 0.64, 1),
    max-height 0.45s ease,
    margin 0.35s ease,
    padding 0.35s ease,
    border-color 0.3s ease,
    box-shadow 0.35s ease;
}

@keyframes resultAppear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(14px);
  }
  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 {
  gap: 0;
  transition: gap 0.35s ease;
}

.controls.hidden .access-shell {
  opacity: 0;
  transform: translateY(-12px);
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(18, 82, 45, 0));
}

.controls.visible {
  pointer-events: auto;
}

.result.hidden {
  display: none !important;
  pointer-events: none;
}

.result.visible {
  display: flex !important;
  animation: resultAppear 0.55s cubic-bezier(0.34, 1.15, 0.64, 1) 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: flex;
  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;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.38s cubic-bezier(0.33, 0.02, 0.22, 1),
    visibility 0.38s linear;
}

.prize-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.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);
  position: relative;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition:
    opacity 0.4s cubic-bezier(0.33, 0.02, 0.22, 1),
    transform 0.48s cubic-bezier(0.34, 1.15, 0.64, 1);
}

.prize-modal.active .prize-modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.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);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  line-height: 1.35;
  max-height: 40vh;
  overflow-y: auto;
}

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

.secret-hint {
  margin-top: 30px;
  padding-top: 25px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  transition:
    opacity 0.45s ease,
    max-height 0.5s cubic-bezier(0.33, 0.02, 0.22, 1),
    margin-top 0.4s ease,
    padding-top 0.4s ease;
}

.secret-hint.secret-hint--visible {
  max-height: 280px;
  opacity: 1;
  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);
}

/* Кнопка «условия акции» и иконка в модалке */
.promo-help-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 9000;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #12522d;
  background: linear-gradient(145deg, #ffeb3b 0%, #ffc107 100%);
  box-shadow:
    0 4px 14px rgba(18, 82, 45, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-help-btn:hover {
  transform: scale(1.06);
  box-shadow:
    0 6px 20px rgba(255, 193, 7, 0.45),
    0 3px 10px rgba(18, 82, 45, 0.25);
}

.promo-help-btn:active {
  transform: scale(0.97);
}

.promo-help-btn__icon {
  width: 26px;
  height: 26px;
  display: block;
}

.promo-help-icon {
  width: 88px;
  height: 88px;
  margin: 20px auto;
  color: #ffeb3b;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.35));
  animation: bounce 1s ease infinite;
}

.promo-help-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.prize-modal-content .prize-description strong {
  color: #ffeb3b;
  font-weight: 700;
}

@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: 20px 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 2px solid rgba(255, 235, 59, 0.3);
  /* Ограничиваем высоту лидерборда */
  max-height: 40vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.leaderboard h3 {
  color: #ffeb3b;
  font-size: 24px;
  margin: 0 0 15px 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
  /* Заголовок не сжимается */
  flex-shrink: 0;
}

.leaderboard-list {
  /* Убираем фиксированную высоту, используем flex для адаптивности */
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* Важно для flex-элементов */
  /* Красивый скроллбар для лидерборда */
  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);
  }
}





