* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
	background: 
    linear-gradient(
      rgba(0, 0, 0, 0.4),
      rgba(0, 0, 0, 0.4)
    ),
    url(background.jpg);
  // background: #868686;
  // background-image: url('');
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: cover;
  margin: auto;
  width: 100vw;
  height: 100vh;
}

.button::-moz-focus-inner{
  border: 0;
  padding: 0;
}

.button{
  display: inline-block;
  *display: inline;
  zoom: 1;
  padding: 6px 20px;
  margin: 0;
  cursor: pointer;
  border: 1px solid #bbb;
  overflow: visible;
  font: bold 13px arial, helvetica, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  color: #555;
  
  background-color: #ddd;
  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), to(rgba(255,255,255,0)));
  background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  background-image: -ms-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  background-image: linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
  
  -webkit-transition: background-color .2s ease-out;
  -moz-transition: background-color .2s ease-out;
  -ms-transition: background-color .2s ease-out;
  -o-transition: background-color .2s ease-out;
  transition: background-color .2s ease-out;
  background-clip: padding-box; /* Fix bleeding */
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
  text-shadow: 0 1px 0 rgba(255,255,255, .9);
  
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.button:hover{
  background-color: #eee;
  color: #555;
}

.button:active{
  background: #e9e9e9;
  position: relative;
  top: 1px;
  text-shadow: none;
  -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
}

.button[disabled], .button[disabled]:hover, .button[disabled]:active{
  border-color: #eaeaea;
  background: #fafafa;
  cursor: default;
  position: static;
  color: #999;
  /* Usually, !important should be avoided but here it's really needed :) */
  -moz-box-shadow: none !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.button.large{
  padding: 12px 30px;
  text-transform: uppercase;
}

.button.green {
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
  
  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.3)), to(rgba(255,255,255,0)));
  background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
  background-color: #57a957;
  border-color: #57a957;
}

.imprint {
	font-size: 20px;
	float: right;
	color: yellow;
}

.content {
	display: flex;
	margin: auto;
}

@media screen and (orientation:landscape) {
    .content{
        height: 100vh;
        width: 100vh;
    }
}
@media screen and (orientation:portrait) {
    .content{
        height: 100vw;
        width: 100vw;
    }
}

.memory-game {
  width: 100%;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-content: space-around;
}

.timer {
	font-size: 20px;
    float: left;
    color: yellow;
}

.flash {
    -webkit-animation-name: flash-animation;
    -webkit-animation-duration: 1.5s;

    animation-name: flash-animation;
    animation-duration: 1.5s;
}

@-webkit-keyframes flash-animation {  
    from { background: green; }
    to   { background: default; }
}

@keyframes flash-animation {  
    from { background: green; }
    to   { background: green; }
}

.board {
	width: 100%;
    padding: 40px;
    position: relative;	
}

.y-axis {
	color: #9aff16;
	font-size: 32px;
    position: absolute;
    left: 10px;
    top: 0;
	bottom: 0;
    padding: 40px 0;
    display: flex;
	flex-direction: column;
    justify-content: space-around;
}

.x-axis {
	color: #9aff16;
	font-size: 32px;
    position: absolute;
    left: 0;
    top: 10px;
    right: 0;
    padding: 0 40px;
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
	
}

.memory-card {
  flex: 0 0;
  flex-basis: calc(16% - 6px);
  margin: 5px;
  position: relative;
  box-shadow: 1px 1px 1px rgba(0,0,0,.3);
}

.memory-card:hover {
	opacity: .5;
}

.memory-card.flip:hover {
  opacity: 1 !important;
}

.memory-card:after{
  content: '';
  display: block;
  padding-bottom: 100%;
}

.memory-card .content {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 1s;
  -webkit-transform-style: preserve-3d;
  -webkit-transition: -webkit-transform 1s;
  -o-transform-style: preserve-3d;
  -o-transition: -o-transform 1s;
  -moz-transform-style: preserve-3d;
  -moz-transition: -moz-transform 1s;
}

.memory-card.flip .content{
  transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);

}

.front-face,
.back-face {
  width: 100%;
  height: 100%;
  padding: 10px;
  position: absolute;
  border-radius: 5px;
  background: #1C7CCC;
  display: flex;
  backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -o-backface-visibility: hidden;
}

.front-face {
  transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);

}
.back-face {
  transform: rotateY(0);
  -moz-transform: rotateY(0);
  -webkit-transform: rotateY(0);
  -o-transform: rotateY(0);
}

.memory-card img {
	width: 100%;
}

.memory-card .backgroundImage {
	width: 100%;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 500px;
  max-width: 90%;
  text-align: center;
  font-size: 24px;
}

.modal-message {
	margin-bottom: 20px;
}

/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}
