* {
    box-sizing: border-box;
}

body {
    height: 100vh;
    background-color: #16103D;
    font-family: "Poppins", sans-serif;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

main {
    background: url("../img/chicken-bg.png") top / contain no-repeat;
    min-height: 800px;
}

section {
    max-width: 1280px;
    margin: 0 auto;
}

.section1 {
    padding-top: 192px;
}

.title {
    font-weight: 700;
    font-size: 62px;
    line-height: 68px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    margin-bottom: 127px;
}

.yellow {
    color: #FFDC41;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 303px;
    height: 52px;
    border-radius: 8px;
    border-width: 1px;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #1E1E28;
    box-shadow: 0px 0px 25px 0px #C0A00D;
    background: linear-gradient(270.97deg, #E3BA08 0%, #FFDC41 47.5%, #E3BA08 100%);
    margin-bottom: 239px;
    text-decoration: unset;
}

.game-container {
    position: relative;
    width: 1048px;
    height: 616px;
    border: 6px solid #372873;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 72px;
}

.bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 1741px; 
    height: 100%;
    background: #161824 url('../img/bg.png') top / 1741px no-repeat;
    transition: transform 0.2s linear;
}

.chicken {
    position: absolute;
    bottom: 170px;
    left: 10px;
    width: 148px;
    height: 137px;
    background-size: contain;
    transition: transform 0.1s ease-in-out;
}

.go-btn,
.cashout-btn {
    font-size: 18px;
    cursor: pointer;
    background: #37BD55;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    box-shadow: 0px 2px 0px 0px #282937;
    width: 184px;
    height: 68px;
    border-radius: 8px;
    padding: 8px;
    font-weight: 700;
    font-size: 20px;
    line-height: 20px;
    letter-spacing: 0%;
}

.cashout-btn {
    background-color: #FEBC2F;
    color: #1B1D1E;
    margin-right: 8px;
    flex-direction: column;
}

.coins {
    position: absolute;
    top: 130px;
    left: 0;
    transition: transform 0.2s linear;
}

.coin {
    position: absolute;
    width: 118px;
    height: 121px;
    border-radius: 50%;
    transition: transform 0.3s;
}

.flip {
    animation: flip 0.3s ease-in-out;
}

@keyframes flip {
    0% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(90deg);
    }

    100% {
        transform: rotateY(180deg);
    }
}

#coin1 {
    left: 190px;
    background: url('../img/coin1-blue.png') center / cover no-repeat;
}

#coin2 {
    left: calc(196px + 168px);
    background: url('../img/coin2-blue.png') center / cover no-repeat;

}

#coin3 {
    left: calc(196px + 168px * 2);
    background: url('../img/coin3-blue.png') center / cover no-repeat;
}

#coin4 {
    left: calc(196px + 168px * 3);
    background: url('../img/coin4-blue.png') center / cover no-repeat;
}

#coin5 {
    left: calc(196px + 168px * 4);
    background: url('../img/coin5-blue.png') center / cover no-repeat;
}

#coin6 {
    left: calc(196px + 168px * 5);
    background: url('../img/coin6-blue.png') center / cover no-repeat;
}

#coin7 {
    left: calc(196px + 168px * 6);
    background: url('../img/coin7-blue.png') center / cover no-repeat;
}

#coin8 {
    left: calc(196px + 168px * 7);
    background: url('../img/coin8-blue.png') center / cover no-repeat;
}

#egg {
    top: -20px;
    left: calc(210px + 164px * 8);
    width: 146px;
    height: 163px;
    background: url('../img/egg.png') center / cover no-repeat;
    animation: win-egg 3s infinite ease-in-out;
}

#egg.win-egg {
    background: url('../img/win-egg.png') center / cover no-repeat;
}

@keyframes win-egg {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

#coin1.flipped {
    background: url('../img/coin1-green.png') center / cover no-repeat;
}

#coin2.flipped {
    background: url('../img/coin2-green.png') center / cover no-repeat;
}

#coin3.flipped {
    background: url('../img/coin3-green.png') center / cover no-repeat;
}

#coin4.flipped {
    background: url('../img/coin4-green.png') center / cover no-repeat;
}

#coin5.flipped {
    background: url('../img/coin5-green.png') center / cover no-repeat;
}

#coin6.flipped {
    background: url('../img/coin6-green.png') center / cover no-repeat;
}

#coin7.flipped {
    background: url('../img/coin7-green.png') center / cover no-repeat;
}

#coin8.flipped {
    background: url('../img/coin8-green.png') center / cover no-repeat;
}

.game-container .coin.gold {
    background: url('../img/gold.png') center / cover no-repeat !important;
}

.btns {
    background-color: #333547;
    position: absolute;
    left: 40px;
    bottom: 20px;
    right: 40px;
    padding: 12px;
    border-radius: 12px;
    box-sizing: border-box;
    display: flex;
}

.min-max {
    display: flex;
    box-shadow: 0px 2px 0px 0px #282937;
    background-color: #454657;
    padding: 8px;
    border-radius: 8px;
    width: 257px;
    align-items: center;
    justify-content: space-between;
    margin-right: 12px;
}

.min-max button {
    background-color: #535464;
    padding: 4px;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    font-size: 20px;
    line-height: 20px;
    letter-spacing: 0%;
    color: #ffffff;
    width: 56px;
}

.min-max span,
li {
    font-weight: 600;
    font-size: 20px;
    line-height: 20px;
    letter-spacing: 0%;
    color: #ffffff;
}

ul {
    display: flex;
    align-items: center;
    width: 196px;
    justify-content: space-between;
    list-style: none;
}

li {
    width: 40px;
    height: 44px;
    box-shadow: 0px 2px 0px 0px #282937;
    background: #454657;
    padding: 8px;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.active {
    box-shadow: 0px 0px 10px 0px #ffd147;
}

.cashout-btn.inactive {
    display: none;
}

.cashout-btn #cashout {
    display: block;
}

.cashout-btn.inactive #cashout {
    display: none;
}

@keyframes chickenJump {

    0%,
    100% {
        transform: translate(840px, 0);
    }

    50% {
        transform: translate(840px, -50px);
    }
}

.jumping-chicken {
    animation: chickenJump 0.6s infinite ease-in-out;
}

footer {
    padding-bottom: 56px;
}

.footer-methoods {
    max-width: 1280px;
    display: flex;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 44px;

}

.footer-methoods div {
    display: flex;
    align-items: center;
    gap: 44px;
}

.footer-methoods img {
    width: 100px;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #140D39E5;
    z-index: 2;
}

.popup-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 304px;
    border-radius: 12px;
    background-color: #1E1450;
    display: flex;
    align-items: center;
    padding: 32px 24px;
    flex-direction: column;
}

.popup-title {
    background: linear-gradient(97.52deg, #503699 12.39%, #5B16AF 69.89%);
    width: 100%;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #7C68D4;
    margin-bottom: 32px;
    color: #fff;
    font-weight: 400;
    font-size: 26px;
    line-height: 52px;
    text-align: center;
}

.popup-title .yellow {
    font-weight: 700;
    font-size: 40px;
    line-height: 52px;
}

.popup .btn {
    display: flex;
    width: 452px;
    border-radius: 8px;
    text-decoration: none;
    padding: 16px;
    box-shadow: none;
}

.win {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #00000035;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(196, 196, 196, 0.68);
    border-radius: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 300px;
    height: 300px;
    transition: opacity 0.3s ease-out;
}

.win h4 {
    font-size: 40px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
}

.win span {
    color: #37BD55;
    font-weight: 700;
    font-size: 24px;
}

.win .yellow {
    color: #FFDC41;
    font-size: 50px;
    margin-bottom: 20px;
}

.win div {
    display: flex;
    align-items: center;
}

.win .usd {
    background-color: #37BD55;
    border-radius: 50%;
    font-weight: 400;
    padding: 2px;
    width: 30px;
    font-size: 20px;
    height: 30px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.win.show {
    display: flex;
    animation: winFly 3s ease-out forwards;
}

@keyframes winFly {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -55%) scale(1.1) rotate(-20deg);
        opacity: 1;
    }

    40% {
        transform: translate(-50%, -60%) scale(1) rotate(20deg);
    }

    60% {
        transform: translate(-50%, -65%) scale(1.05) rotate(-10deg);
    }

    80% {
        transform: translate(-50%, -70%) scale(1) rotate(10deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -75%) scale(0.8) rotate(0deg);
        opacity: 0;
    }
}

@keyframes confetti-slow {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0);
    }

    100% {
        transform: translate3d(25px, 105vh, 0) rotateX(360deg) rotateY(180deg);
    }
}

@keyframes confetti-medium {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0);
    }

    100% {
        transform: translate3d(100px, 105vh, 0) rotateX(100deg) rotateY(360deg);
    }
}

@keyframes confetti-fast {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0) rotateY(0);
    }

    100% {
        transform: translate3d(-50px, 105vh, 0) rotateX(10deg) rotateY(250deg);
    }
}

@keyframes hideConf {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes showPopup {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.container {
    position: fixed;
    top: 0;
    width: 100vw;
    height: 100vh;
}

.confetti-container {
    perspective: 700px;
    position: absolute;
    overflow: hidden;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.confetti {
    position: absolute;
    z-index: 1;
    top: -10px;
    border-radius: 0%;
}

.confetti--animation-slow {
    animation: confetti-slow 2.25s linear 1 forwards;
}

.confetti--animation-medium {
    animation: confetti-medium 1.75s linear 1 forwards;
}

.confetti--animation-fast {
    animation: confetti-fast 1.25s linear 1 forwards;
}

.js-container {
    display: none;
    transition: opacity 0.3s ease-out;
}

.js-container.container.show {
    display: block;
    animation: hideConf 3s ease-out forwards;
}

.popup.show {
    display: block;
    animation: showPopup 1s ease-out forwards;
}

.act {
    display: flex;
    width: 416px;
    justify-content: flex-end;
    margin-left: 88px;
}

@media (max-width: 900px) {
    main {
        background-image: url("../img/mob-bg.png");
        background-position-y: 30px;
    }

    .section1 {
        padding-top: 84px;
    }

    .title {
        font-size: 32px;
        line-height: 32px;
        text-align: center;
        margin-bottom: 351px;
    }

    .btn {
        margin: 0 auto 72px;
    }

    .game-container {
        width: calc(100% - 16px);
        max-width: 378px;
        background-size: 1123px;
        height: 568px;
    }

    .bg {
        width: 1123px; 
        background-size: 1123px;
    }

    .chicken {
        height: 80px;
        width: 86px;
        bottom: 282px;
    }

    .coins {
        top: 84px;
    }

    #coin1 {
        left: 123px;
    }

    #coin2 {
        left: 232px;
    }

    #coin3 {
        left: 341px;
    }

    #coin4 {
        left: 448px;
    }

    #coin5 {
        left: 558px;
    }

    #coin6 {
        left: 668px;
    }

    #coin7 {
        left: 775px;
    }

    #coin8 {
        left: 882px;
    }

    .btns {
        height: 208px;
        width: calc(100% - 40px);
        left: 20px;
        flex-direction: column;
    }

    .min-max {
        width: 100%;
        margin-bottom: 12px;
    }

    ul {
        width: 100%;
        justify-content: space-between;
    }

    li {
        width: calc(100% / 4.5);
    }

    .coin {
        width: 76px;
        height: 78px;
    }

    .chicken img {
        width: 100%;
    }

    .footer-methoods {
        flex-direction: column;
        gap: 20px;
    }

    .footer-methoods div {
        gap: 20px;
    }

    .footer-methoods img {
        width: 70px;
    }

    .act {
        margin: 0;
        width: 100%;
        margin-top: 12px;
        justify-content: space-between;
    }

    .act button {
        width: 100%;
        margin: 0;
    }

    .act .cashout-btn {
        width: calc(100% / 2.1);

    }

    @keyframes chickenJump {
        0%,
        100% {
            transform: translate(220px, 0);
        }

        50% {
            transform: translate(220px, -50px);
        }
    }

    #egg {
        left: 990px;
        width: 83px;
        height: 93px;
        top: 4px;
    }

    .popup-content {
        max-width: 344px;
        padding: 24px 12px 32px;
        height: 252px;
    }

    .popup-title {
        padding: 16px 0;
        font-size: 26px;
        line-height: 40px;
    }

    .popup-title .yellow {
        font-size: 32px;
        line-height: 40px;
    }

    .popup .btn {
        width: 100%;
    }
}