@import url('https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap');

.main {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    align-items: center;
    padding-bottom: 30px;
}

.cards-wrapper {
    max-width: 1420px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    justify-content: center;
}

.card-category {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    border: 3px solid black;
    align-items: center;
    cursor: pointer;
    background-color:#00BFFF;
    margin: 3%;
    width: 200px;
    height: 270px;
    border-radius: 10px;
    text-decoration: none;
}

.card-category:hover {
    transform: scale(1.1);
    -webkit-box-shadow: 7px 7px 5px 0px rgba(50, 50, 50, 0.75);
    -moz-box-shadow:    7px 7px 5px 0px rgba(50, 50, 50, 0.75);
    box-shadow:         7px 7px 5px 0px rgba(50, 50, 50, 0.75);
    transition: .2s;
}

.image {
    width: 160px;
    height: 160px;
    border-radius: 15%;
    border: 5px solid #fff;
    object-fit: cover;
    margin: 30px auto;
}

.card-category-title {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    text-decoration: none;
    padding-top: 11px;
    font-size: 20px;
    font-weight: 500;
    color: black;
    background-color: white;
    text-align: center;
}

.img-container {
    border-radius: 50%;
}

.card:hover {
    transition: .5s;
}

.button-start {
    margin: 0 auto;
    width: 30%;
    height: 35px;
    border: 0;
    outline: 0;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    border-radius: 2px;
    background-color: #FF4500;
}

.button-start:hover {
    color: white;
    background-color: #DC143C;
    border: 2px solid black;
    transform: .2s;
}

.flip {
    transform: rotateY(180deg);
    transition: 1s;
}

.card-container {
    perspective: 600px;
}

.card {
    box-sizing: border-box;
    position: relative;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    display: flex;
    box-sizing: border-box;
    justify-content: flex-end;
    width: 300px;
    height: 250px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 20px 25px;
    box-shadow: 0 1px 3px 0 #ccc;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.4);
    -webkit-transition: box-shadow .25s linear,-webkit-transform .7s;
    transition: box-shadow .25s linear,-webkit-transform .7s;
    transition: box-shadow .25s linear,transform .7s;
    transition: box-shadow .25s linear,transform .7s,-webkit-transform .7s;
    transform-style: preserve-3d;
}

.front:hover {
    box-shadow: -1px 1px 23px 0px rgba(29, 100, 123, 0.96);
    transition: .2s;
}

.front, .back {
    display: flex;
    position: absolute;
    width: 100%;
    top: 0;
    bottom: 0;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
}

.back {
    transform: rotateY(180deg);
    backface-visibility: hidden;
}

.card-title {
    margin-top: 200px;
    padding: 0 15px;
    font-family: "Roboto";
    font-size: 24px;
    line-height: 45px;
    text-align: center;
    width: 100%;
    pointer-events: none;
    background: #fff;
    color: #212529;
}

.button-translate {
    position: absolute;
    width: 40px;
    height: 40px;
    background-size: 32px;
    background-image: url('../data/img/reverse.png');
    background-repeat: no-repeat;
    background-position: center 16px;
    bottom: 8px;
    right: 5px;
    -webkit-transition: .3s;
    transition: .3s;
    -webkit-filter: grayscale(1);
    filter: grayscale(1);
    border: 0;
}

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

.play {
    background-color: #FF4500;
    transition: .5s;
}

.repeat {
    width: 60px;
    height: 60px;
    font-size: 0;
    background-image: url('../data/img/repeat.svg');
    border-radius: 50%;
    background-repeat: no-repeat;
    background-size: 50px 50px, cover;
    background-position: 50%;
}

.card .checked {
 filter: blur(8px);
 cursor: auto;
 box-shadow: none;
 pointer-events: none;
}

.star-win {
    background-image: url('../data/img/star-win.svg');
}

.star-error {
    background-image: url('../data/img/star.svg');
}

.score {
    order: 1;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    height: 40px;
    overflow-x: hidden;
    line-height: 36px;
    font-size: 36px;
    color: #fc6262;
}

.star-win, .star-error {
    flex-shrink: 0;
    width: 40px;
    min-width: 40px;
    height: 40px;
    background-size: 40px 40px;
}

.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    top: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: #8682BA;
    z-index: 2;
}

.modal-victory-image {
    width: 50%;
    height: 50%;
    background-image: url('../data/img/youwin.gif');
    background-repeat: no-repeat;
    background-size: contain;
}

.modal-lose-image {
    width: 50%;
    height: 50%;
    background-image: url('../data/img/youlose2.gif');
    background-repeat: no-repeat;
    background-size: contain;
}

.modal-title {
    font-size: 40px;
    margin-bottom: 50px;
}

.table {
    font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
    font-size: 14px;
    border-radius: 10px;
    border-spacing: 0;
    text-align: center;
}

th {
    background: #BCEBDD;
    color: white;
    text-shadow: 0 1px 1px #2D2020;
    padding: 10px 20px;
}

th, td {
    border-style: solid;
    border-width: 0 1px 1px 0;
    border-color: white;
}

th:first-child, td:first-child {
    text-align: left;
}

th:first-child {
    border-top-left-radius: 10px;
}

th:last-child {
    border-top-right-radius: 10px;
    border-right: none;
}

td {
    padding: 10px 20px;
    background: #F8E391;
}

tr:last-child td:first-child {
    border-radius: 0 0 0 10px;
}
tr:last-child td:last-child {
    border-radius: 0 0 10px 0;
}
tr td:last-child {
    border-right: none;
}

tbody td {
    border-right: 0px;
}

thead th {
    cursor: pointer;
    color: #5D0909;
}

thead th:hover {
    color: white;
    transition: .2s;
    background-color: blue;
}

.button-stats-wrapper {
    position: absolute;
    top: 35px;
}

.button-reset, .button-repeat {
    border: 1px solid black;
    padding: 10px;
    margin-left: 20px;
    border-radius: 3px;
    color: black;
    outline: 0px;
    background-color: #1F8FFF;
    font-family: "Roboto";
}

.button-reset:hover, .button-repeat:hover {
    background-color: blue;
    color: white;
    transition: .2s;
}

@media (max-width: 846px) {
    .button-stats-wrapper {
        left: 18%
    }
}

@media (max-width: 680px) {
    .button-stats-wrapper {
        left: 15%
    }
    .button-reset, .button-repeat {
        margin-left: 10px;
    }
    .table {
        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 10px;
        border-radius: 10px;
        border-spacing: 0;
        text-align: center;
    }
    
    th {
        background: #BCEBDD;
        color: white;
        text-shadow: 0 1px 1px #2D2020;
        padding: 5px 10px;
    }
}

@media (max-width: 625px) {
    header .title {
        font-family: 'Roboto';
    }
    .table {
        font-size: 10px;
    }
}

@media (max-width: 570px) {
    .button-reset, .button-repeat {
        margin-left: 10px;
        font-size: 10px;
        padding: 4px;
    }

    .button-stats-wrapper {
        top: 5px;
    }
}

@media (max-width: 531px) {
    .button-start {
        width: 200px;
    }
}

@media(max-width: 470px) {
    .table {
        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 7px;
        border-radius: 10px;
        border-spacing: 0;
        text-align: center;
    }
    
    th {
        background: #BCEBDD;
        color: white;
        text-shadow: 0 1px 1px #2D2020;
        padding: 2px 5px;
    }

    .repeat {
        width: 100px;
        height: 100px
    }
}

@media(max-width: 376px) {
    .button-stats-wrapper {
        left: 20%;
    }

    .table {
        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 9px;
        border-radius: 10px;
        border-spacing: 0;
        text-align: center;
    }
    
    th {
        background: #BCEBDD;
        color: white;
        text-shadow: 0 1px 1px #2D2020;
        padding: 0px
    }
    td {
        padding: 5px;
    }
}

@media(max-width: 321px) {
    .button-stats-wrapper {
        left: 20%;
    }

    .cards-wrapper {
        max-width: 320px;
    }

    .table {
        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 8px;
        border-radius: 10px;
        border-spacing: 0;
        text-align: center;
    }
    
    th {
        background: #BCEBDD;
        color: white;
        text-shadow: 0 1px 1px #2D2020;
        padding: 0px
    }
    td {
        padding: 0px;
    }
}

