* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    height: 100dvh;
    width: 100vw;
    font-family: "Inter", sans-serif;
    font-weight: bold;
    overflow: hidden;
    display: flex; /* Добавлено */
    flex-direction: column; /* Добавлено */
}

#game {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.img-wrapper {
    overflow: hidden;
}

button {
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    font-family: "Inter", sans-serif;
    font-weight: bold;
}

img {
    width: 100%;
    height: auto;
}





/*Loading Screen*/
.load-wrapper {
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    /*justify-content: center;*/

    padding-top: 300px;

    background: linear-gradient(to bottom, #DB000B, #F73D00, #DB000B);
}

.load-wrapper .load-logo img {
    width: 226px;
    height: auto;
    margin-left: 20px;
    margin-bottom: 30px;
}


.progress-bar {
    width: 308px;
    height: 46px;
    background: url('../img/load/loading0.png') no-repeat center center;
    background-size: cover;
    border-radius: 29px;
    overflow: hidden;
    position: relative;
}

.progress-inner {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 29px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background: url('../img/load/loading.png') repeat-x;
    background-size: auto 100%;
    transition: width 0.3s;
    position: absolute;
    top: 0;
    left: 0;
}


/*Main Screen*/
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    background-color: #0E101D;
    color: #ffffff;
    flex-shrink: 0; /* Добавлено */
}

.header img {
    max-height: 40px;
}


.main {
    position: relative;
    flex-grow: 1; /* Добавлено */
    overflow-x: auto;
    overflow-y: hidden;
    display: flex; /* Добавлено */
    flex-direction: column; /* Добавлено */
    background-color: #0E101D;
}

.win-wrapper {
    position: absolute;
    top: 60px;
    left: 13%;

    border: 5px solid #3ec55b;
    background: #3ec55b80;
    backdrop-filter: blur(35px);

    border-radius: 20px;
    height: 300px;
    width: 300px;

    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    z-index: 20;
    animation: wobble 2.2s linear infinite;

}

.win-text {
    color: #ffffff;
    font-weight: bold;
    font-size: 26px;
}

.sum {
    font-weight: bold;
    font-size: 42px;
}

.yellow {
    color: yellow;
    font-weight: bold;
    font-size: 22px;
}

.win-btn {
    height: 44px;
    width: 82px;
    background-color: yellow;
    border-radius: 6px;
    color: #000000;

}

@keyframes wobble {
    0% {
        transform: rotate(-20deg);
    }
    50% {
        transform: rotate(20deg);
    }
    100% {
        transform: rotate(-20deg);
    }
}


.chicken {
    position: absolute;
    bottom: 48px;
    left: 70px;
    z-index: 13;
    max-width: 140px;
}


.game-wrapper {
    flex-grow: 1; /* Добавлено */
    overflow: auto;
    display: flex;
    position: relative;

}

.cars {
    position: absolute;
    width: 100%;
    display: flex;
    gap: 10px;
}


.game-bg-wrapper {
    position: relative;
    /*margin-bottom: -100px;*/
}




/* ... другие стили ... */

.game-bg {
    display: block;
    width: auto;
    height: 100%;
    position: relative;
    left: -50px;
    top: -100px;
    /* Плавный переход для свойства left */
    transition: left 700ms ease-in-out;
    will-change: left;
}

.chicken {
    position: absolute;
    bottom: 380px;
    left: 30px;
    z-index: 13;
    will-change: transform;

    max-width: 110px;;
}

/* анимация курицы: вверх и обратно */
.chicken.animate {
    animation: chickenMove 700ms ease-in-out;
}
@keyframes chickenMove {
    0% { transform: translateY(0); }
    50% { transform: translateY(-150px); }
    100% { transform: translateY(0); }
}

/* ... остальные стили ... */


/* контейнер для машин */
#carsWrapper {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* базовый стиль машин */
.car {
    position: absolute;
    top: -150px; /* Начальная позиция за экраном */
    z-index: 12;
    will-change: top;
    max-width: 160px;
}

.barrier {
    position: absolute;
    top: 0; /* Позиция над машиной */
    z-index: 12;
    max-width: 160px;
    /*display: none; */
}



.car1 {
    left: 300px;
}

.barrier1 {
    position: absolute;
    top: 90px; /* Позиция над машиной */
    left: 300px;
    z-index: 12;
    max-width: 160px;
}

.car2 {
    left: 600px;
}

.barrier2 {
    position: absolute;
    top: 160px; /* Позиция над машиной */
    left: 600px;
    z-index: 12;
    max-width: 160px;
}

.car3 {
    left: 900px;
}

.barrier3 {
    position: absolute;
    top: 160px; /* Позиция над машиной */
    left: 900px;
    z-index: 12;
    max-width: 160px;
}


.car4 {
    left: 1200px;
}

.barrier4 {
    position: absolute;
    top: 90px; /* Позиция над машиной */
    left: 1200px;
    z-index: 12;
    max-width: 160px;
}


.car5 {
    left: 1500px;
}

.barrier5 {
    position: absolute;
    top: 160px; /* Позиция над машиной */
    left: 1500px;
    z-index: 12;
    max-width: 160px;
}

.car6 {
    left: 1800px;
}

.barrier6 {
    position: absolute;
    top: 160px; /* Позиция над машиной */
    left: 1800px;
    z-index: 12;
    max-width: 160px;
}

.car7 {
    left: 2100px;
}

.barrier7 {
    position: absolute;
    top: 160px; /* Позиция над машиной */
    left: 2100px;
    z-index: 12;
    max-width: 160px;
}


/* Добавьте это в assets/css/styles.css */

/* Скрываем все машины и барьеры по умолчанию */
.car, .barrier {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Стиль для видимых, статичных элементов */
.car.visible, .barrier.visible {
    opacity: 1;
}

/* Анимация для "едущей" машины */
.car.driving {
    opacity: 1;
    animation: driveDown 0.9s linear infinite;
}

@keyframes driveDown {
    0% {
        transform: translateY(-200px); /* Начало над экраном */
    }
    100% {
        transform: translateY(700px); /* Конец внизу экрана */
    }
}





.game-wrapper .game-bg {
    height: 100%;
    width: auto;
    display: block;
    max-width: none;
}


/* анимация курицы: вверх на 100px и обратно */
.chicken.animate {
    animation: chickenMove 700ms ease-in-out;
}


/* Стили для монеток */
.coin-wrapper {
    position: absolute;
    bottom: 390px; /* Позиция на уровне курицы */
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    perspective: 1000px;
    z-index: 11; /* Ниже машины, но выше фона */
}

/* Позиционирование для каждой монетки */
.pos1 .coin-wrapper { left: 380px; }
.pos2 .coin-wrapper { left: 680px; }
.pos3 .coin-wrapper { left: 980px; }
.pos4 .coin-wrapper { left: 1280px; }
.pos5 .coin-wrapper { left: 1580px; }
.pos6 .coin-wrapper { left: 1880px; }
.pos7 .coin-wrapper { left: 2180px; }


.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.coin-value {
    position: absolute;
    top: 45px;
    left: 27px;

    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    z-index: 5;
}

.coin.flipped {
    transform: rotateY(180deg);
}

.coin-front,
.coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.coin-back {
    transform: rotateY(180deg);
}





.footer {
    background-color: #0E101D;
    padding: 12px 10px;
}

.control {
    background-color: #2D2E40;
    padding: 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 22px;
    height: 100%;
    min-height: 200px;
}

.col {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
    width: calc(100% - 60px / 3);
}

.dif-btns {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50%;
    gap: 10px;
}

.dif-btn {

    height: 100%;

    border-radius: 12px;
    width: calc(100% - 30px / 4);
    display: flex;
    align-items: center;
    justify-content: center;

    color: #8E91A9;
    background-color: #474961;
}

.dif-btn { background-color: transparent; transition: background-color .15s ease; }
.dif-btn.active { background-color: #474961; } /* цвет под себя поменяйте */


.bid {
    width: 100%;
    height: 50%;
    border-radius: 12px;
    background-color: #3A3C53;
    color: #8E91A9;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px;
    box-shadow: 0 1px 5px 0 rgba(17, 25, 39, 0.37);

    gap: 10px;
}

.bid span {
    font-size: 25px;
}



.button-min,
.button-max {
    height: 100%;
    width: 57px;
    background-color: #474961;
    border-radius: 6px;
    color: #8E91A9;

}

.bid-buttons {
    height: 50%;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
}

.bid-buttons img {
    width: 14px;
    height: 14px;
}

.bid-buttons__1,
.bid-buttons__2,
.bid-buttons__3,
.bid-buttons__4 {
    background-color: #3A3C53;
    border-radius: 11px;
    box-shadow: 0 1px 5px 0 rgba(17, 25, 39, 0.37);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8E91A9;
    gap: 4px;

    height: 100%;
    width: calc(100% - 21px / 4);
}

.control-text-wrapper {
    display: flex;
    width: 100%;
    height: 50%;
    align-items: flex-start;
    justify-content: space-between;
}

.control-text {
    font-size: 19px;
    font-weight: bold;

    color: #8E91A9;
}


.main-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 100%;
    width: 100%;
}

.cash-out,
.start {
    border-radius: 12px;
    height: 100%;
    width: calc(100% - 8px / 2);
    font-size: 17px;
    font-weight: bold;
}

.cash-out {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #3B2C2C;
    background-color: #FFB330;

}

.start {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #2FAA52;
}

@media (max-width: 800px) {

    .control {
        flex-direction: column;
    }
    .desc {
        display: none;
    }

    .button-max, .button-min {
        min-height: 30px;
    }
}



