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;
    padding-top: 3em;
}

/*
 * Styles for the deck of cards
 */

.deck {
    width: 40em;
    min-height: 40em;
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    padding: 2em;
    border-radius: .5em;
    box-shadow: .66em 0.75em 1em 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);
}

.deck .card.open {
    transform: rotateY(0);
    background: #02b3e4;
    cursor: default;
}

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

/* match */
.deck .card.match {
    cursor: default;
    background: #02ccba;
    font-size: 33px;
}

@keyframes pulse_animation {
	0% { transform: scale(1); }
	50% { transform: scale(.8); }
	60% { transform: scale(1); }
	70% { transform: scale(.8); }
	80% { transform: scale(1); }
	100% { transform: scale(1); }
}

.match {
	animation-name: pulse_animation;
	animation-duration: 1000ms;
	transform-origin:70% 70%;
	animation-iteration-count: 1000ms;
	animation-timing-function: linear;
}



/* mismatch */
.deck .card.close {
    cursor: default;  
    -webkit-animation-duration: .5s; 
    animation-duration: .5s; 
    -webkit-animation-fill-mode: both; 
    animation-fill-mode: both;
}
@-webkit-keyframes close {
   0%, 100% {-webkit-transform: translateX(0);} 
   30%, 50%, 90% {-webkit-transform: translateX(-10px);} 
   40%, 80% {-webkit-transform: translateX(10px);} 
}
@keyframes close { 
   0%, 100% {transform: translateX(0);} 
   30%, 50%, 90% {transform: translateX(-10px);} 
   40%, 80% {transform: translateX(10px);} 
}
.close { 
   -webkit-animation-name: close; 
   animation-name: close; 
}


/*
 * Styles for the Score Panel
 */

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

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

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

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

/* if you win */
.win {
    text-align: center;
    display: none; 
    padding: auto;
    margin: auto;
}
.win h1{
    color: #02ccba;
    padding-top: 8em;
    font-weight: bold;
}
.win .stars {
    margin: 0;
    padding: 0;
    display: inline-block;
    margin: 0 5px 0 0;
}

.win .stars li {
    list-style: none;
    display: inline-block;
}
.win p {
    padding: 3em;
}
.button{
    background-color: #02ccba;
    padding: .5em 1em;
    border-radius: .5em;
    color: white;
    margin-top: 5em;
    height: .5em;
    width: 1em;
    margin: auto;
    text-align: center;
}
.button:hover{
    background-color: white;
    border: solid .05em black;
    color: #02ccba;;
    cursor: pointer;
}
.confetti
{
width: 2em;
height: 2em;
margin-top: -15em;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
position:relative;
animation:confetti 8s;
-webkit-animation:confetti 8s;
animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite; /* Safari and Chrome */
}
@keyframes confetti
{
0% {top: 0em;}
100% {top:100em;}
}
@-webkit-keyframes confetti /* Safari and Chrome */
{
0% {top: 0em;}
100% {top:100em;}
}
.confetti1, .confetti2, .confetti3, .confetti4 {
background-color: #65C093;
}
.confetti1 .confetti12 {
animation-delay:0s;
-webkit-animation-delay:0s;
}
.confetti1 {
margin-left: 15%;
}
.confetti2 {
margin-left: 90%;
}
.confetti3, .confetti6, .confetti20 {
animation-delay:1.5s;
-webkit-animation-delay:1.5s;
}
.confetti3 {
margin-left: 24%;
}
.confetti4 {
margin-left: 12%;
animation-delay:3s;
-webkit-animation-delay:3s;
}
.confetti5, .confetti6, .confetti7 {
background-color: #36D3CB;
}
.confetti5 {
margin-left: 33%;
}
.confetti6 {
margin-left: 75%;
}
.confetti7, .confetti8 {
animation-delay:4.5s;
-webkit-animation-delay:4.5s;
}
.confetti17 {
margin-left: 56%;
}
.confetti8, .confetti9, .confetti10, .confetti11 {
background-color: #E094DE;
}
.confetti8 {
margin-left: 67%;
}
.confetti9 {
margin-left: 80%;
}
.confetti10, .confetti14, .confetti18 {
animation-delay:.5s;
-webkit-animation-delay:.5s;
}
.confetti10 {
margin-left: 30%;
}
.confetti11 {
margin-left: 12%;
animation-delay:1s;
-webkit-animation-delay:1s;
}
.confetti12, .confetti13, .confetti14 {
background-color: #f5d44d;
}
.confetti12 {
margin-left: 62%;
}
.confetti13 {
margin-left: 22%;
animation-delay:4s;
-webkit-animation-delay:4s;
}
.confetti14 {
margin-left: 86%;
}
.confetti15, .confetti16, .confetti17, .confetti18 {
background-color: #E08868;
}
.confetti15 {
margin-left: 95%;
}
.confetti16 {
margin-left: 12%;
animation-delay:4s;
-webkit-animation-delay:4s;
}
.confetti17, .confetti21 {
animation-delay:.5s;
-webkit-animation-delay:.5s;
}
.confetti17 {
margin-left: 72%;
}
.confetti18 {
margin-left: 36%;
}
.confetti19, .confetti20, .confetti21 {
background-color: #6865AC;
}
.confetti19 {
margin-left: 82%;
}
.confetti20 {
margin-left: 10%;
}
.confetti21 {
margin-left: 92%;
}

/* StopWatch */
.stopwatch {
    padding-left: 2em;
    font-weight: bold;
    color: #02ccba;
}

.link {
    margin: 1em auto 3em;
}

.listItem{
    list-style: none;
}