@font-face {
    font-family: 'Neon';
    src: url('../gfx/fonts/NEON.ttf');
}
@font-face {
    font-family: 'Yellowtail';
    src: url('../gfx/fonts/Yellowtail-Regular.ttf');
}
@font-face {
    font-family: 'Sriracha';
    src: url('../gfx/fonts/Sriracha-Regular.ttf');
}

*{
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body{
    background-repeat: no-repeat;
    background-size: cover;
    color: #deb887;
    font-family: 'Courier New', Courier, monospace;
    background-color: #000;
}

body > div{
    min-height: 100dvh;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
}

header{
    margin: 30px 0;
    font-family: 'Neon';
    width: 100dvw;
}

footer{
    margin: 30px 0;
    width: 100dvw;
}

h1{
    margin: 0 auto 10px;
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    text-shadow: 2px 2px 25px #deb887;
    position: relative;
}

h1 img{
    position: relative;
    top: 5px;
    width: 3rem;
    box-shadow: 2px 2px 20px #deb887;
    border-radius: 50%;
}

header p{
    font-size: 2rem;
    text-shadow: 2px 2px 5px #deb887;
    margin: 0 auto;
    text-align: center;
    text-shadow: 2px 10px 15px #deb887;
}

footer p{
    font-family: 'Yellowtail';
    font-size: 1.5rem;
    text-shadow: 2px 5px 25px #deb887;
    margin: 0 auto;
    text-align: center;
}

.flex-container{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.reels{
    background-color: #deb887;
    border-radius: 10px;
    height: 120px;
    box-shadow: 0 1px 10px #deb887;
}

.reel-container{
    width: 100px;
}

#reel1, #reel2, #reel3{
    position: relative;
}

#reel1 img, #reel2 img, #reel3 img{
    width: 100%;
    position: absolute;
    top: -110px;
    transform: translateY(-50%);
    z-index: 1;
}

.above, .under{
    position: relative;
    background-color: #000;
    border-radius: 10px;
    box-shadow: 0 0 10px #deb887;
    height: 120px;
    z-index: 2;
    flex-direction: column;
    justify-content: space-evenly;
    font-family: 'Sriracha';
}

.above span, .under span{
    text-shadow: 2px 2px 15px #deb887;
}

.paytable span:hover, .under span:hover{
    text-shadow: 2px 2px 5px #deb887;
}

.paytable{
    width: 100%;
    justify-content: space-between;
}

.audio-button{
    width: 25px;
}

.audio-button img{
    width: 100%;
}

.audio-button img:hover{
    cursor: pointer;
}

.main-display{
    width: 100%;
    justify-content: center;
    font-size: 1.5rem;
    letter-spacing: .5rem;
    font-style: italic;
    font-family: 'Sriracha';
    color: #32cd32;
    text-shadow: 0 0 10px #32cd32;
}

.invisible{
    visibility: hidden;
}

.good-luck img{
    width: 15px;
}

.above-thirdrow{
    width: 100%;
    justify-content: space-around;
}

.under-firstrow{
    width: 100%;
    justify-content: center;
}

.one-bet, .two-bet, .max-bet{
    margin: 0 20px;
}

.under-secondrow{
    width: 100%;
    justify-content: space-between;
}

.collect-money, .insert-money{
    margin: 0 20px;
}

.paytable-button-container, .audio-button{
    margin: 0 20px;
}

.line-marker{
    width: 20px;
    height: 120px;
    margin: 0 15px;
    background-color: #000;
    border: 3px solid #deb887;
}

.line-marker:first-child{
    width: 20px;
    margin: 0 15px 0 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.line-marker:last-child{
    width: 20px;
    margin: 0 0 0 15px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.line-marker hr{
    border: 2px solid #deb887;
    width: 100%;
}

.line-marker span{
    background-color: #deb887;
    color: #000;
    font-weight: bold;
    width: 100%;
    text-align: center;
    display: inline-block;
}

.handle-container{
    position: relative;
    width: 20px;
    height: 100px;
    justify-content: start;
}

.handle-base{
    background-color: #000;
    display: inline-block;
    width: 5px;
    height: 50px;
    border-radius: 0 5px 5px 0;
    background-color: #a9a9a9;
}

.handle-bottom{
    display: inline-block;
    width: 20px;
    height: 25px;
    border-radius: 0 5px 5px 0;
    background-color: #696969;
}

.handle-middle{
    display: inline-block;
    width: 5px;
    height: 25px;
    position: absolute;
    left: 8px;
    top: 13.5px;
    background-color: #a9a9a9;
}

.handle-top{
    background-color: #f00;
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    position: absolute;
    left: 3.25px;
    top: 0px;
}

.handle-middle:hover, .handle-top:hover{
    cursor: pointer;
}

.spin-container{
    background-color: #000;
    width: 200px;
    height: 110px;
    margin-left: 10px;
    border-radius: 50%;
    box-shadow: 3px 3px 5px #deb887;
}

.btn-spin{
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Sriracha';
    color: #deb887e8;
    padding: 10px 20px;
    border-radius: 50%;
    box-shadow: 3px 3px 10px #deb887;
    width: 150px;
    text-align: center;
}

.btn-spin:hover{
    cursor: pointer;
    text-shadow: 2px 2px 5px #deb887;
}

.btn-spin:active{
    box-shadow: 0 0 0;
}

.under span, .paytable span{
    cursor: pointer;
}

.popup-insert-money, .popup-paytable{
    display: none;
    position: fixed;
    z-index: 3;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #fff;
    background-color: #ffffff48;
}

.popup-paytable{
    z-index: 4;
}

.insert-money-content, .paytable-content{
    background-color: #000;
    margin: auto;
    border: 2px solid #deb887;
    border-radius: 10px;
    width: 88%;
    padding-bottom: 25px;
    box-shadow: 2px 2px 10px #deb887;
    /* inset box shadow property value doesn't work in mobile browsers */
    /* learned it the hard way...*/
}

.insert-money-content{
    max-width: 500px;
}

.paytable-content{
    background-color: #000;
}

table{
    margin: 0 15px 15px 15px;
}

table, td, th{
    border: 2px solid #deb887;
    text-align: center;
    vertical-align: middle;
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Sriracha';
    padding: 10px;
}

tr:first-child{
    color: #deb887;
    text-shadow: 5px 2px 15px #deb887;
}

th{
    font-size: .9rem;
}

.description{
    font-size: .9rem;
    padding-top: 1px;
    padding-bottom: 20px;
}

.small-font{
    font-size: .9rem;
}

/* :has pseudo selector doesn't work in Firefox */
.td-with-image{
    min-width: 40px;
    width: 40px;
    height: 40px;
    background-color: #deb887;
    padding: 3px;
    border: 2px solid #fff;
}

td > img{
    width: 100%;
}

.popup-x{
    width: 100%;
    color: #deb887;
    font-size: 35px;
    font-weight: 900;
    justify-content: flex-end;
    padding: 10px 20px 10px 0;
}

.popup-x span:hover, .popup-x span:focus{
    color: #ffffffcc;
    cursor: pointer;
}

.insert-money-content img{
    width: 100px;
}

.grid-container{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-item{
    margin: 0 auto;
}

.grid-item:last-child{
    grid-column-start: 2;
}

.insert-money-content img:hover, .insert-money-content img:focus{
    cursor: pointer;
    box-shadow: 2px 2px 10px #ffd900;
    border-radius: 50%;
}

.insert-money-content img:active{
    box-shadow: 2px 2px 10px #fff;
}

@media only screen and (max-width: 1024px){
    .paytable-too-big{
        flex-direction: column;
    }

    table{
        margin: 20px auto;
    }
}

@media only screen and (max-width: 720px){
    .reel-container{
        width: 75px;
    }

    .spin-container{
        width: 150px;
        height: 70px;
    }

    .btn-spin{
        width: 100px;
        padding: 10px;
        font-size: 1.5rem;
    }
}

@media only screen and (max-width: 600px){
    .reel-container{
        width: 46px;
    }

    .line-marker{
        width: 15px;
        margin: 0 7px;
        border: 3px solid #deb887;
        font-size: .5rem;
    }
    
    .line-marker:first-child{
        width: 15px;
        margin: 0 7px 0 0;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
    
    .line-marker:last-child{
        width: 15px;
        margin: 0 0 0 7px;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    h1{
        font-size: 1.5rem;
    }

    h1 img{
        width: 1.5rem;
        top: 2px;
    }

    header p, footer p{
        font-size: 1rem;
    }
}

    @media only screen and (max-width: 450px){
    
        .spin-container{
            width: 44px;
            height: 25px;
            box-shadow: 1px 1px 5px #deb887;
        }
    
        .btn-spin{
            width: 40px;
            padding: 3px;
            font-size: .75rem;
            box-shadow: 0 0 0;
        }
    
        .btn-spin:hover{
            box-shadow: 1px 1px 5px #deb887;
            text-shadow: 1px 1px 5px #deb887;
        }
        
        .spin-container:hover{
            box-shadow: 1px 1px 5px #deb887;
        }
        
        .btn-spin:active{
            box-shadow: 0 0 0;
        }

        table td:last-child:not(.description){
            font-size: 1rem;
        }

        .insert-money-content{
            width: 95%;
        }

        .grid-container{
            gap: 0;
        }
    
}