html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #ffffff url('../img/geometry2.png'); /* Background pattern from Subtle Patterns */
    font-family: 'Coda', cursive;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h1 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

.fa-star {
    color: 	#FFD700;
}

.leftPart{
    display: block;
    float: right;
}

.restart {
    margin-left: 25px;
}
/*
 * Styles for the deck of cards
 */

.deck {
    width: 660px;
    min-height: 680px;
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    padding: 32px;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 3em;
}

.deck .card {
    height: 125px;
    width: 125px;
    background: #2e3d49;
    font-size: 0;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);
    perspective: 400px;
}

.deck .card.open {
    transform: rotateY(0);
    background: #02b3e4;
    cursor: default;
    animation-name: flipInY;
    animation-duration: 0.5s;
}

.deck .card.show {
    font-size: 33px;
}

.deck .card.match {
    cursor: default;
    background: #02ccba;
    font-size: 33px;
    animation-name: rubberBand;
    animation-duration: 0.75s;
}

.deck .card.unmatch {
    cursor: default;
    background: #c73d6e;
    font-size: 33px;
    animation-name: swing;
    animation-duration: 0.75s;
}

/*
 * Styles for the Score Panel
 */

.score-panel {
    text-align: left;
    width: 345px;
    margin-bottom: 10px;
}

.score-panel .stars, .stars {
    margin: 0;
    padding: 0;
    display: inline-block;
    margin: 0 5px 0 0;
}

.score-panel .stars li, .stars li{
    list-style: none;
    display: inline-block;
}

.score-panel .restart {
    float: right;
    cursor: pointer;
}

.victoryPanel {
    background: #ffffff url('../img/geometry2.png');
    width: 400px;
    height: 300px;
    border-style: solid;
    text-align: center;
    position: absolute;
    margin-top: 0;
}

.panel {
    display: inline-block;
    width: 360px;
    text-align: center;
    margin: 10px;
    
}

.panel a {
    float: right;
    cursor: pointer;
    font-weight: bold;
}

.panel a:hover{
    color: #1db9f2;
}

.panel .starRating {
    display: inline;
}

.panel button{
    cursor: pointer;
    background-color:#1db9f2;
    border: none;
    border-radius: 3px;
    color: #ffffff;
    font-size: 15px;
    padding: 10px;
    box-shadow: 3px 5px #54caf5;
    margin-top: 10px;
}


/*
* Animations for cards 
*/

@keyframes flipInY {
    from {
        transform: rotateY(90deg);
        animation-timing-function: ease-in;
        opacity: 0;
    }
    
    40% {
        transform: rotateY(-20deg);
        animation-timing-function: ease-in;
    }

    60% {
        transform: rotateY(0,1,0, 10deg);
        opacity: 1;
    }

    80% {
        transform:  rotateY(0,1,0 -5 deg);
    }

    to {
        transform: none;
    }
}

@keyframes rubberBand {
    from {
        transform: scale3d(1,1,1);
    }
    
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }

    40% {
        transform: scale3d(0.75, 1.25, 1);
    }

    50% {
        transform: scale3d(1.15, 0.85, 1);
    }

    65% {
        transform: scale3d(0.95, 1.05, 1);
    }

    75% {
        transform: scale3d(1.05, 0.95, 1);
    }

    to {
        transform: scale3d(1,1,1);
    }
}

@keyframes swing {
    from {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    to {
        transform: rotate(0deg);
    }
}
