html,
body {
  margin: 0;
  padding: 0;
  position: fixed;
  width: 100%;
  height: 100% !important;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  touch-action: none;
  background-color: #360349;
}

flt-root,
flt-glass-pane,
.flutter-view,
#flutter-container {
  height: 100% !important;
  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: #360349e3;
  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;
}

#debug-log-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 0, 0, 0.4);
  /* Полупрозрачный черный */
  color: #00ff00;
  /* Зеленый шрифт (лучше читается на черном, чем белый) */
  font-family: monospace;
  font-size: 10px;
  line-height: 1.2;
  z-index: 999999;
  /* Поверх всего */
  pointer-events: none;
  /* Пропускает клики сквозь себя! */
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  /* Новое сверху */
  align-items: flex-start;
  padding: 10px;
  box-sizing: border-box;
  /* display: none; */
}

#debug-log-overlay.hidden {
  display: none !important;
}

.log-entry {
  margin-bottom: 2px;
  background: rgba(0, 0, 0, 0.2);
  width: 100%;
}

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



#vk-login-container {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background: white;
  z-index: 999999;
  text-align: center;
}

#vk-inner-container {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 400px !important;
}

#vk-login-container>* {

  margin-left: auto !important;
  margin-right: auto !important;
  width: 40vw;
}

/* 💣 ломаем их absolute/inline дичь */
#vk-login-container * {
  max-width: 100%;
  box-sizing: border-box;
}

/* iframe — обязательно */
#vk-login-container iframe {
  display: block;
  width: 100% !important;
  margin: 0 auto !important;
}


/* кнопка отмены */
.vk-cancel-btn {
  width: 100%;
  padding: 8px;

  border: none;
  border-radius: 8px;

  background: #f1f1f1;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
  height: 44px;
  font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;

  transition: background 0.2s;
}

.vk-cancel-btn:hover {
  background: #e0e0e0;
}


.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;
}