
@font-face {
  font-family: 'ComfortaaDigits';
  src: url('https://raw.githubusercontent.com/google/fonts/main/ofl/comfortaa/Comfortaa%5Bwght%5D.ttf') format('truetype');
  font-display: swap;
  unicode-range: U+0030-0039; /* digits */
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100svh;
  width: 100%;
  font-size: 1rem;
  font-family: 'ComfortaaDigits', 'Montserrat Alternates', sans-serif;
  letter-spacing: -0.5px;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
  touch-action: none !important;
  overflow-x: hidden;
}

input,
button,
select,
textarea {
  font-family: inherit;
}

*:focus {
  outline: none;
}

#boat,
#cannon,
#projectile,
img,
button {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

:root {
  --color-blue: #3390ec;
  --color-cream: #ffedca;
  --color-yellow: #ffd700; /* rgb(233, 216, 26) */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-green: #28a745;
}

a {
  text-decoration: none;
}

li {
  list-style-type: none;
}

@media screen and (orientation: landscape) {
  body::before {
    content: "Please rotate your device back";
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    text-align: center;
  }

  .main-content, .game-container {
    display: none !important;
  }
}



canvas {
  touch-action: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

h1 {
  color: var(--color-white);
  text-align: center;
  margin: 0 auto;
  font-size: 1.125rem;
}

p {
  padding: 0;
  margin: 0;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header img {
  width: 50px;
  height: 50px;
}


.header.main_body {
  background-image: url(./assets/bgmaintop.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.header.top_body {
  background-image: url(./assets/bgmaintop.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


.main_content h1 {
  color: #2A2A40;
  background-color: #f2e083;
  width: 80%;
  margin: 50px auto 20px;
  opacity: 0.7;
  border-radius: 15px;
}

.modal-stats {
  font-size: 14px;
}

.modal-how {
  font-size: 14px;
}

/* hello image */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.88); /* затемнение 85% */
  display: none;
  justify-content: center;
  /* align-items: center; */
  z-index: 9998;
}

.language-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 25px;

}

.language-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: black;
  padding: 20px;
  border-radius: 20px;
}

.language-title {
  color: white;
  margin-bottom: 15px;
  font-size: 1.25rem;
}

.language-buttons {
  display: flex;
  gap: 10px;
}

#lang-en-btn,
#lang-ru-btn {
  background-color: black;
  color: white;
  border: 2px solid white;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
}

.welcome-image {
  width: 95%;
  max-width: 500px;
  height: auto;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.button-wrapper {
  width: 95%;
  background-color: #423A27;
  display: flex;
  justify-content: center;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

#welcome-ok-btn, #exchange-info-ok-btn, #shop-info-ok-btn, #crash-info-ok-btn, #wheel-info-ok-btn, #ship-info-ok-btn, #hunt-info-ok-btn, #games-info-ok-btn, #leaderboard-info-ok-btn, #referral-info-ok-btn {
  background-color: #7f4d1f;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Top bar */

.top-bar {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  border-radius: 12px;
  margin: 10px auto;
  color: #fff;
  width: 85%;
  /* font-family: 'Trebuchet MS', sans-serif; */
  text-shadow: 1px 1px 1px #000;
  padding: 10px;
}

/* .top-bar.main {
  justify-content: space-between;
} */




.plus-one {
  position: absolute;
  font-size: 2rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 5px rgba(0,0,0,0.4);
  pointer-events: none;
  user-select: none;
  animation: float-up 1s ease-out forwards;
  z-index: 9998;
}

@keyframes float-up {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translate(-5px, -20px) scale(1.3);
  }
  100% {
    transform: translate(0, -60px) scale(0.9);
    opacity: 0;
  }
}

.multiplier-container,
.tokens-container,
.clicks-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
  flex: 1; /* prevent layout shifts when numbers change */
}

.multiplier-value {
  display: flex;
  align-items: center;
  gap: 4px;
}

.label {
 font-size: 0.82rem;
  font-weight: bold;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  color: var(--color-cream);
}

.multiplier.topbar_text,
.score.topbar_text,
.clicks.topbar_text,
#usd-balance {
  color: var(--color-yellow);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  padding-top: 1px;
  text-align: center;
}

.top-bar img {
  width: 45px;
  height: 40px;
  vertical-align: middle;
  margin-bottom: 2px;
}


/* Nav */

.hidden-nav {
  display: none !important;
}

.navigation {
  display: flex;
  justify-content: center;
}

.bottom-nav {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: fixed;
  bottom: 0;
  width: 100%; /* чуть шире для маленьких телефонов */
  gap: 5px;
  z-index: 100;
  pointer-events: auto;
  backdrop-filter: blur(2px);
  padding-inline: 10px;
  box-sizing: border-box;
}

.bottom-nav a {
  touch-action: manipulation;
  cursor: pointer;
}




.nav-item {
  position: relative;
  background: #7f4d1f;
  border-radius: 12px;
  overflow: visible;
  flex: 1 1 18%; /* ширина гибкая, но около 18% */
  margin-bottom: 20px;
  box-shadow: 0 -4px 12px rgba(109, 98, 25, 0.3);
}

.nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 5px;
  color: #fff;
  text-decoration: none;
 font-size: 0.75rem;
  font-weight: bold;
  text-shadow: 1px 1px 1px #000;
}

.nav-item a img {
  width: 48px; /* чуть меньше чтобы всё влезало */
  height: 48px;
  margin-top: -25px;
  position: relative;
  z-index: 2;
}

.notify-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 13px;
  height: 13px;
  background: var(--color-yellow);
  border-radius: 50%;
  pointer-events: none;
  animation: blink 1.5s infinite;
  display: none;
  z-index: 3;
}

.notify-dot.show {
  display: block;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50%, 100% { opacity: 0; }
}


.nav-item.shop_item img {
  height: 53px;
  bottom: -6px;
}

.nav-item.shop_item a {
  padding-top: 0;
}

.nav-item a.active {
  background-color: #553518;

  border-radius: 12px;
}

.nav-item a span {
  margin: 2px auto 5px;
 font-size: 0.7rem;
}

#admin-link {
  position: relative;
  border-radius: 12px;
  overflow: visible;
  /* flex: 1 1 18%; */
  min-width: 60px;
  max-width: 90px;
  margin-bottom: 20px;
  padding: 0 5px 5px;
}

.score {
  color: #fff;
  text-align: center;
  font-size: 2.25rem;
  font-weight: 800;
  user-select: none;
}

.main-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 100px;
  background-color: transparent;
}


.main-content::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  background-image: url('../assets/map05.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
  
}



.main_content {
  opacity: 0;
  transition: opacity 0.2s ease-in;
}
.main_content.loaded {
  opacity: 1;
}


.circle {
  width: 85%;
  margin: 0 auto;
  position: relative;
  text-align: center;
}

#circle {
  visibility: hidden; 
}


.circle img {
  width: 100%;
  height: auto;
  box-shadow: 0px 0px 16px 0px rgba(138, 143, 254, 0.05);
  transition: transform 0.2s ease;
  --tiltX: 0deg;
  --tiltY: 0deg;
  transform: rotateX(var(--tiltX)) rotateY(var(--tiltY));
}


.page_box {
  padding: 15px;
}

/* main page */

body[data-page="main"] .main-content {
  overflow: hidden;
  height: 100%;
}


.battle-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 10.3; /* Можно заменить на другое соотношение */
  margin: 0 auto;
  overflow: hidden;
  max-width: 600px; /* Ограничим максимальную ширину */
}

#boat {
  position: absolute;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
  width: 100%;
  height: auto;
  display: block;
}

/* Корабль — справа, выше */
.boat-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  animation: ship-sway 3s ease-in-out infinite;
  transform-origin: bottom center;
}

.boat-inner {
  width: 100%;
  height: auto;
}

.boat-container {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1.2;
}

.explosion-lottie {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  top: 29%;                    /* теперь точно будет внизу */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.explosion-lottie.hidden {
  display: none;
}

.smoke-damage-lottie {
  position: absolute;
  width: 45%;
  aspect-ratio: 1;
  bottom: 5%;  /* подгони под визуал корабля */
  left: 54%;
  transform: translateX(-50%);
  z-index: 9;
  pointer-events: none;
  opacity: 0.7;
}

.smoke-damage-lottie.hidden {
  display: none;
}


/* Пушка — слева, ниже */
.cannon-wrapper {
  position: absolute;
  bottom: 0%;
  left: 7%;
  width: 35%; /* как у пушки */
  height: auto;
  pointer-events: none; /* если нужно */
}

.cannon-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; 
  height: auto;
}

#cannon {
  width: 100%; /* займет всю ширину обёртки */
  animation: cannon-pulse 2s ease-in-out infinite;
  pointer-events: auto;
  cursor: pointer;
}

.fire-lottie {
  width: 35%;           /* в процентах от ширины пушки */
  aspect-ratio: 1;
  position: absolute;
  top: -20%;          /* отрегулируй по дулам */
  right: -20%;            /* где примерно дуло */
  z-index: 2;
  pointer-events: none;
  opacity: 0.6;
  transform: rotate(-130deg);
}

.fire-lottie.hidden {
  display: none;
}

.cannon-inner {
  position: relative; /* Контекст для абсолютного позиционирования */
}


/* Контейнер кликов */
.clicks-container {
  position: absolute;
  left: 93%;
  bottom: 36%;

  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;

  padding: 6px 6px;
  border-radius: 8px;
  background: rgba(231, 235, 22, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);  /* тонкая светлая рамка */
  box-shadow: 0 4px 12px rgba(236, 243, 33, 0.2); /* мягкий голубой тень */
  text-shadow: 1px 1px 1px #00000075;
}


/* Значение кликов */
.clicks {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-cream);
}

.clicks-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  
  gap: 6px; /* расстояние между Shots и числом */
}

.clicks-label {
  color: var(--color-cream);
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Анимация обновления */
.clicks.animated {
  animation: bounce-scale 0.2s ease;
}

@keyframes bounce-scale {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.2); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Счётчик кулдауна */
#click-cooldown {
  transform: translateX(-50%);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-cream);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  padding-top: 4px;
}

#click-cooldown.visible {
  opacity: 1;
}

#click-cooldown.pulsing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { transform: translateX(-50%) scale(1); opacity: 1; }
  50%  { transform: translateX(-50%) scale(1.1); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}



#projectile {
  position: absolute;
  width: 40px;
  bottom: 0%;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s ease-out, opacity 0.3s;
}

.multiplier-float {
  position: fixed;
  bottom: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(207, 59, 59, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.3s ease, transform 0.5s ease;
}
.multiplier-float.show {
  opacity: 1;
  transform: translate(-50%, -80%);
}

.flying-coin-to-score {
  width: 24px;
  height: 24px;
  z-index: 9998;
  pointer-events: none;
  position: fixed;
  transition: transform 0.8s ease-out, opacity 0.5s ease-out;
  will-change: transform, opacity;
}

@keyframes ship-sway {
  0%   { transform: translateY(0) rotate(-1.5deg); }
  50%  { transform: translateY(-3px) rotate(1.5deg); }
  100% { transform: translateY(0) rotate(-1.5deg); }
}

#boat-shaker.shake {
  animation: screen-shake 0.3s ease;
}

@keyframes screen-shake {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2.5px, 2px); }
  40%  { transform: translate(2.5px, -2px); }
  60%  { transform: translate(-3px, 2px); }
  80%  { transform: translate(2px, -3px); }
  100% { transform: translate(0, 0); }
}



@keyframes cannon-pulse {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-3px); }
}

@keyframes cannon-fire-recoil {
  0%   { transform: translateX(0) rotate(0); }
  25%  { transform: translateX(-18px) rotate(-2deg); }
  60%  { transform: translateX(5px) rotate(1deg); }
  100% { transform: translateX(0) rotate(0); }
}

#cannon.recoil {
  animation: cannon-fire-recoil 0.3s ease forwards;
  transform-origin: center right;
}



@keyframes palm-sway {
  0%   { transform: rotate(-5deg); }
  50%  { transform: rotate(-2deg); }
  100% { transform: rotate(-5deg); }
}


/* quests */

#quest h2 {
  color: var(--color-cream);
}

.quest-card {
  display: flex;
  align-items: center;
  background-image: url(../assets/bgcard.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quest-icon {
  width: 48px;
  height: 48px;
  margin-right: 12px;
  border-radius: 8px;
  object-fit: contain;
  
}

.quest-info {
  flex: 1;
}

.quest-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.quest-reward {
  color: var(--color-yellow);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.125rem;
  font-weight: bold;
}

.quest-reward img {
  width: 20px;
  height: 20px;
}

.rewards .stat-css {
  font-size: 1rem;
}

.usd-reward {
  color: var(--color-yellow);
  font-weight: 600;
  margin-left: 4px;
}

.quest-button {
 font-size: 0.875rem;
  background-color: var(--color-green);
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.quest-button.go-to-link {
  background-color: var(--color-blue);
}

.quest-progress-inline {
 font-size: 0.875rem;
  color: #c9c9c9;
  text-align: left;
}

.quest-button.received {
  background: #a8a8a7;
  color: white;
}

.button-go-to-shop {
    font-size: 0.875rem;
    background-color: var(--color-green);
    color: white;
    font-weight: bold;
    padding: 2px 5px;
    text-decoration: underline;
    border: none;
    border-radius: 8px;
    cursor: pointer;
} 

.button-go-to-ships {
    color: var(--color-yellow);
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.quest-title {
  font-size: 1rem;
  color: var(--color-white);
  font-weight: bold;
  margin-bottom: 6px;
  display: flex;
  text-align: left;
  align-items: center;
}

.quest-title span {
 font-size: 0.875rem;
  font-weight: normal;
  color: #666;
}




/* shop home (index) */
.fixed_index {
  position: relative;
}

.fixed_index_inner {
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: center;
  position: fixed;
  background-color: #7f4d1f9e;
  border-radius: 10px;
  box-shadow: 0 0 10px #443c35;
  cursor: pointer;
  width: 65px;
}

.fixed_index_inner.ranking_main {
  bottom: 205px;
  right: 10px;
}

.fixed_index_inner.friends_main {
  bottom: 130px;
  right: 10px;
}

.fixed_index_inner.quests_main {
  bottom: 310px;
  right: 10px;
}

.fixed_img_shop {
  width: 50px;
  height: 50px;
}

.fixed_img_ranking {
  width: 50px;
  height: 50px;
}

.fixed_index_inner-text{
  margin-top: 3px;
  color: var(--color-white);
  text-align: center;

  font-size: 0.6875rem;
  font-weight: bold;
    text-shadow: 1px 1px 1px #000;
}


.attention {
  animation: attentionZoomBounce 0.6s ease;
}

@keyframes attentionZoomBounce {
  0% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.03) translateY(-4px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}




/* Кнопки */
.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.activate-button {
  background-color: #0098EA;
}

.highlight-button {
  background-color: var(--color-yellow);
  color: #000;
  animation: attentionZoomBounce 0.6s ease infinite;
}


#collect-button:disabled {
  background-color: #2b7639;
  color: white;
  opacity: 0.6;
 font-size: 0.875rem;
  font-weight: bold;
  cursor: not-allowed;
  transition: all 0.3s ease;
}

/* Плавное появление кнопок */
.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.bot-image-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.bot-buttons {
display: flex;
justify-content: space-between;
width: 100%;
gap: 5px; /* Расстояние между кнопками */
}

.bot-image-container.hidden {
opacity: 0;
pointer-events: none;
}

.bot-image {
width: 50%;
height: auto;
}



#bot-button {
display: block;
margin: 10px auto;
padding: 10px 20px;
font-size: 1rem;
background-color: #467D4A;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

/* Карточки ботов */
.bot-cards {
  display: flex;
  flex-direction: column;
  padding-top: 15px;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
}

.bot-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-image: url('../assets/bgcard.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px 10px 20px;
  margin: 5px 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.bot-image.ship-activated {
  animation: pulse-ship 2.0s infinite;
  filter: drop-shadow(0 0 5px gold);
}

@keyframes pulse-ship {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

.falling-coin {
  position: absolute;
  width: 32px;
  height: 32px;
  background-image: url('../assets/coin.png');
  background-size: contain;
  background-repeat: no-repeat;
  animation: fall-coin 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes fall-coin {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(360deg);
    opacity: 0;
  }
}

.price-value {
  margin: 0 6px;
}

.bot-info {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  min-width: 50%;
}

.bot-info h3 {
  margin: 0;
  font-size: 1.375rem;
  color: #ffffff;
}

.bot-info p {
  font-size: 1.125rem;
}

.net-income-line {
  color: var(--color-yellow);
  font-weight: 700;
  font-size: 1rem;
  margin: 2px 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bot-button-container {
  display: flex;
  width: 100%;
  padding: 15px 0 0;
}

#collect-button {
  display: none; /* По умолчанию скрыта */
  margin-top: 20px;
  width: 100%; /* Растягиваем на всю ширину */
  padding: 10px;
  background-color: #2b7639;
  border: none;
  color: #000;
  font-size: 1.125rem;
  cursor: pointer;
}

.bot-stats {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-pair {
  display: flex;
  justify-content: space-between
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 1.625rem;
  width: 50%;
}

.stat-item.profit15 {
  width: 100%;
  margin-top: 3px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.stat-css {
  color: var(--color-yellow);
  font-weight: 700;
  font-size: 1rem;
}

.stat-value {
  color: var(--color-yellow);
  font-weight: 700;
  font-size: 1rem;
}

.status-value {
  font-size: 0.875rem;
  color: var(--color-cream);
}

.stat-label {
  font-size: 13px;
  color: var(--color-cream);
  margin-top: 1px;
  padding-left: 2px;
}

.stat-label .multiplier-info-icon-small {
  margin-left: 4px;
}

.chest-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.chest-effect {
  position: absolute;
  z-index: -1;
  top: -25px;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 1;
}


.status-info {
  display: flex;
  align-items: center;
  color: #2b7639;
  font-weight: bold;
}
.status-info p {
  color: #2b7639;
}

.status-icon {
  padding-right: 5px;
  padding-left: 5px;
  width: 26px;
  height: 26px;
}

/* Прелоадер */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 70%);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.45);
  border-radius: 15px;
  padding: 0 10px 20px;
}

.preloader-lottie {
  width: 200px;
  height: 200px;
}

.preloader-text {
  font-size: 1.125rem;
  color: #ffffff;
  font-weight: 600;
}


/* active golden frame */

/* active ribbon */
.active-ribbon {
  position: absolute;
  top: -6px;
  right: -7px;
  width: 150px; /* или подбери под ленту */
  height: 150px;
  pointer-events: none;
  z-index: 5;
  transform-origin: top left;
}

.active-ribbon img {
  width: 100%;
  height: auto;
  opacity: 0.95;
}

.completed-ribbon {
  position: absolute;
  top: -6px;
  right: -7px;
  width: 150px;
  height: 150px;
  pointer-events: none;
  z-index: 5;
  transform-origin: top left;
}

.completed-ribbon img {
  width: 100%;
  height: auto;
  opacity: 0.9;
}


/* Button info */

/* Контейнер для кнопок */
.bot-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 5px;
  position: relative;
}

/* Стили кнопок */
.main-button, .activate-button {
  flex: 1;
 font-size: 0.875rem;
  padding: 8px;
  border: none;
  border-radius: 5px;
  background-color: var(--color-blue);
  color: var(--color-white);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
  margin: 0 5px;
}

.main-button:disabled {
 font-size: 0.875rem;
    cursor: not-allowed;
    opacity: 0.6;
}

.activate-button:disabled {
 font-size: 0.875rem;
  cursor: not-allowed;
  opacity: 0.6;
  }

  .bot-status-line {
    color: #ffffff;
    margin: 3px;
    display: flex;
    align-items: center;
  }
  


/* Иконка "?" */
.info-icon {
  font-size: 1.25rem;
  color: var(--color-cream);
  cursor: pointer;
  transition: color 0.3s;
}

.info-icon-small {
  font-size: 15px;
  color: var(--color-yellow);
  cursor: pointer;
}

/* Скрытие кнопок до загрузки данных */

.hidden {
  display: none ;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}




/* MODAL */
/* Основные стили для модального окна */
.modal {
  display: none; /* Скрываем модальное окно по умолчанию */
  position: fixed;
  z-index: 9998; /* Высокий z-index для отображения поверх всех элементов */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85); /* Полупрозрачный черный фон */
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  overflow: auto;
  
}


#bot-details-modal .modal-content {
  margin: 15px;
}

.modal-content h2 {
  margin-top: 0;
  color: var(--color-yellow);
  text-align: center;
}

#bot-details-content {
  color: var(--color-white);
  text-align: left;
}



/* Анимация появления модального окна */
@keyframes slide-down {
  from {
    transform: translateY(-20%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}



/* Стили для прогресс-бара */
.bot-detail {
  margin-bottom: 20px;
}
.progress-bar {
  background-color: #a29f9f;
  border-radius: 8px;
  height: 30px;
  overflow: hidden;
  position: relative;
  width: 120px;
}

.bot-cards .progress-bar {
  width: 270px;
}

.progress-fill {
  background-color: var(--color-cream);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
}

.progress-icon-inside {
  width: 30px;
  height: 30px;
}

.progress-text {
  color: var(--color-black);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}



/* leaderboard */
.leaderboard-container {
  /* max-height: calc(100vh - 130px); 
  overflow-y: auto;  */
  text-align: center;
  padding: 20px;
  color: #fff;
  margin: 7px auto;
}

.leaderboard-entry {
  display: flex;
  width: 80%;
  justify-content: space-between;
  background-color: #333;
  border-radius: 5px;
  align-items: center;
  padding: 5px 10px;
  margin: 5px auto;
}

.main-content.leaderboard {
  background-color: #000;
}

.username {
  font-weight: bold;
  color: var(--color-white);
  font-size: 1.125rem;
}

.telegram-username {
 font-size: 0.75rem;
  color: #cbcbcb;
  margin-left: 6px;
}


.content_img.leaderboard {
  width: 170px;
  height: 230px;
}

.score {
  font-size: 1rem;
  color: var(--color-yellow);
}

.position {
  font-size: 1.125rem;
  font-weight: bold;
  color: #ffd700;
}

#your-position {
  display: flex;
  justify-content: center;
  font-size: 1.25rem;
  padding: 10px;
  margin: 0 10px 10px;
  border-radius: 10px;
  background-color: #7f4d1f;
  color: var(--color-white);
}

/* Referrals */

#referrals-page .container {
  background-image: url(../assets/bgcard.png);
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  display: block;
  padding: 20px;
  color: #fff;
  box-shadow: 0 0 5px #043059;
}

#referrals-container {
  list-style-type: none;
  padding: 0;
}

#referrals-container li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  border-bottom: 1px solid #333;
}

.content_img {
  display: block;
  margin: 0 auto;
  width: 50%;
  height: 50%;
}

.container {
  text-align: center;
  margin: 20px;
}

#referrals-page .referrals-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

#referral-sort {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#referral-sort option {
  color: #000;
}

#referral-list {
  margin-top: 20px;
  text-align: left;
}

.referral-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 15px;
  margin: 10px 0;
  font-size: 1rem;
}

.referral_block_button {
  display: flex;
    justify-content: center;
    gap: 10px;
}

.referral_block_button .collect-bonus-btn {
  margin: 10px 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ccc;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.bonus {
 font-size: 0.875rem;
  white-space: nowrap;
  color: var(--color-yellow);
}

.score {
  font-weight: bold;
}

#invite-button {
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 1.125rem;
  cursor: pointer;
}

/* Shop */

.top-bar.header_h1 {
  background-color: #53341c78;
  margin: 5px auto;
  padding: 5px;
}



.top-bar_leftside {
  width: 65%;
}

.main-content.shops h1 {
  color: var(--color-black);
}

.shop_img {
  width: 120px;
  height: 120px;
  z-index: 1;
}

.shop {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 10px;
  justify-content: space-evenly; 
}

.shop_item {
  width: 45%;
  border-radius: 10px;
  text-align: center;
  position: relative; 
  z-index: 0;
}




.shop_inner.visible {
  opacity: 1;
  transform: translateY(0);
}


.shop_inner {
  background-image: url(../assets/bgcard.png);
  /* background-image: url(../assets/shopbg.png); */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5), 0 6px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  color: #fff;
  position: relative; /* ← уже есть, хорошо */
  z-index: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}



#stars-buttons,
#show-purchase-history-btn,
.shop-tabs,
#connect-wallet-button {
  position: relative;
  z-index: 10; /* безопасно поверх карточек */
}

#stars-buttons {
  margin: 25px;
}

.shop_title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
    padding: 15px 0 0;
  font-size: 1rem;
  font-weight: bold;
}

.shop_title_main {
  font-size: 1rem;
}

.shop_title_coins {
  display: flex;
  align-items: center;
  letter-spacing: 1.5px;
  background-color: rgb(0 0 0 / 40%);
  box-shadow: inset 0 0 3px #0000007a;
  gap: 4px;
  border-radius: 10px;
  padding: 8px;
  font-size: 1.125rem;
  font-weight: bold;
    margin-top: 10px;
}

.shop_price {
  margin: 0 0 10px 0;
}

.shop_price p {
  margin: 0; /* Убирает стандартный отступ у <p> */
  padding: 0;
}

.stars_img {
  width: 24px;
  height: 24px;
}

.collect-bonus-btn.buy-stars, .collect-bonus-btn.buy-ton {
  margin: 5px auto;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--color-white);
}

.collect-bonus-btn.history_btn, .btn.history_btn {
  margin: 0;
  padding: 5px 15px;
}

.row-between_left {
  justify-content: flex-start;
  margin: 10px 0;
  gap: 5px;
}

.shop-tabs {
  display: flex;
  justify-content: center;
  margin: 20px;
  overflow: hidden;
}

.tab-button {
  width: 30%;
  padding: 12px 0;
  font-size: 1rem;
  border: none;
  background-color: #f4f4f4;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-weight: 600;
}

.tab-button.active {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.tab-button.left {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.tab-button.middle {
  border-radius: 0;
}

.tab-button.right {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}


.btn {
  display: block;
  margin: 10px auto;
  background-color: var(--color-blue);
  background-size: cover;
  font-size: 1rem;
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 500;
  border: none;
  color: #fff;
  box-shadow: 0 4px #222;
  z-index: 5;
}

.discount-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #d62828;
  color: white;
  font-weight: bold;
 font-size: 0.875rem;
  padding: 4px 15px;
  border-bottom-left-radius: 8px;
  border-top-right-radius: 8px;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#connect-wallet-button {
  font-size: 1rem;
  font-weight: bold;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 15px;
  background-color: #ffffffad;
  padding: 12px;
  border-radius: 10px;
  color: #000;
}

/* Dailybonus */

/* Сетка 3 в ряд */
.daily-bonus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.daily-streak-summary {
  color: #FFD700;
  font-size: 1.125rem;
  text-align: center;
  margin: 10px auto;
}

/* Стили карточек */
.day {
  background-color: rgb(0 0 0 / 55%);
  border: 1px solid #3e2c1a;
  border-radius: 10px;
  text-align: center;
  padding: 6px 12px;
  color: #f2c879;
  box-shadow: inset 0 0 5px #000;
  position: relative;
  font-size: 1rem;
}

/* Иконка + цифра */
.coin {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--color-yellow);
  font-size: 1.375rem;
}

.coin_bot {
  font-weight: bold;
  color: var(--color-yellow);
  font-size: 1.25rem;
}


.coin-icon {
  width: 22px;
  height: 22px;
  vertical-align: bottom;
}

/* Daily bonus widget */
.daily-bonus-widget {
  position: fixed;
  top: 250px;
  left: 10px;
  width: 55px;
  background-color: #7f4d1f9e;
  border-radius: 10px;
  box-shadow: 0 0 10px #443c35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  cursor: pointer;
  z-index: 100;
}

.hide-daily-bonus #daily-bonus-widget {
  display: none !important;
}

.daily-bonus-timer {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--color-white);
  font-size: 0.75rem;
  padding-top: 2px;
  font-weight: bold;
  text-shadow: 1px 1px 1px #000;
}

.daily-bonus-image {
  width: 40px;
  height: 40px;
}

.lucky-image {
  width: 60px;
  height: 60px;
}

#lucky-widget {
  top: 180px;
  background-color: #7f4d1f9e;
  box-shadow: none;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}


.history-icon {
  width: 26px;
  height: 26px;
}


.bonus-header-board {
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.3);
}


/* Активный день */
.day.active {
  border: 2px solid #8c7606;
  box-shadow: 0 0 10px #171407;
  background-color: #3a2d00;
  transform: scale(1.06);
}

/* Пройденные */
.day.passed {
  opacity: 0.6;
}

/* Заголовок с черепом */
.bonus-title {
  font-size: 1.125rem;
  text-align: center;
  color: #FFD700;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 2px 2px #000;
  padding: 0;
  border-radius: 12px;
  margin-bottom: 10px;
}

.bonus-subtext {
  margin: 0;
  font-size: 1.125rem;
}

.bonus-icon {
  width: 38px;
  height: 38px;
}

/* Фон модалки */
.modal-content {
  background-image: url('../assets/bgcard.png');
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.6);
  border-radius: 30px;
  padding: 20px;
  color: var(--color-white);
  margin: 10px;
}

.collect-bonus-btn {
  display: flex;
  align-items: center;
  margin: 10px auto;
  background-color: var(--color-cream);
  background-size: cover;
 font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  border: none;
  color: #000;
  box-shadow: 0 4px #222;
  position: relative;
  gap: 3px;
}



/* spin */
/* Контейнер для колеса */
.wheel-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Создаем сетку с 3 колонками одинаковой ширины */
  gap: 12px; /* Расстояние между квадратами */
  max-width: 600px; /* Максимальная ширина контейнера */
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  position: relative;
  z-index: 10;
}

.img_wheel {
  width: 430px;
  height: 360px;
  position: absolute;
  top: 59%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url(./assets/monster.png);
  z-index: -1;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-10px) rotate(1deg);
  }
  100% {
    transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
  }
}

.wheel_bet_amount, .crash_bet_amount, .mines_bet_amount {
  color: #d6d6d6;
  font-size: 14px;
}

/* Квадраты */
.square {
  border: 12px solid #00000035;
  background: #00000077;

  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px; /* Скругление углов */
  height: 65px; /* Высота квадратов */
  font-size: 1.5rem; /* Размер шрифта */
  font-weight: bold;
}

.square.is-active {
  border: 12px solid var(--color-blue);
  background: #000000b3;
}

.square__content {
  font-size: 1.5rem;
  color: #ffffff;
}

.square__start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  font-size: 1.5rem;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  opacity: 0;
}

/* Контейнер для баланса и ставки */
.balance-container {
  font-size: 0.875rem;
  text-align: center;
  background-color: rgb(0 0 0 / 36%);
  color: #FBFFFE;
  margin: 2px 0 7px;
  padding: 5px 10px;
  z-index: 10;
  border-radius: 8px;
}

.balance-container p {
    display: flex;
    align-items: center;
    gap: 3px;
}

.balance-container input[type="number"] {
  width: 100px;
  padding: 5px;
  margin-left: 10px;
}

#result {
  margin-top: 10px;
  font-size: 1.2em;
}

/* Crash */



.game-container {
    display: flex;
    flex-direction: column;
    padding: 5px;
}




.multiplier-display {
  width: 100%;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 12 / 11;
  background-color: transparent; /* убираем фон */
}

.multiplier-display::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('./assets/boatbg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(45%);
  z-index: 0;
}


#multiplier-canvas,
#multiplier-text,
.cashout {
  position: relative;
  z-index: 1;
}

#multiplier-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#multiplier-text {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 58px;
    font-weight: bold;
    color: var(--color-blue);
}

/* Баланс и ставка */
/* Общий блок ставки */
.title.game, .game-container h1 {
  position: relative;
  z-index: 11;
  margin: 10px;
}

.title.game i {
  padding-left: 10px;
}

.bet-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5px;
  background-image: url(./assets/bgmodal.png);
  background-size: cover;
  background-position: center;
  position: relative;

  /* background-color: rgba(0, 0, 0, 0.35); */
    padding: 12px 14px;
    border-radius: 20px;
}

/* Заголовок */
.bet-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 5px;
}

/* Ряд с кнопками +/- и полем ввода */
.bet-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 5px 0;
}

.bet-label {
  font-size: 0.875rem;
  color: #888;
}

/* +/- */
.bet-adjust-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 1.375rem;
  border: none;
  border-radius: 10px;
  background-color: #fdfdfd;
  color: #000000;
  cursor: pointer;
}

#bet-amount {
  width: 130px;
  height: 25px;
  font-size: 0.875rem;
  text-align: center;
  border-radius: 10px;
  border: 2px solid #ccc;
  background: #fff;
  color: #666;
}




#balance, #usd-balance, #coin-balance, #usd-balance-mini {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding-top: 1px;
  color: var(--color-yellow);
}


/* Опции ставки */
.bet-options {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.bet-option-button {
  padding: 5px 15px;
  font-size: 0.675rem;
  background-color: #222;
  color: #fff;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  opacity: 0.85;
  transition: 0.2s;
}

.bet-option-button:hover {
  opacity: 1;
  background-color: #333;
}

/* Кнопки "Start" и "Cash Out" */
.buttons-container {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.buttons-container button {
  padding: 7px 23px;
  font-size: 1rem;
  margin: 0 5px;
  border: none;
  border-radius: 8px;
  color: #fff;
  background-color: var(--color-blue);
  transition: background-color 0.3s ease;
  cursor: pointer;
}

#cash-out-button {
  background-color: #dc3545; /* красный для Cash Out */
}

.buttons-container button:hover:not(:disabled) {
  opacity: 0.9;
}

.buttons-container button:disabled {
  background-color: #b0bec5;
  color: #eee;
  cursor: not-allowed;
  opacity: 0.6;
}

.buy-bonus-container {
  text-align: center;
}

.buy-bonus-button {
  padding: 4px 12px;
  font-size: 0.875rem;
  border: none;
  border-radius: 8px;
  background-color: var(--color-white);
  color: #000;
  cursor: pointer;
}

.buy-bonus-button img {
  width: 20px;
  vertical-align: middle;
}

.bet-block_bottom {
  display: flex;
  align-items: center;
  margin: 8px auto 5px;
  gap: 7px
}

/*modal sweetalert*/

.swal-center-popup {
  background-color: #242829f7 !important;
  color: var(--color-white);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: center;

  position: relative !important;
}

.swal2-slide-up {
  animation: slideUpFromCenter 0.3s ease-out;
}
@keyframes slideUpFromCenter {
  from { transform: translateY(30%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.swal2-slide-down {
  animation: slideDownToCenter 0.2s ease-in;
}

.swal2-title {
  font-size: 20px;
  padding: 0;
}

.swal2-actions {
  padding: 10px;
  margin: 0 auto;
}

.swal2-image {
  margin: 0 auto;
}

.swal2-html-container {
  font-size: 15px;
}

.swal2-icon.swal2-success {
  display: none !important;
}

@keyframes slideDownToCenter {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(30%); opacity: 0; }
}

.swal2-confirm.swal2-styled {
  background-color: var(--color-blue) !important;
  color: var(--color-white) !important;
}


/* GAMES  */

/* Общие стили для баннеров */
.banner {
  width: 95%;
  height: 135px;              
  display: flex;              
  justify-content: center;    
  align-items: center;        
  margin: 15px auto;      
  cursor: pointer;           
  box-shadow: 0 0 5px #39281ab5;
  border-radius: 10px;

}

/* Стили шрифта в ретро-духе */
.banner h2 {
  font-family: 'Press Start 2P', monospace; /* Ретро-шрифт */
  font-size: 1rem;                    /* Можно подогнать размер */
  color: #fff;
  text-shadow: 2px 2px 0 #000;            /* Простой «пиксельный» тень-обводка */
  letter-spacing: 1px;
  text-transform: uppercase;  
  background-color: #3390ecbf;
  padding: 10px;
  border-radius: 8px;          
}

/* Отдельная заливка для Crash */
.banner-crash {
  position: relative;
  background-image: url(./assets/banner-crash.png);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Перемещаем контейнер на 20% от левого края и 35% от нижнего */
.coin-fly-container {
  position: absolute;
  left: 23%;
  bottom: 49%;
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 2;
}

.flying-coin {
  width: 100%;
  height: auto;
  animation: coinFly 2.5s linear infinite;
  opacity: 0.9;
}

@keyframes coinFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(100px, -80px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(200px, -160px) scale(0.8);
    opacity: 0;
  }
}


/* Отдельная заливка для Wheel */
.banner-wheel {
  position: relative;
  overflow: hidden;
  background-image: url(./assets/monster03.png);
  background-size: cover;
  background-position: center;
}


.banner-hunt {
   position: relative;
  overflow: hidden;
  background-image: url(./assets/bunner_hunt.png);
  background-size: cover;
  background-position: center;
}

.banner-lootbox {
  position: relative;
  overflow: hidden;
  background-image: url(./assets/bannerlootbox.jpg);
  background-size: cover;
  background-position: center;
}

@keyframes spinSlow {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
/* USDT game */
.dollar-animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.falling-dollar {
  position: absolute;
  top: -100px;
  left: 0;
  width: 40px;
  animation: fallDollar 6s linear infinite;
  opacity: 0.9;
}

.falling-dollar:nth-child(1) {
  left: 0px;
  animation-delay: 0s;
}

.falling-dollar.delay-1 {
  left: 20px;
  animation-delay: 0.5s;
}

.falling-dollar.delay-2 {
  left: 40px;
  animation-delay: 1.5s;
}

.falling-dollar.delay-3 {
  left: 10px;
  animation-delay: 2.5s;
}

.falling-dollar.delay-4 {
  left: 25px;
  animation-delay: 3.5s;
}

.falling-dollar.delay-5 {
  left: 35px;
  animation-delay: 4.7s;
}


@keyframes fallDollar {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.9;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(120vh) rotate(360deg);
    opacity: 0;
  }
}

/* hunt */

.hunt-float {
  position: fixed;
  font-size: 1.75rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 6px rgba(0,0,0,0.6);
  pointer-events: none;
  user-select: none;
  animation: hunt-float-up 1s ease-out forwards;
  z-index: 9998;
}

@keyframes hunt-float-up {
  0% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translate(-50%, -20px) scale(1.2);
  }
  100% {
    transform: translate(-50%, -60px) scale(0.95);
    opacity: 0;
  }
}

.flying-usd-to-score {
  position: fixed;
  width: 30px;
  height: 30px;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.9s ease-out, opacity 0.5s ease-out;
}

.banner-hunt h2 {
  position: relative;
  z-index: 1;
}

.wheel-bg {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 200px;
  height: 200px;
  background-image: url('/assets/circlewheel.png'); /* сюда — картинку колеса */
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.85; /* полупрозрачный фон */
  transform: translate(-50%, -50%);
  animation: spinSlow 12s linear infinite;
  z-index: 0;
}

@keyframes rotateWheel {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.banner-wheel h2 {
  position: relative;
  z-index: 1;
}

 
.cashout {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 14px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgb(237 210 63 / 39%);
  z-index: 10;
}


.cashout img.cashout-icon {
  width: 42px;
  height: 42px;
}

#cashout-text {
  font-size: 1.75rem;
  color: var(--color-yellow);
  font-weight: bold;
}



/* modal ship info */
.bot-modal-content {
  /* background: #5B7B9F; */
  /* border: 3px solid #043059; */
  /* color: #edd5b4; */
  color: #fff;
}

.modal-title {
  font-size: 1.125rem;
  margin: 0;
  color: var(--color-yellow);
  text-align: center;
}

.modal-subtitle {
  text-align: center;
 font-size: 0.875rem;
  margin-bottom: 10px;
}

.modal-ship-image {
  position: absolute;
  top: 37px;
  right: 20px;
  margin: 0 auto 10px auto;
  width: 130px;
}

.modal-multiplier-image {
  display: inline-block;
  max-width: 30%;
  vertical-align: middle;
}

.multiplier_info_text {
  display: inline-block;
  width: 70%;
  vertical-align: middle;
  text-align: left;
}

.modal-divider {
  border: none;
  border-top: 2px solid #624326;
  margin: 10px 0;
}


.modal-stats p {
  margin: 0;
  display: flex;
  align-items: center;
}

.modal-stats .stat-icon {
  width: 32px;
  height: 32px;
}

.modal-header {
  position: relative;
}

.modal-how {
  position: relative;
  background-color: rgb(0 0 0 / 35%);
  border: 2px dashed #8f8f8f;
  padding: 10px;
  margin-top: 15px;
  border-radius: 8px;
}

.modal-how p {
  padding: 3px;
}

.modal-how h3 {
  color: var(--color-yellow);
  margin: 10px 0;
}

.how-icon {
  width: 0px;
  height: 0px;
}
.modal-sack {
  width: 85px;
  height: 30px;
  position: absolute;
  top: 10px;
  right: 5px;
}

.modal-content .btn {
  margin: 15px auto 0;
}

#bot-details-modal .modal-content .btn {
  margin: 5px;
}
#bot-details-modal .row-between {
  justify-content: center;
}


.purchase-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.purchase-list li {
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
}


/* Exchange */

.exchange-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 15px;
  color: #2c1b00;
}

.section {
  margin-bottom: 20px;
}

.parchment {
  position: relative;
  padding: 15px;
  background-image: url('../assets/bgcard.png');
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  color: #fff;
  margin-top: 20px;
}

.input-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.exchange-rate-highlight {
  color: var(--color-yellow);
  font-size: 1.125rem;
  font-weight: 700;
}

.exchange-page .collect-bonus-btn, .exchange-page .btn {
 font-size: 0.875rem;
}

#exchange-from, #exchange-to, #usd-to-withdraw, #usdt-wallet {
  width: 90px;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #c9a96b;
  background: #fffbe7;
 font-size: 0.75rem;
}

#usdt-wallet { 
  width: 150px;
}

.btn-secondary {
  background: #e4dbc3;
  border: 1px solid #b68b4c;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}


.history-list {
  padding: 10px;
  list-style-type: none;
  font-size: 15px;
}

.history-list li {
  padding: 3px;
  font-size: 1rem;
}

 .balance-display {
  font-size: 1rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.35);
  color: #FBFFFE;
  margin: 8px 0;
  padding: 10px;
  z-index: 10;
  border-radius: 8px;
}



.exchange_parrot {
  position: absolute;
  top: -2%;
  right: 2%;
  width: 120px;
  height: 110px;
  background-image: url(./assets/dollar04.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}


.exchange_chest {
  position: absolute;
  top: -8%;
  right: -1%;
  width: 140px;
  height: 130px;
  background-image: url(./assets/exchange-chest02.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}


.row-between {
  display: flex;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 10px;
}



/* free game */
#level-up-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#level-up-modal .modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  font-size: 1.25rem;
  animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.hidden {
  display: none !important;
}


/* Анимация увеличения пиратов */
@keyframes enlarge {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}


@keyframes move-up {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-40px); opacity: 0; }
}

.click-target {
  position: absolute;
  transition: transform 0.4s ease;
  z-index: 100;
  animation: pirate-sway 5s ease-in-out infinite;
  z-index: 5;
}

.mine {
  z-index: 10;
}

.hunt-reward {
  font-weight: 600;
  font-size: 1.75rem;
  position: absolute;
  animation: move-up 2s forwards;
  pointer-events: none;
}

@keyframes hunt-reward-up {
  0%   { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -40px); opacity: 0; }
}


/* Анимация для "падения" монет */


@keyframes fall-coins {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(360deg);
    opacity: 0;
  }
}

/* Анимация для монет */
.falling-coin-dollar {
  position: absolute;
  width: 32px;
  height: 32px;
  background-image: url('../assets/dollar001.png');
  background-size: contain;
  background-repeat: no-repeat;
  animation: fall-coins 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

.clicked-pirate {
  animation: pirate-zoom 0.3s ease-out;
}

@keyframes pirate-zoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}



.waiting-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15%;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.waiting-message.hidden {
  opacity: 0;
  pointer-events: none; /* чтобы нельзя было кликнуть на невидимый сундук */
}

.waiting-message img {
  width: 220px;
  height: 220px;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.waiting-message p {
  font-size: 1.5rem;
  color: #FFD700;
  margin-top: 20px;
  font-weight: bold;
  animation: fadeIn 3s ease-in-out infinite;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}


@keyframes pirate-sway {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2px, 2px) rotate(2deg); }
  50% { transform: translate(0, 0) rotate(0deg); }
  75% { transform: translate(-2px, 2px) rotate(-2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}


body[data-page="hunt"] .main-content {
  overflow: visible !important;
}








/* media  */


/* media 380 */
@media screen and (max-width: 380px) {

  .bonus-title {
    font-size: 1.625rem;
  }

  .bonus-subtext {
    font-size: 1rem;
  }

  .coin {
    font-size: 1.125rem;
  }
  


  .fixed_index_inner {
    width: 55px;
  }

  .bottom-nav {
    gap: 4px;
  }
  
  .nav-item a span {
    font-size: 0.65rem;
  }

  .nav-item.shop_item img {
    height: 45px;
  }

  .nav-item a img {
    width: 40px;
    height: 40px;
    margin-top: -25px;
  }

  .fixed_index_inner.ranking_main {
    bottom: 200px;
    right: 10px;
  }


  .fixed_img_ranking {
    width: 37px;
    height: 37px;
  }

  .fixed_img_shop {
    width: 37px;
    height: 37px;
  }

  .multiplier-float {
    font-size: 1.1rem;
  }

  .stat-value {
    font-size: 0.875rem;
  }

  .stat-pair {
    justify-content: inherit;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
  }

  .boat-wrapper {
    width: 55%;
  }

  .cannon-wrapper  {
    width: 30%;
  }

  .stat-label {
    font-size: 11px;
  }

  /* game */
  .wheel-container {
    gap: 5px;
  }

  .img_wheel {
    width: 350px;
    height: 330px;
    top: 61%;
    left: 50%;
    transform: translate(-50%, -50%);
  }


  #multiplier-text {
    font-size: 2.625rem;
  }

  .cashout img.cashout-icon {
    display: none;
  }

  .multiplier.topbar_text,
  .score.topbar_text,
  .clicks.topbar_text,
  #usd-balance {
    font-size: 1rem;
    text-align: center;
  }

  #balance, #usd-balance, #coin-balance, #usd-balance-mini {
    font-size: 1rem;
  }

  /* .cashout {
    top: 55%;
  } */


  .bet-title {
    display: none;
  }

  .balance-container {
    padding: 5px;
  }

  .square {
    height: 55px;
  }

  .multiplier-display {
    aspect-ratio: 14 / 11;
  }

  .banner {
    height: 105px;
    margin: 10px auto;
  }

  /* exchange */
  .exchange_parrot {
    width: 110px;
    height: 100px;
  }

  .exchange_chest {
    width: 130px;
    height: 120px;
  }


  .quest-button{
    padding: 6px 6px;
  }
}

@media (max-height: 650px) {
 .battle-container {
    aspect-ratio: 10 / 9.5; /* компактное, чуть шире */
  }
  
  .boat-wrapper {
    width: 57%;
  }

  .cannon-wrapper  {
    width: 33%;
  }

  .fixed_index_inner {
    width: 55px;
  }

  .fixed_img_ranking {
    width: 40px;
    height: 40px;
  }

  .fixed_img_shop {
    width: 40px;
    height: 40px;
  }



}


/* super small main.html */
@media (max-height: 650px) and (max-width: 370px) and (orientation: portrait) {
  .battle-container {
    aspect-ratio: 10 / 9; /* компактное, чуть шире */
  }

  #projectile {
    width: 22px;
  }

  .boat-wrapper {
    width: 49%;
  }

  .cannon-wrapper  {
    width: 28%;
  }



}



/* Admin tables responsiveness */
body[data-page="admin"] .table-wrapper {
  width: 100%;
  overflow-x: auto;
}

body[data-page="admin"] table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

body[data-page="admin"] th,
body[data-page="admin"] td {
  padding: 6px;
 font-size: 0.875rem;
  word-break: break-word;
}

body[data-page="admin"] .main-content {
  overflow-x: auto;
}

.lootbox-screen {
  text-align: center;
  padding: 10px;
  position: relative;
}

.lootbox-scroll {
  display: flex;
  overflow-x: auto;
  overflow-y: visible;
  gap: 10px;
  margin: 10px 0;
  scrollbar-width: none;
  cursor: grab;
  position: relative;
}
.lootbox-scroll.dragging {
  cursor: grabbing;
}
.lootbox-scroll::before,
.lootbox-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
}
.lootbox-scroll::before {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0));
}
.lootbox-scroll::after {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,0.6), rgba(0,0,0,0));
}
.lootbox-scroll.no-scroll {
  overflow-x: hidden;
  pointer-events: none;
  touch-action: none;
}
.lootbox-scroll::-webkit-scrollbar {
  display: none;
}

.lootbox-pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
}

.lootbox-pager .pager-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}

.lootbox-pager .pager-dot.active {
  background: #ffe866;
  transform: scale(1.4);
}

.lootbox-prize {
  min-width: 110px;
  background: rgba(0,0,0,0.6);
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 7px 7px 10px;
  color: #fff;
  transition: box-shadow 0.3s, border 0.3s;
}

.lootbox-prize.selected {
  position: relative;
  border: 2px solid #ffe866;
  box-shadow: 0 0 15px #ffe866aa, inset 0 0 6px #ffd700aa;
  border-radius: 12px;
  transition: box-shadow 0.2s ease-in-out, border 0.2s ease-in-out;
  animation: pulse-selected 1.8s infinite ease-in-out;
}

.lootbox-prize.selected::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 6px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff5ae, #ffe600, #fff5ae);
  box-shadow: 0 0 8px #ffe86699;
  animation: glow-bar 2s infinite ease-in-out;
}

@keyframes pulse-selected {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

@keyframes glow-bar {
  0%, 100% {
    opacity: 0.7;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1);
  }
}


.lootbox-prize > img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto 5px;
}

.lootbox-prize .rewards img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.lootbox-prize .rewards {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
}

.lootbox-prize .rewards div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.lootbox-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 1rem;
  color: #fff;
  margin-top: 10px;
}

.lootbox-info .rewards-title {
  width: 100%;
  text-align: center;
  color: var(--color-yellow);
  font-weight: 600;
}

.lootbox-info .legend-item {
  display: flex;
  align-items: center;
  text-align: left;
}

.legend-item .quest-icon {
  width: 32px;
  height: 32px;
  margin-right: 6px;
}

.lootbox-prize.won {
  position: relative;
  z-index: 1;
}




/* Lootbox level highlights */
.lootbox-prize[class*="level-"] > img {
  border-radius: 6px;
}

.lootbox-prize.level-1 > img {
  background: #d3d3d3;
}

.lootbox-prize.level-2 > img {
  background: linear-gradient(#d3d3d3, #5fbf60);
}

.lootbox-prize.level-3 > img { 
  background: linear-gradient(#5fbf60, #2f6b35);
}

.lootbox-prize.level-4 > img {
  background: linear-gradient(#2f6b35, #06b6d4);
}

.lootbox-prize.level-5 > img {
  background: linear-gradient(#06b6d4, #0e7490);
  box-shadow: inset 0 0 6px rgba(255,255,255,0.2);
}

.lootbox-prize.level-6 > img {
  background: linear-gradient(#1788a7, #a65eea);
}

.lootbox-prize.level-7 > img {
  background: linear-gradient(#c084fc, #7c3aed);
  animation: pulse-brightness 2s infinite;
}

.lootbox-prize.level-8 > img {
  background: radial-gradient(circle at center, #d8b4fe, #7e22ce, #3b0764);
  box-shadow:
    0 0 10px #d8b4fe88,
    0 0 20px #9333ea88,
    0 0 30px #7e22ceaa;
  border-radius: 12px;
  animation: pulse-lootbox 3s infinite ease-in-out;
  --pulse-brightness: 1.1;
  --pulse-scale: 1.01;
}

.lootbox-prize.level-9 > img {
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  box-shadow:
    0 0 12px #f59e0baa,
    0 0 22px #f43f5e88,
    0 0 32px #ff5e0055;
  border-radius: 12px;
  animation: pulse-fire 2.8s infinite ease-in-out;
}

.lootbox-prize.level-10 > img {
  background: radial-gradient(circle at center, #ffd700, #ff3c00, #7c1d1d);
  box-shadow:
    0 0 12px #ffd700aa,
    0 0 25px #ff3c00aa,
    0 0 40px #ff0000cc;
  border-radius: 12px;
  animation: pulse-lootbox 2.5s infinite ease-in-out;
  --pulse-brightness: 1.25;
  --pulse-scale: 1.02;
}

/* Удалённый .level-9 (старый золотой стиль) больше не нужен */

@keyframes pulse-lootbox {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(var(--pulse-brightness, 1.1));
    transform: scale(var(--pulse-scale, 1.01));
  }
}

@keyframes pulse-fire {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.15);
    transform: scale(1.015);
  }
}

@keyframes pulse-brightness {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.lootbox-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px auto;
}

.demo-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 0.875rem;
  background-color: #ffffff24;
  padding: 3px;
  border-radius: 5px;
}

.demo-toggle input {
  appearance: none;
  width: 32px;
  height: 18px;
  background: #555;
  border-radius: 9px;
  position: relative;
  transition: background 0.25s;
}

.demo-toggle input::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
}

.demo-toggle input:checked {
  background: var(--color-yellow, #f5b917);
}

.demo-toggle input:checked + span {
  color: var(--color-yellow, #f5b917);
}


.demo-toggle input:checked::before {
  transform: translateX(14px);
}

.usd-switch {
  margin-top: 5px;
  width: 100%;
  display: flex;
  padding-right: 10px;
}

#open-lootbox-btn.collect-bonus-btn {
  margin: 0;
}



/* Bombs and Gold */
.banner-mines {
  position: relative;
  overflow: hidden;
  background-image: url(./assets/banner_bomb.jpg); 
  background-size: cover;
  background-position: center;
}

.gold-spark-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.spark {
  position: absolute;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, #ffe066 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: sparkle-blink 4s infinite;
}

@keyframes sparkle-blink {
  0%, 90%, 100% {
    opacity: 0;
    transform: scale(0.6);
    filter: brightness(1);
  }
  10% {
    opacity: 1;
    transform: scale(1.8);
    filter: brightness(1.2);
  }
  20% {
    opacity: 0.9;
    transform: scale(1);
    filter: brightness(1.1);
  }
}




.mines-container {
  padding: 5px;
  margin: 0 auto 3px; /* центрирует */
  max-width: 100%;
}

.mines-grid {
  width: 100%;
  max-width: 75%;
  margin: 3px auto 7px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  aspect-ratio: 1;
}

.mines-cell {
  width: 100%;
  aspect-ratio: 1; /* квадрат */
  background-color: #bde3f7;
  border-radius: 4px;
  cursor: pointer;
}


.mines-grid.inactive .mines-cell {
  background-color: #ccc;
}

.mines-grid.inactive .mines-cell.preview-bag {
  background-color: #ccc;
  background-image: url('./assets/bag.gif');
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
}

.mines-grid.inactive .mines-cell.preview-shot {
  background-color: #ccc;
  background-image: url('./assets/shots.gif');
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
}

#mines-count {
  width: 60px;
  height: 27px;
  font-size: 0.875rem;
  text-align: center;
  border-radius: 10px;
  border: 2px solid #ccc;
  background: #fff;
  color: #666;
  margin-left: 5px;
}

.mines-row {
  color: #d6d6d6;
  font-size: 14px;
  padding-bottom: 7px;
}


.mines-cell.safe {
  background-color: #2ecc71;
  background-image: url('./assets/bag.gif');
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
}

.mines-cell.mine {
  background-color: #e74c3c;
  background-image: url('./assets/shots.gif');
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
}

.mines-cell.opened.safe {
  background-color: #2ecc71;
}

.mines-cell.opened.mine {
  background-color: #e74c3c;
}

.mines-cell.reveal {
  animation: minesReveal 0.25s ease;
}

@keyframes minesReveal {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#cashout-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#cashout-btn .reward {
  display: flex;
  align-items: center;
  font-size: 14px;
  margin-left: 6px;
}

#cashout-btn .reward img {
  margin-left: 2px;
}

.next-reward {
  margin: 6px 0 0;
  color: var(--color-yellow);
}

.next-reward-amount {
  font-weight: bold;
  font-size: 18px;
}

/* Reward multiplier slider */
.multiplier-slider {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  scrollbar-width: none;
  margin-left: 4px;
}

.multiplier-slider::-webkit-scrollbar {
  display: none;
}

.multiplier-item {
  min-width: 48px;
  padding: 4px 6px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  text-align: center;
  color: #fff;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.multiplier-item.active {
  border-color: #ffe866;
  box-shadow: 0 0 8px #ffe866aa;
}

.pirate-grid {
  width: 100%;
  max-width: 75%;
  padding: 5px 0 0;
  margin: 2px auto 7px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.banner-piratepath {
    position: relative;
    overflow: hidden;
    background-image: url(./assets/banner_path.png); 
    background-size: cover;
    background-position: center;
}

.bomb-flash {
  position: absolute;
  left: 41%;
  bottom: 33%;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, rgba(255,255,100,0.8), transparent 70%);
  border-radius: 50%;
  filter: brightness(1.2);
  animation: flash-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, 50%) scale(0.7);
}


@keyframes flash-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, 50%) scale(0.7);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, 50%) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 50%) scale(0.7);
  }
}

.pirate-cell {
  width: 100%;
  aspect-ratio: 4 / 1.6;
  background-color: #bde3f7;
  border-radius: 4px;
  cursor: pointer;
}

.pirate-cell.disabled {
  background-color: #ccc;
  cursor: default;
}

.pirate-cell.safe {
  background-color: #2ecc71;
  background-image: url('./assets/map.gif');
  background-size: 65%;
  background-repeat: no-repeat;
  background-position: center;
}

.pirate-cell.mine {
  background-color: #e74c3c;
  background-image: url('./assets/shots2.gif');
  background-size: 45%;
  background-repeat: no-repeat;
  background-position: center;
}

.pirate-cell.attention {
  animation: pirateCellAttention 0.2s ease;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.pirate-cell.reveal {
  animation: pirateReveal 0.25s ease;
}

@keyframes pirateReveal {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

#difficulty-select {
    width: 120px;
    height: 27px;
    font-size: 0.75rem;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #ccc;
    background: #fff;
    color: #000;
}

/* chest selection modal */
#chest-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#chest-modal .modal-content {
  padding: 30px;
  border: 2px solid #d4af37;
  border-radius: 10px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

#chest-modal h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  text-shadow: 0 0 6px #000;
}

#chest-modal .chest-grid {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.chest-item {
  width: 80px;
  height: 80px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.chest-item.selected {
  border-radius: 8px;
  transform: scale(1.15);
}

.chest-item.selected:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 130%;
  background: radial-gradient(circle, rgba(255, 223, 0, 0.7), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: reward-glow 0.4s ease-out forwards;
  pointer-events: none;
}

@keyframes reward-glow {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}



.chest-item img {
  width: 100%;
  height: 100%;
}

.chest-item .reward-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: var(--color-white);
  text-shadow: 0 0 3px #000;
  pointer-events: none;
}

.chest-item.selected .reward-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: var(--color-yellow);
  text-shadow: 0 0 3px #000;
  pointer-events: none;
}

#chest-modal .take-button {
  padding: 6px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #ffd700;
  color: #000;
  cursor: pointer;
  display: block;
  margin: 15px auto 0;
}

#chest-modal .take-button:hover {
  background: #ffea70;
}
