@font-face {
  font-family: 'ProductSans';
  src: url('/static/font/ProductSans.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DigitalDismay';
  src: url('/static/font/DigitalDismay.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Saira';
  src: url('/static/font/Saira.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Unisans';
  src: url('/static/font/Unisans.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hex';
  src: url('/static/font/Hex.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Online';
  src: url('/static/font/Online.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --tg-safe-area-inset-top: 0px;
  --tg-safe-area-inset-bottom: 4vh;

  --main-gradient: linear-gradient(to bottom, #0f0a17, #1d112a);
  --timer-green: #5dc462;
  --purple-igroton: #6b43ad;


  --color-black: 0, 0, 0;
  --color-white: white;


  --font-family-product: "ProductSans", -apple-system, system-ui, sans-serif;
  --font-family-dismay: "DigitalDismay", -apple-system, system-ui, sans-serif;
  --font-family-saira: "Saira", -apple-system, system-ui, sans-serif;
  --font-family-unisans: "Unisans", -apple-system, system-ui, sans-serif;
  --font-family-hex: "Hex", -apple-system, system-ui, sans-serif;
  --font-family-online: "Online", -apple-system, system-ui, sans-serif;
}


html {
  scroll-behavior: smooth;
  overflow: hidden;
}

body::-webkit-scrollbar {
  display: none;
  /* Webkit */
}

body {
  font-family: var(--font-family-product);
  background: var(--main-gradient);
  overflow-x: hidden;
  position: relative;
  height: 100vh;
  width: 100vw;
  color: var(--color-white);
  transition: opacity 0.5s ease;
}

.activityContainer {
  display: flex;
  flex-direction: column;
  /* Элементы располагаются вертикально */
  height: 100vh;
  padding-top: calc(var(--tg-safe-area-inset-top) + 15px);
  padding-bottom: calc(var(--tg-safe-area-inset-bottom) + 5px);
  gap: 10px;
}

tc-root[data-tc-dropdown-container="true"] {
  left: 50% !important;
  transform: translateX(-50%);
  color: white;
}

/* Шрифты */
.font-product {
  font-family: var(--font-family-product);
}

.font-dismay {
  font-family: var(--font-family-dismay);
}

.font-saira {
  font-family: var(--font-family-saira);
}

.font-unisans {
  font-family: var(--font-family-unisans);
}

.font-hex {
  font-family: var(--font-family-hex);
}

.font-online {
  font-family: var(--font-family-online);
}

.fs-10 {
  font-size: 10px;
}

.fs-12 {
  font-size: 12px;
}

.fs-14 {
  font-size: 14px;
}

.fs-16 {
  font-size: 16px;
}

.fs-18 {
  font-size: 18px;
}

/*Сдивг лево право*/
.containers {
  margin-left: 5%;
  margin-right: 5%;
}

#content {
  flex-grow: 1;
  /* Занимает всё свободное пространство */
  border: 1px solid #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px white;
  position: relative;
}

.page-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page {
  width: 100%;
  height: 100%;
  /*overflow-y: auto;*/
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

#footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

}


.headerinfo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.headerinfo .closeBox {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-direction: row;
  max-width: 400px;
  width: 100%;
}

.headerinfo .icon {
  filter: drop-shadow(0 0 5px white);
  height: 100%;
}

.headerinfo .button {
  background-color: #2e3339;
  color: white;
  line-height: 1;
  padding: 2px 20px;
  text-align: center;
  font-size: 16px;
  border-radius: 16px;
  cursor: pointer;
}

.headerinfo .center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.headerinfo .center-block img {
  width: 40px;
  height: 40px;
}

.headerinfo .stars {
  color: white;
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
}

.content-color-1 {
  background-color: linear-gradient(155deg, #2e3339, #555b62);
}

.loader-back {
  position: absolute;
  height: 100%;
  width: 100%;
  z-index: -1;
}


.startplay {
  background: linear-gradient(155deg, #2e3339, #555b62);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  padding: 10px;
}

.startplay>div:nth-child(1) {
  flex: 3;
  width: 100%;
  height: 33%;
}

.startplay>div:nth-child(2) {
  flex: 3;
  width: 100%;
  height: 33%;
  padding: 48px;
}

.startplay>div:nth-child(3) {
  flex: 3;
  width: 100%;
  height: 33%;
}

.startplay .buttonStartGame {
  padding: 4px 26px;
  border: 1px solid white;
  border-radius: 48px;
  color: white;
  text-align: center;
  cursor: pointer;
}

.startplay .overlay-container {
  pointer-events: none;
  position: absolute;
  bottom: 10px;
  width: 100%;
  max-width: 600px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding-left: 5%;
  padding-right: 5%;
  display: flex;
}


.overlay-item {
  pointer-events: auto;
  /* Включаем клики по нужным элементам */
}

.overlay-icon-2 {
  width: 26px;
  height: 26px;
  cursor: pointer;
  pointer-events: auto;
}

.swiper-container {
  width: calc(100% + 20px);
  height: 100%;
  flex: 1;
  padding-left: 48px;
  padding-right: 48px;
}

.swiper-button-next,
.swiper-button-prev {
  top: 50% !important;
}

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

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.swiper-button-next:after {
  font-size: 24px !important;
}

.swiper-button-prev:after {
  font-size: 24px !important;
}

.blink {
  animation: blink-animation 3s infinite;
}

@keyframes blink-animation {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}



.digit-flip {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateY(-10px);
  opacity: 0;
}

.digit-show {
  transform: translateY(0);
  opacity: 1;
}







.game {
  background: linear-gradient(155deg, #2e3339, #555b62);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
}


#hexGrid-wrapper {
  overflow: hidden;
  touch-action: none;
  width: 100%;
}

#hexGrid svg {
  width: 100%;
  height: auto;
  display: block;
  width: calc(100% / 5);
  height: auto;
  display: block;

}

#hexGrid {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}


.game .overlay-container {
  position: absolute;
  pointer-events: none;
  /* чтобы не перекрывать клики по hexGrid */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.overlay-item {
  position: absolute;
  pointer-events: auto;
  /* Включаем клики по нужным элементам */
  z-index: 10;
}

/* Левый верхний угол */
.overlay-top-left {
  top: 10px;
  left: 10px;
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.overlay-bottom-center-1 {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgb(66, 42, 84);
  max-width: 700px;
  bottom: 0px;
  padding: 5px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Центр вверху и внизу */
.game .overlay-top-center,
.game .overlay-bottom-center {
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.game .overlay-top-center {
  padding-top: 10px;
  top: 0;
}

.game .overlay-bottom-center {
  padding-bottom: 10px;
  bottom: 0;
}

/* Белый круг с "ожидайте" */
.game .white-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game .white-circle.active {
  box-shadow: 0px 0px 20px #ffffff;
}

.game .white-circle img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}


/* Иконки */
.overlay-icon {
  width: 21px;
  height: 21px;
  cursor: pointer;
}

.game .text-rank {
  font-weight: bold;
  text-transform: uppercase;
}


.hex {
  fill: #ffffff;
  cursor: pointer;
  transition: fill 0.3s ease;
}

.hex.my-hex {
  fill: #b8a65e;
  opacity: 1 !important;
}

.hex.own-hex {
  fill: #5194c9;
  opacity: 1 !important;
}

.hex.take-1 {
  fill: #d7e4f1;
  stroke: #ffffff;
  stroke-width: 2px;
  opacity: 1 !important;
}

.hex.take-2 {
  fill: #8d9ca9;
  stroke: #ffffff;
  stroke-width: 2px;
  opacity: 1 !important;

}

.label {
  font-size: 32px;
  fill: white;
  pointer-events: none;
}

.reward.hidden {
  display: none;
}

.reward {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward .reward-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.reward .reward-content {
  position: relative;
  padding: 16px 16px;
  z-index: 1001;
  max-width: 80%;
  width: 357px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  background: #474747bc;
  border-radius: 40px;
  text-align: center;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.reward.show .reward-content {
  transform: scale(1);
  opacity: 1;
}

.reward .reward-text {
  font-size: 36px;
}

.reward .reward-rewards {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 24px;
}

.reward .reward-x {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 36px;
}

.reward button {
  padding: 10px 20px;
  font-size: 18px;
  background: unset;
  border: 1px solid #ffffff;
  color: #fff;
  border-radius: 26px;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.reward button:hover {
  box-shadow: 0 0px 45px rgba(255, 255, 255, 1);
}

.reward input::-webkit-outer-spin-button,
.reward input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Убираем стрелки в Firefox */
.reward input[type=number] {
  -moz-appearance: textfield;
}

/* Убираем чёрную обводку при фокусе */
.reward input:focus {
  outline: none;
  box-shadow: none;
}



.igroton {
  background: linear-gradient(155deg, #2e3339, #555b62);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
}

.help {
  background: linear-gradient(155deg, #2e3339, #555b62);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
}

.shop {
  background: linear-gradient(155deg, #2e3339, #555b62);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
  flex-direction: column;
  gap: 20px;
}

.shop .spisok {
  display: flex;
  flex-direction: column;
  width: 160px;
  gap: 10px;
}



.kxday {
  background: linear-gradient(155deg, #2e3339, #555b62);
  height: auto;
  min-height: 100%;
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
}


.kx-farm-container {
  color: white;
  max-width: 700px;
  width: 100%;
  padding: 20px;
}

.kx-farm-header {
  text-align: center;
  margin-bottom: 12px;
}

.kx-farm-title {
  font-size: 18px;
  font-weight: bold;
}

.kx-farm-subtitle {
  font-size: 14px;
}

.kx-farm-table-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid white;
}

.kx-farm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.kx-farm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kx-farm-row img {
  width: 20px;
  height: 20px;
}


.kx-farm-add {
  background: none;
  border: none;
  color: white;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

.pickaxe.active {
  animation: swing 1s infinite ease-in-out;
}

@keyframes swing {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(30deg);
  }

  100% {
    transform: rotate(0deg);
  }
}


@media (max-height: 520px) {
  .game .white-circle {
    width: 30px;
    height: 30px;
  }

  .startplay>div:nth-child(3) {
    flex: 1;
    height: 20%;
  }

  .startplay>div:nth-child(2) {
    flex: 1;
  }

  .startplay>div:nth-child(1) {
    display: none !important;
  }
}

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
  pointer-events: none;
}

.popup-overlay.active {
  pointer-events: auto;
}

.popup-overlay::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

.popup-overlay .popup-content {
  align-items: center;
  display: flex;
  flex-direction: column;
  transition: opacity 0.5s ease;
  max-width: 700px;
  opacity: 0;
  width: 100%;
  height: 100vh;
  padding-left: 5%;
  padding-right: 5%;
  padding-top: calc(var(--tg-safe-area-inset-top) + 65px);
  padding-bottom: calc(var(--tg-safe-area-inset-bottom) + 5px);
}

.popup-overlay.active .popup-content {
  transform: translateY(0%);
  opacity: 1;
}

.blur {
  transition: opacity 0.5s ease;
}

.popup-overlay.active .blur {
  opacity: 1;
}

.popup-overlay .blur {
  opacity: 0;
}

.popup-overlay .popup-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  font-size: 28px;
  text-align: center;
  flex-shrink: 0;
  flex-direction: column;
}

.popup-overlay .subscribe-button {
  background: #10669f;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.popup-overlay .star-reward img {
  width: 20px;
  height: 20px;
  margin-left: 6px;
}

.popup-overlay .popup-body {
  display: flex;
  align-items: center;
  row-gap: 26px;
  max-width: 400px;
  overscroll-behavior: none;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;

  width: 100%;

}

.popup-overlay .popup-body::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

.popup-bottom {
  margin-top: 16px;
  flex-shrink: 0;
  text-align: center;
  width: 100%;
}

.popup-overlay .popup-body .shop-elemet {
  display: flex;
  width: 100%;
  padding-left: 5%;
  align-items: center;
  padding-right: 5%;
}

.popup-overlay .popup-body .shop-elemet .shop-info {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  gap: 5px;
}

.popup-overlay .popup-body .shop-elemet .shop-info img {
  height: 38px;
  width: 38px;
  margin-bottom: 10px;
}

.popup-overlay .popup-body .shop-elemet .shop-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  gap: 20px;
  margin-left: auto;
  color: #ffb101;
  border: 1px solid #ffb101;
  border-radius: 48px;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 4px;
}

.popup-overlay .popup-body .shop-elemet .shop-buy img {
  height: 36px;
  width: 36px;
  margin-bottom: 10px;
}

.popup-overlay .reward-day {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 calc(50%);
  opacity: 0.7;
  transition: opacity 0.5s ease;
}

.popup-overlay .reward-day .rew-box {
  border-radius: 34px;
  padding: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  height: 131px;
  width: 131px;
}

.popup-overlay .reward-day.active {
  opacity: 1;
}

.popup-overlay .reward-day.active .rew-box {
  border: 1px solid #ffffff;
}


.popup-overlay .day-icon {
  width: 24px;
  height: 24px;
}

.popup-overlay .day-amount {
  font-size: 16px;
  font-weight: bold;
}

.popup-overlay .claim-button {
  border: none;
  padding: 2px 5px;
  border-radius: 6px;
  font-weight: bold;
}


#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.3);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #fff;
  border-top: 6px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.error-popup {
  display: none;
  /* Скрыто по умолчанию */
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgb(var(--n1-2));
  color: rgb(var(--n800));
  padding: 15px 30px;
  border-radius: 40px 40px 40px 40px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 2000;

  text-align: center;
}

#preloader {
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: rgb(var(--n1-2));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.5s ease;
  /* Плавное изменение opacity и transform */
  background: var(--main-gradient);
}


#preloader .img-container {
  height: 100px;
  width: 100px;
}


.bottom-navbar-area .bottom-navbar-button {
  background: rgb(var(--n1-2));
  border: 1px solid rgb(var(--p2-50));
  border-radius: 50px;
}

.bottom-navbar-area .bottom-navbar-button ul li {
  max-width: 52px;
  max-height: 52px;
  min-width: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  transition: background 0.5s ease;
}

.bottom-navbar-area .bottom-navbar-button ul li svg {
  stroke: rgb(var(--p2-300));
}

.bottom-navbar-area .bottom-navbar-button ul li.active {
  background: var(--gradient);
  transform: scale(1.2);
  transition: background 0.5s ease;

}

.bottom-navbar-area .bottom-navbar-button ul li.active svg {
  stroke: rgb(var(--n1));
}

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

.pointer {
  cursor: pointer;
}

.slide-down {
  animation: slideDown 0.3s ease-in-out forwards;
}

.slide-up {
  animation: slideUp 0.3s ease-in-out forwards;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

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

@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(-50px);
    opacity: 0;
  }
}

.offline .detectoff {
  opacity: 0.4;
  pointer-events: none;
  /* чтобы нельзя было взаимодействовать */
  transition: opacity 0.3s ease;
}

.allsvg .hex-off {
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.drop-inner {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  pointer-events: all;
  z-index: 1;
}

.drop-inner.hidden {
  display: none !important;
}

.drop-box {
  height: 110px;
  width: 280px;
  background: #474747bc;
  border-radius: 40px;
  text-align: center;
  color: white;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-text {
  font-size: 18px;
  transition: all 0.5s ease;
}

.drop-text.hidden {
  display: none !important;
}

.drop-step-1 .dots::after {
  content: '';
  display: inline-block;
  width: 1ch;
  animation: dots 1s steps(4, end) infinite;
}

@keyframes dots {
  0% {
    content: '';
  }

  25% {
    content: '.';
  }

  50% {
    content: '..';
  }

  75% {
    content: '...';
  }

  100% {
    content: '';
  }
}

.drop-step-2 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.drop-result {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: bold;
}