html,
body {
  height: 100%;
  margin: 0;
  padding: 0;

  position: fixed;
  width: 100%;
  overflow: hidden;

  /* ВАЖНО */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  touch-action: none;
}

flt-root,
flt-glass-pane,
.flutter-view,
#flutter-container {
  height: 100%;
  width: 100%;

  overscroll-behavior: none !important;
  touch-action: none !important;
}

canvas {
  display: block;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

#early-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #112234e3;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top: 4px solid #cb00b0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.spinner-container {
  display: flex;
  flex-direction: column; /* ВАЖНО — вертикально */
  position: fixed;
  z-index: 99999;
  justify-content: center;
  align-items: center;

  height: 100vh;
  width: 100vw;

  opacity: 1;
  transition: opacity 0.4s;
}



.center {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.contain {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stretch {
  display: block;
  width: 100%;
  height: 100%;
}

.cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.bottomLeft {
  position: absolute;
  bottom: 0;
  left: 0;
}

.bottomRight {
  position: absolute;
  bottom: 0;
  right: 0;
}

#lottie-animation {
  width: 35vw;
  height: 35vw;
  clip-path: circle(40.2597405% at 50% 50%);
}

/* Если экран шире, чем выше (landscape) */
@media (orientation: landscape) {
  #lottie-animation {
    width: 15vh;
    height: 15vh;
    clip-path: circle(40.2597405% at 50% 50%);
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #112234;
  }
}

.spinner-container.fade-out {
  opacity: 0;
  /* visibility: hidden; */
}

.spinner-container.light {
  background-color: #ffffff;
}

.spinner-container.light #loader-text {
  color: #000000;
}

.spinner-container.dark {
  background-color: #112234;
}

.spinner-container.dark #loader-text {
  color: #ffffff;
}

#loader-text {
  margin-top: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;

  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

#loader-text.light {
  color: #000000;
}

#loader-text.dark {
  color: #ffffff;
}

.loading-image {
  width: 40vw;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.add-overlay-button-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Рекламный оверлей — по умолчанию скрыт */
#ad-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 1.0);
}

/* контейнер внутри оверлея */
.ad-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#close-ad-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: rgb(55, 55, 55);
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: none;
}

/* Таймер закрытия (скрыт по умолчанию) */
#close-timer {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(#9f9f9faa 0deg, #E2E2E2AA 0deg);
  display: none;
  /* show/hide логикой в js */
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  color: rgb(74, 74, 74);
  text-align: center;
  z-index: 10000;
}

#add-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* счетчик в таймере */
#countdown-text {
  display: block;
  line-height: 48px;
}

/* контент рекламы (по центру) */
.ad-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* небольшой safeguard — если какой-то внешний стиль делает body overflow hidden */
body.no-scroll {
  overflow: hidden !important;
}