* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    font-family: "Rubik", sans-serif;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(#141414, #2b0220);
    color: #ffffff;
    overflow: hidden;
}

/* Основной фон игры */
.game {
    width: 100%;
    background: linear-gradient(180deg, #521515 0%, #100F0F 100%);
    color: #ffffff;
}

.game__inner {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* .game__background {
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url("static/aviator-bg.png");
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: -1;
} */

.game__logo {
    width: 250px;
    margin-bottom: -20px;
}

.game__header {
    position: absolute;
    top: 25px;
    display: flex;
    justify-content: center;
    filter: drop-shadow(20px #1f1f1f);
    padding-top: 2vh;
}

.game__header img {
    width: 80%;
    height: auto;
}

.game__signal-block {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: absolute;
    top: 140px;
    width: 100%;
}

.game__signal {
    margin-bottom: 34px;
    margin-top: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 217px;
    height: 217px;
    background-color: #7f0c1d;
    border: 4px solid white;
    border-radius: 50%;
    font-size: 3.2em;
    font-weight: 500;
    transition: all .5s;
    z-index: 10;
}

.game__signal span {
    text-transform: uppercase;
    font-size: 20px;
    text-align: center;
}

.error-notification {
    width: 300px;
    height: 50px;
    position: absolute;
    top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: -25px;
    clip-path: inset(0px round 10px 10px);
    transition: all .2s;
    transform: translateY(-99px);
    z-index: 999;
}
.error-notification--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.error-notification__background {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 300px;
    height: 50px;
    background: #FFEBEB;
    border-radius: 10px;
    margin-bottom: -52px;
}
.error-notification__icon {
    z-index: 2;
}
.error-notification__exit {
    position: absolute;
    right: 0;
    width: 50px;
    height: 50px;
    z-index: 2;
    cursor: pointer;
    background: #FFC2C2;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    border: none;
}
.error-notification__text {
    color: #000000;
    font-size: 12px;
    font-weight: 900;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding-left: 10px;
    padding-right: 45px;
}
.error-notification__progress {
    width: 287px;
    height: 3px;
    background: linear-gradient(90deg, #E00000 0%, #E00000 100%) left /0% 100% no-repeat #D9D9D9;
    z-index: 4;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 5px;
}

@keyframes animateErrorProgress {
    100% {
        background-size: 100% 100%;
    }
}

.game__timer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    margin: 25px auto;
    width: 230px;
}
.game__timer--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.game__timer-value {
    font-size: 20px;
    font-weight: 900;
    height: 35px;
}

.game__timer-progress {
    width: 230px;
    height: 18px;
    background: linear-gradient(90deg, #FF0303 0%, #B4B4B4 100%) left /0% 100% no-repeat #D9D9D9;
    border-radius: 15px;
}

@keyframes animateProgress {
    100% {
        background-size: 100% 100%;
    }
}

.game__controls {
    position: absolute;
    top: 389px;
    width: 100%;
}

.game__buttons {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 220px;
    justify-content: flex-start;
    align-items: stretch;
    margin: 0 auto;
}

.game__button {
    border-radius: 30px;
    font-weight: 900;
    font-size: 24px;
    background-color: #d11f39;
    color: white;
    text-shadow: white 0 0 30px;
    position: relative;
    height: 65px;
    border: none;
    cursor: pointer;
    transition: all .2s;
    z-index: 0;
    box-sizing: border-box;
    width: 100%;
}

.game__button::before {
    content: "";
    position: absolute;
    inset: 0px;
    z-index: -1;
    background: linear-gradient(90deg, #bb112b 1%, #d7102e 100%);
    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
    opacity: 0.6;
    filter: blur(15px);
    border-radius: 30px;
}
.game__button:active {
    transform: scale(95%);
}
.game__button--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.game__astronaut {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 150px;
    max-width: 150px;
    height: auto;
    z-index: 2;
    animation: rocket-diagonal 8s linear infinite;
}

@keyframes rocket-diagonal {
    0% {
        transform: translate(0, 0) rotate(-20deg) scale(1);
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    80% {
        transform: translate(90vw, -110vh) rotate(0deg) scale(1.06);
        opacity: 1;
    }
    95% {
        opacity: 0.7;
    }
    100% {
        transform: translate(110vw, -140vh) rotate(40deg) scale(1.1);
        opacity: 0;
    }
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b1220;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preloader-img {
  max-width: 180px;
  max-height: 180px;
  margin-bottom: 52px;
  display: block;
}

.preloader-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.2); /* полупрозрачный круг */
  border-top: 4px solid #18a0fb;          /* основной цвет */
  box-shadow: 0 4px 24px #18a0fb33;
  animation: spin 0.85s linear infinite;   /* чуть быстрее */
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

