@font-face {
    font-family: Roboto;
    src: url(./media/Ro.ttf);
}

body{
    font-family: Roboto;
    background: linear-gradient(
        180deg,
        #ffa845,
        #fa5c28
    );
}
.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
width-limit{
    display: block;
    max-width: 500px;
    margin-inline:auto;
    padding: 15px;
}
chance-wrapper{
    display: grid;
    grid-template-rows: max-content max-content;
    background: rgba(255,255,255,0.9);
    border-radius:10px;
    padding:5px;
    padding-inline:10px;
    grid-gap: 2px;
    justify-content: center;
    
}
below, chance{
    font-size:9px;
    display: flex;
    justify-content: center;

}
below{
    color: rgba(0,0,0,0.5);
}
chance{
    font-size:16px;
    font-weight: bold;
    min-width: 50px;
}
header, ctrls, chances-box{
    display: flex;
    margin-inline:auto;
    margin-bottom: 10px;
    padding:10px;
    background: rgba(255,255,255,0.4);
    border-radius: 15px;
}
header, chances-box{
    display: grid;
    grid-gap:10px;
    grid-template-columns: 1fr max-content;
}
ctrls, chances-box{
    background: rgba(255,255,255,0.2);
    grid-gap: 10px;
    transition: 0.35s all ease-in-out;
    max-height: 60px;
}
chances-box{
    padding-left: 0px;
}
board{
    --size: 6;
    grid-template-columns: repeat(var(--size), 1fr);
    grid-template-rows: repeat(var(--size), 1fr);

    display: grid;
    background: rgba(255,255,255,0.8);
    max-height: 500px;
    aspect-ratio: 1/1;
    border-radius: 15px;
    box-shadow: 0px 0px 20px rgba(0,0,0,0.2);
    margin-inline:auto;
    overflow: hidden;
    grid-gap:8px;
    padding:10px;
}
cell{
    background:rgba(255,255,255,0.8);
    cursor: pointer;
    transition: 0.3s all;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

cell:hover{
    /*
    background: white;
    transform: scale(1.05);
    box-shadow: 0px 0px 10px rgba(0,0,0,0.04);
    
     */
}
:root{
    --grd_1: linear-gradient(90deg, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 99%);
    --grd_2: linear-gradient(90deg,
        rgba(0, 0, 0, 0) 0.5%,
        rgba(0, 0, 0, 0.3) 2%,
        rgba(0, 0, 0, 1) 3.8% 70%,
        rgba(0, 0, 0, 0) 99%);
}

health, chance-flow{
    display: flex;
    grid-gap: 7px;
    transition: 0.5s all;
    overflow: hidden;
    -webkit-mask-image: var(--grd_1);
    mask-image: var(--grd_1);
}
chance-flow{
    -webkit-mask-image: var(--grd_2);
    mask-image: var(--grd_2);
    grid-gap: 0px;
    padding-inline: 5px;
    overflow: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
chance-flow::-webkit-scrollbar {
    display: none;
}

health img{
    width: 40px;
}
health img{
    filter: grayscale(1);
    -webkit-filter: grayscale(1);
    opacity: 0.4;
    transition: 0.3s all;
}
health img.red{
    filter: grayscale(0);
    -webkit-filter: grayscale(0);
    opacity: 1.0;
}
cell.bomb, cell.explo{
    background: linear-gradient(
        0deg,
        #fa4b28,
        #fc8b74
    );
}
cell.explo{
    animation: nooope 0.5s forwards;
    animation-timing-function: ease-in-out;
}
cell.money{
    background: linear-gradient(
            0deg,
            #10c90a,
            #94d492
    );
}
cell img{
    width: 40px;
    transform: scale(0);
    transition: 0.3s all;
    position: absolute;
}
.money img, .bomb img, .explo img{
    transform: scale(1);
}
.bomb-underlay{
    opacity: 0;
}
.remove-explo img{
    transition: 1s all;
}
.remove-explo img:first-of-type{
    transform: scale(0);
}
.remove-explo .bomb-underlay{
    opacity: 1;
}
.bounce{
    box-shadow: 0px 0px 10px rgba(0,0,0,0.05);

    animation: bounce 0.5s forwards;
    animation-timing-function: ease-in-out;
}
@keyframes bounce {
    0%   { transform: scale(1); }
    33%  { transform: scale(0.9); }
    67%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}
@keyframes nooope {
    0% {
        transform: scaleX(1.0);
    }
    15% {
        transform: scaleX(0.95) translateX(-5px);
    }
    30%{
        transform: scaleX(0.92) translateX(10px);
    }
    40%{
        transform: scaleX(0.90) translateX(-10px);
    }
    50%{
        transform: scaleX(0.90) translateX(10px);
    }
    60%{
        transform: scaleX(0.90) translateX(-10px);
    }
    70%{
        transform: scaleX(0.92) translateX(10px);
    }
    85%{
        transform: scaleX(0.95) translateX(-5px);
    }
    100%{
        transform: scaleX(1.0);
    }
}
btn{
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 7px;
    padding: 6px;
    padding-inline: 9px;
    display: grid;
    grid-template-columns: max-content max-content;
    grid-gap: 6px;
    
    font-size: 14px;
    font-weight: bold;
    color: rgba(255,255,255,0.9);
    align-items: center;
    cursor: pointer;
    transition: 0.35s all;
}
#get-results{
    margin-left: auto;
}
btn img{
    width: 16px;s
    transition: 0.35s all;
}
#replay img{
    width: 13px;
}
btn:hover, #replay.playing{
    background: white;
    color: #eb5e2a;
}
btn:hover{
    /* transform: scale(1.1); */
}
btn:hover img, #replay.playing img{
    filter: invert(0.46) sepia(1) saturate(4) hue-rotate(-45deg);
}
ctrls.hidden{
    max-height:0px;
    margin-block: -10px;
    opacity: 0;
}
#replay.playing{
    animation: 1.2s infinite forwards blink;
    animation-timing-function: ease-in-out;
}
@keyframes blink{
    0%   { filter: saturate(1.2); }
    50%  { filter: saturate(0.7); }
    100% { filter: saturate(1.2); }
}
cell.uncover{
    background: linear-gradient(
        0deg,
        rgba(255,255,255,0.5),
        rgba(255,255,255,0.9)
    );
    animation: none;
}
cb{
    display: flex;
    border-radius: 7px;
    padding: 6px;
    padding-inline: 9px;
    font-size: 13px;
    font-weight: bold;
    align-items: center;
    margin-left: 7px;
    transition: 0.3s all ease-in-out;
    border: 1px solid rgba(255,255,255, 0.7);
    color: white;
}
cb:first-of-type{
    margin-left: 8px;
}
cb.current{
    background: rgba(255,255,255, 0.7);
    border: 1px solid transparent;
    color: #eb5e2a;
}
cb.debug{
    background:red;
}
.nooope{
    animation: nooope 0.5s forwards;
    animation-timing-function: ease-in-out;
}