/* aviator-two — стили перенесены с оригинала (шаблон aviatorTwo), классы переименованы в at-*.
   Шрифт как у оригинала: 'Open Sans' 800 без загрузки (у них тоже не грузится) → системный sans-serif. */

@keyframes rotation-loader {
  0% {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes blink {
  0%,
  40%,
  to {
    left: -24em;
  }
  20% {
    left: calc(100% + 24em);
  }
}
@keyframes moveBgEffect {
  0%,
  to {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5vw);
  }
}
@keyframes scaleBgEffect {
  0%,
  to {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes growDesktop {
  0% {
    width: 12em;
  }
  80% {
    width: 120em;
  }
  to {
    width: 156em;
  }
}
@keyframes growMobile {
  0% {
    width: 12em;
  }
  80% {
    width: 60em;
  }
  to {
    width: 80em;
  }
}
@keyframes flyDesktop {
  0% {
    opacity: 1;
    bottom: 29em;
  }
  80% {
    opacity: 1;
    bottom: 60em;
  }
  99% {
    opacity: 1;
    bottom: 74em;
  }
  to {
    opacity: 0;
    bottom: 82.5em;
  }
}
@keyframes flyMobile {
  0% {
    opacity: 1;
    bottom: 40em;
  }
  80% {
    opacity: 1;
    bottom: 114em;
  }
  99% {
    opacity: 1;
    bottom: 160em;
  }
  to {
    opacity: 0;
    bottom: 160em;
  }
}
@keyframes flyMobileSmall {
  0% {
    opacity: 1;
    bottom: 42em;
  }
  80% {
    opacity: 1;
    bottom: 114em;
  }
  99% {
    opacity: 1;
    bottom: 160em;
  }
  to {
    opacity: 0;
    bottom: 160em;
  }
}

*,
::after,
::before {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
img {
  max-width: 100%;
  width: 100%;
  height: auto;
  vertical-align: middle;
  font-style: italic;
}
button {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  outline: 0;
}
html {
  background: #f40202;
  font-size: min(4.5px + 5.5 * (100vw - 375px) / 1605, 10px);
}
body,
html {
  height: 100%;
}
body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 800;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: hidden;
}

/* ---------- loader ---------- */

.at-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100dvh + 2px);
  padding: 15px;
  overflow: hidden;
  background: linear-gradient(180deg, #620000 0%, #ed5f00 36.29%, #610000 100%);
}
.at-loader.is-loaded {
  display: none;
}
.at-loader::before {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  max-width: 284px;
  height: 100%;
  max-height: 180px;
  background: url(../img/airplane.webp) center / 100% 100% no-repeat;
  transform: translate(-50%, -140%);
}
.at-loader__logo {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin-bottom: 35px;
}
.at-loader__bar {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 28px;
  padding: 4px;
  border-radius: 100px;
  background: linear-gradient(to right, #ffdf00, #ffb900);
}
@media (max-width: 767px) {
  .at-loader::before {
    max-width: 196px;
    max-height: 124px;
    transform: translate(-50%, -150%);
  }
  .at-loader__logo {
    max-width: 240px;
  }
  .at-loader__bar {
    max-width: 220px;
  }
}
.at-loader__bar::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 100px;
  background: #fff;
}
.at-loader__fill {
  position: relative;
  z-index: 2;
  width: 0;
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(to right, #fff200, #ff0000);
  transition: width 0.5s ease;
}

/* ---------- page ---------- */

.at-page,
.at-wrap {
  position: relative;
  display: flex;
  overflow-x: hidden;
  overflow-y: auto;
}
.at-page {
  height: 100dvh;
}
.at-page::after {
  content: '';
  position: fixed;
  z-index: -1;
  top: -10vh;
  left: -10vw;
  width: 120vw;
  height: 120vh;
  background: url(../img/page-bg.webp) center top / cover no-repeat;
  animation: 10s scaleBgEffect ease-in-out infinite;
}
@media (max-width: 767px) {
  .at-page::after {
    background-image: url(../img/page-bg-mobile.webp);
  }
}
.at-page::before {
  content: '';
  position: fixed;
  top: -10vh;
  left: -10vw;
  width: 120vw;
  height: 120vh;
  background: url(../img/page-bg-effect.webp) center top / cover no-repeat;
  mix-blend-mode: hard-light;
  animation: 6s moveBgEffect ease-in-out infinite;
}
@media (max-width: 1023px) {
  .at-page::before {
    background-image: url(../img/page-bg-mobile-effect.webp);
  }
}
.at-wrap {
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
@media (max-width: 1023px) {
  .at-wrap {
    flex: unset;
    padding: 8em 0;
  }
}
.at-game {
  position: relative;
  z-index: 2;
  display: block;
  width: 157em;
  height: 82.5em;
  max-width: 1560px;
  max-height: 820px;
  background: url(../img/frame.webp) center / contain no-repeat;
  transform: scale(0.9);
}
@media (max-width: 1023px) {
  .at-game {
    width: 82em;
    height: 160em;
    max-height: unset;
    background-image: url(../img/frame-mob.webp);
    transform: none;
  }
}
@media (max-width: 389px) {
  .at-game {
    width: 68em;
    height: 134em;
  }
}
.at-logo {
  position: absolute;
  z-index: 2;
  top: 1em;
  left: 50%;
  display: block;
  width: 25em;
  max-width: 250px;
  transform: translate(-50%, -50%);
}
@media (max-width: 1023px) {
  .at-logo {
    width: 36em;
  }
}
.at-inner {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50px;
}

/* ---------- ставка и баланс ---------- */

.at-rate,
.at-balance {
  position: absolute;
  bottom: 6em;
}
.at-rate {
  left: 5em;
}
.at-balance {
  right: 5em;
}
.at-rate__title,
.at-balance__title {
  font-size: 3em;
  line-height: normal;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0.42rem 0 #640112;
}
.at-rate__value,
.at-balance__value {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30rem;
  margin-top: 0.8rem;
  padding: 1rem;
  border-radius: 500px;
  border: 4px solid #fff;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 4.2rem 0 rgba(0, 0, 0, 0.2);
  font-size: 4.2em;
  line-height: normal;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0.42rem 0 #6f011b;
}
.at-balance__value {
  color: #15ff00;
  border-color: #15ff00;
}
.at-balance__value::before {
  content: '';
  position: absolute;
  left: 50%;
  display: block;
  width: 2em;
  height: 2em;
  border-radius: 100%;
  background-color: #15ff00;
  filter: blur(8rem);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
@media (max-width: 1023px) {
  .at-rate,
  .at-balance {
    left: 5em;
    right: 5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 30rem;
    padding: 1rem 4rem;
    border-radius: 500px;
    border: 3px solid #fff;
  }
  .at-rate {
    bottom: 24em;
  }
  .at-balance {
    bottom: 10em;
    border-color: #15ff00;
  }
  .at-rate__title,
  .at-balance__title {
    font-size: 4.5em;
  }
  .at-balance__title {
    color: #15ff00;
  }
  .at-rate__value,
  .at-balance__value {
    min-width: unset;
    margin-top: unset;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: 0 0;
    box-shadow: none;
    font-size: 6em;
  }
}
@media (max-width: 389px) {
  .at-balance {
    bottom: 11em;
  }
}

/* ---------- кнопка PLAY / CTA ---------- */

.at-button {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
}
@media (max-width: 389px) {
  .at-button {
    bottom: 2em;
  }
}
.at-btn-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.at-btn-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 21em;
  height: 12em;
  min-height: 70px;
  padding: 0 12em;
  background: url(../img/button_effect.webp) center / contain no-repeat;
  animation: 3s blink ease-in-out infinite;
}
.at-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12em;
  min-height: 70px;
  max-height: 120px;
  min-width: 40em;
  margin: 0 2em;
  padding: 0 4em;
  background: url(../img/button_middle.webp) repeat-x center center;
  background-size: contain;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 389px) {
  .at-btn {
    min-height: 60px;
  }
}
.at-btn::after,
.at-btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18em;
  height: 12em;
  min-height: 70px;
  max-height: 120px;
  background-repeat: no-repeat;
  background-size: contain;
}
@media (max-width: 389px) {
  .at-btn::after,
  .at-btn::before {
    min-height: 60px;
  }
}
.at-btn::before {
  left: -2em;
  background-image: url(../img/button_left.webp);
  background-position: left;
}
.at-btn::after {
  right: -2em;
  background-image: url(../img/button_right.webp);
  background-position: right;
}
.at-btn__label {
  position: relative;
  z-index: 3;
  padding-bottom: 7px;
  font-size: 4.2em;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0.5rem 0 rgba(8, 101, 0, 0.5);
}
@media (max-width: 767px) {
  .at-btn__label {
    padding-bottom: 6px;
  }
}
.at-cta {
  display: none;
}
.at-game.is-active .at-button {
  pointer-events: none;
}
.at-game.is-active .at-btn-wrap::before {
  display: none;
}
.at-game.is-active .at-go {
  opacity: 0.9;
  pointer-events: none;
}
.at-game.is-active .at-go .at-btn__label {
  display: none;
}

/* ---------- множитель, траектория, самолёт ---------- */

.at-mult {
  position: absolute;
  right: 50%;
  bottom: 9rem;
  font-size: 9rem;
  color: #fff;
  text-align: center;
  text-shadow: 0 1rem 0.2rem #f40202;
  transform: translateX(50%);
}
@media (max-width: 1023px) {
  .at-mult {
    right: 7rem;
    bottom: 38rem;
    font-size: 12rem;
    transform: none;
  }
}
@media (max-width: 389px) {
  .at-mult {
    bottom: 40em;
  }
}
.at-track {
  position: absolute;
  z-index: 2;
  left: 4px;
  bottom: 0;
  width: 10em;
  height: 82.5em;
  background: url(../img/traectory.webp) no-repeat;
  background-size: 155em 82.5em;
}
@media (max-width: 1023px) {
  .at-track {
    width: 12em;
    bottom: 5em;
    height: 160em;
    background-image: url(../img/traectory-mob.webp);
    background-size: 80em 155em;
  }
}
@media (max-width: 389px) {
  .at-track {
    height: 136em;
    background-size: 67em 122em;
  }
}
.at-track::after,
.at-track::before {
  content: '';
  position: absolute;
  bottom: 29em;
  right: -22em;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.at-track::before {
  display: block;
  width: 29.5em;
  height: 18em;
  background-image: url(../img/airplane.webp);
}
.at-track::after {
  display: none;
  width: 90em;
  height: 70em;
  background-image: url(../img/coins.gif);
  transform: rotate(10deg) translate(9em, 47em);
}
@media (max-width: 1023px) {
  .at-track::after,
  .at-track::before {
    bottom: 40em;
    right: -18em;
    transform: rotate(-24deg);
  }
  .at-track::after {
    width: 120em;
    height: 80em;
    transform: rotate(-15deg) translate(5em, 70em);
  }
}
@media (max-width: 389px) {
  .at-track::after,
  .at-track::before {
    bottom: 42em;
  }
}
.at-game.is-active .at-track {
  animation: 5.5s growDesktop linear forwards;
}
.at-game.is-active .at-track::before,
.at-game.is-active .at-track::after {
  animation: 5.5s flyDesktop linear forwards;
}
.at-game.is-active .at-track::after {
  display: block;
}
@media (max-width: 1023px) {
  .at-game.is-active .at-track {
    animation: 5.5s growMobile linear forwards;
  }
  .at-game.is-active .at-track::before,
  .at-game.is-active .at-track::after {
    animation: 5.5s flyMobile linear forwards;
  }
}
@media (max-width: 389px) {
  .at-game.is-active .at-track::before,
  .at-game.is-active .at-track::after {
    animation: 5.5s flyMobileSmall linear forwards;
  }
}

/* ---------- лента ставок ---------- */

.at-feed {
  position: absolute;
  z-index: 0;
  top: 7em;
  left: 50%;
  width: 100%;
  max-width: 300px;
  height: 50em;
  overflow: hidden;
  transform: translateX(-50%);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
@media (max-width: 768px) {
  .at-feed {
    top: 5em;
    height: 400px;
    transform: translateX(-50%) scale(0.9);
  }
}
@media (max-width: 389px) {
  .at-feed {
    top: -5em;
    transform: translateX(-50%) scale(0.7);
  }
}
.at-feed__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease-in-out;
}
.at-feed__item {
  display: grid;
  grid-template-columns: 30px 40px 40px 60px 40px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 4px 12px;
  border-radius: 329.626px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 28.21px 0 rgba(0, 0, 0, 0.2);
  transition: background 0.5s ease-in-out;
}
.at-feed__item.is-active {
  background: rgba(21, 255, 0, 0.6);
}
.at-feed__avatar {
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 100%;
  object-fit: cover;
}
.at-feed__text {
  font-size: 12px;
  color: #fff;
  text-align: center;
}
.at-feed__tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 100px;
  background: #2166bb;
  font-size: 12px;
  line-height: normal;
  color: #fff;
  text-align: center;
}
.at-feed__tag.is-purple {
  background: #9747ff;
}

/* ---------- окно выигрыша (внутри рамки) ---------- */

.at-modal {
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.at-modal.is-active {
  z-index: 4;
  opacity: 1;
}
.at-modal__container {
  position: relative;
  z-index: 2;
  padding: 50px 24px;
}
@media (max-width: 991px) {
  .at-modal__container {
    padding: 0 24px;
  }
}
.at-modal__value,
.at-modal__title,
.at-modal__text {
  text-align: center;
  text-transform: uppercase;
}
.at-modal__value {
  font-size: 16.3em;
  color: #fff;
  text-shadow: 0 1.6rem 0.35rem #f40202;
}
.at-modal__title {
  font-size: 8rem;
  color: #fff;
  text-shadow: 0 1rem 0.2rem #f40202;
}
.at-modal__text {
  font-size: 5em;
  color: #15ff00;
  text-shadow: 0 1rem 0.2rem #f40202;
}
.is-modal-open .at-game .at-button {
  pointer-events: all;
}
.is-modal-open .at-game .at-btn-wrap::before {
  display: block;
}
.is-modal-open .at-game .at-go,
.is-modal-open .at-game .at-feed,
.is-modal-open .at-game .at-track,
.is-modal-open .at-game .at-mult {
  display: none;
}
.is-modal-open .at-game .at-balance__value::before {
  opacity: 1;
}
.is-modal-open .at-game .at-cta {
  display: flex;
}

/* ---------- дождь монет поверх экрана ---------- */

.at-effects {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 997;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  pointer-events: none;
}
.at-effects.is-hidden {
  display: none;
}
.at-effects__block {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ---------- установка (платформа ставит data-td-install-state): текст приглушён, кольцо — как .button-loader оригинала ---------- */

.at-cta__loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.at-cta__loader::before {
  content: '';
  width: 30px;
  height: 30px;
  border: 4px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: rotation-loader 1s linear infinite;
}
.at-cta[data-td-install-state] {
  pointer-events: none;
}
.at-cta[data-td-install-state] .at-btn__label {
  opacity: 0.2;
}
.at-cta[data-td-install-state] .at-cta__loader {
  display: flex;
}
