@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

body.light {
    & .slot-upgrades-section .slot-upgrade {
        background-color: rgba(255, 255, 255);
        border: 2px solid #333;
    }
    & .slot-stats .table-itm, .crypto-stats .table-itm {
        background-color: rgba(255, 255, 255, 0.5);
        border: 2px solid #333;
    }
    & .slot-drip > .flexbox > .drip-item, .crypto-nfts > .flexbox > .nft-itm {
        background-color: rgba(255, 255, 255, 0.5);
        border: 2px solid #333;
    }
    & .money-exchange > .flexbox > .exchange-item, .crypto-exchange > .flexbox > .exchange-item {
        background-color: rgba(255, 255, 255, 0.5);
        border: 2px solid #333;
    }
    & .trophy-item {
        background-color: rgba(255, 255, 255, 0.5);
        border: 2px solid #333;
    }
}

.game-cont {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 30px;
    min-height: calc(100dvh - 60px);
    position: relative;
    overflow: hidden;
}
.slotmachine-body {
    height: 400px;
    width: 250px;
    background-color: gold;
    border: 4px solid black;
    border-radius: 8px;
    border-top-left-radius: 150px;
    border-top-right-radius: 150px;
    z-index: 5;
    margin-top: 20px;

    & .half-circle {
        position: relative;
        top: 15px;
        left: 15px;
        height: 110px;
        width: 210px;
        background-color: lightblue;
        border: 4px solid black;
        border-radius: 8px;
        border-top-left-radius: 200px;
        border-top-right-radius: 200px;

        & .ball {
            position: absolute;
            top: 78px;
            left: 75px;
            height: 25px;
            width: 50px;
            background-color: red;
            border: 4px solid black;
            border-bottom: none;
            border-top-right-radius: 100px;
            border-top-left-radius: 100px;
        }
        & .line {
            position: absolute;
            left: 96px;
            height: 103px;
            width: 8px;
            background-color: black;
            transform-origin: bottom center;

            &.a {
                transform: rotate(-45deg);
            }
            &.c {
                transform: rotate(45deg);
            }
        }
    }
    & .reels {
        position: relative;
        top: 30px;
        left: 15px;
        height: 100px;
        width: 210px;
        border-radius: 8px;
        background-color: red;
        border: 4px solid black;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0px 10px;

        & > .reel {
            height: 80px;
            width: 55px;
            border: 2px solid black;
            border-radius: 8px;
            background-color: black;
            font-size: 36px;
            display: flex;
            justify-content: center;
            align-items: center;
            user-select: none;
            overflow-y: hidden;

            & .spinning {
                animation: spinning 0.1s infinite;
            }
        }
    }
    & .result-message {
        background-color: black;
        color: white;
        padding: 10px;
        position: relative;
        top: 45px;
        left: 15px;
        font-size: 20px;
        border-radius: 8px;
        height: 66px;
        width: 210px;
        user-select: none;
        text-align: center;

        display: flex;
        justify-content: center;
        align-items: center;
    }
    & .spin-cost {
        position: relative;
        top: 60px;
        font-size: 16px;
        padding: 0 20px;
        font-weight: bold;
        user-select: none;
        text-align: center;
        color: rgba(0, 0, 0, 0.5);
    }
}
.spin-box {
    position: absolute;
    left: calc(50vw + 100px);
    top: calc(50vh - 30px);
    width: 54px;
    height: 50px;
    background-color: red;
    border: 4px solid black;
    border-radius: 16px;

    & .spin-lever {
        position: absolute;
        left: 23px;
        top: -70px;
        height: 100px;
        width: 15px;
        border: 4px solid black;
        background-color: brown;
        cursor: pointer;
        border-radius: 8px;
        will-change: transform;
        transform-origin: bottom center;
        z-index: 10;
    
        &.spinning {
            animation: spin 0.75s ease-in-out;
            pointer-events: none;
        }
        &.blocked {
            cursor: not-allowed;
        }
        & .lever-ball {
            height: 30px;
            width: 30px;
            background-color: red;
            border: 4px solid black;
            border-radius: 50%;
            position: relative;
            top: -15px;
            left: -12px;
        }
    }
}

.hacking-terminal.hidden {
    display: none;
}
.hacking-terminal > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
    line-height: 1.5;

    & .prompt {
        color: teal;
        font-weight: bold;
    }
}
.ht {
    background-color: transparent;
    color: #0f0;
    border: 2px solid teal;
    font-family: 'Source Code Pro', monospace;
    border-radius: 8px;
    padding: 4px 8px;

    &::placeholder {
        color: teal;
        opacity: 0.5;
    }
    &:focus {
        caret-color: teal;
        outline: 1px solid #0f0;
    }
}
.terminal-history {
    display: flex;
    flex-direction: column-reverse;
    color: teal;
    background-color: rgb(19, 19, 20);
    border-radius: 8px;
    margin-top: -4px;

    & > p {
        line-height: 1.1;
        margin: 6px 12px;

        &:first-child {
            margin-bottom: 12px;
        }
        &:last-child {
            margin-top: 12px;
        }
        & > .code {
            color: #0f0;
            font-family: 'Source Code Pro', monospace;
            font-size: 12px;
            line-height: 1.2;
        }
    }
}

@keyframes spinning {
    0% {
        transform: translateY(-50px);
    }
    100% {
        transform: translateY(50px);
    }
}
@keyframes spin {
    0% {
        transform: scaleY(1);
    }
    25% {
        transform: scaleY(0);
        /* top: -80px; */
    }
    50% {
        transform: scaleY(-1);
        top: -90px;
    }
    75% {
        transform: scaleY(0);
        /* top: -80px; */
    }
    100% {
        transform: scaleY(1);
    }
}


.slot-upgrades-section {
    & > .slot-upgrade {
        background-color: rgba(0, 0, 0, 0.5);
        width: 175px;
        height: 500px;
        text-align: center;
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-radius: 12px;

        & > .level {
            display: flex;
            flex-direction: column;

            & > div {
                background-color: teal;
                height: 30px;
                width: 60px;
                border-radius: 4px;
                margin: 4px auto;

                &.empty {
                    background-color: transparent;
                    border: 2px solid teal;
                }
            }
        }
    }
}

.table-itm {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 10px 20px;
    text-align: center;

    & > h3 {
        margin-bottom: 12px;
    }
    & > .stat {
        margin-bottom: 8px;
        font-size: 18px;
    }
}

.unlocked-drip, .unlocked-trophies {
    &.hidden {display: none;}
    & > .flexbox {
        justify-content: center;
        gap: 40px;
        padding: 0 30px;

        & > h1 {font-size: 54px;}
    }
}
.slot-drip > .flexbox > .drip-item {
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid teal;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 250px;
    width: 175px;

    & > * {margin: 0;}
    & > h1 {font-size: 42px;}
    &.small > h3 {
        font-size: 20px;
    }
}

.money-exchange > .flexbox > .exchange-item, .crypto-exchange > .flexbox > .exchange-item {
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid teal;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    width: 250px;
    text-align: center;

    & > * {margin: 0;}
    &.hidden {display: none;}
}
.money-exchange.hidden {
    display: none;
}

.trophy-item {
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid teal;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    width: 250px;
    text-align: center;

    & > * {margin: 0;}
}

.lootbox {
    background-color: gray;
    border: 4px solid black;
    border-radius: 12px;
    width: 200px;
    overflow-x: hidden;
    box-shadow: inset 0px 0px 20px rgba(0, 0, 0);

    & .cont {
        display: flex;
        justify-content: center;
    }
    &.opening > .cont {
        animation: opening 1s infinite linear;
    }
}

@keyframes opening {
    0% {
        transform: translate(-150%);
    }
    50% {
        transform: translate(0%);
    }
    100% {
        transform: translate(150%);
    }
}

@media (max-width: 400px) {
    .slot-machine-game > .game-cont {
        scale: 0.9;
    }
}
