﻿* {
  box-sizing: border-box; }

html, body {
  height: 100%; 
  text-align:center;
  }
    @media (max-width: 800px) {
      html,body {
        padding: 5px;
        font-size:14px} }

body {
  background: #ffffff;
  min-height: 90%;
  font-family: "Arial", sans-serif; }

.wrap {
  position: relative;
  height: 90%;
  min-height: 450px;
  padding-bottom: 0px; }

.game {
  transform-style: preserve-3d;
  perspective: 450px;
  min-height: 90%;
  height: 90%; }

@keyframes matchAnim {
  10% {
    background: #bcffcc; }
  90% {
    background: #bcffcc; } }

.card {
  float: left;
  width: 20%;
  height: 25%;
  padding: 5px;
  text-align:center;
	display: block;
  perspective: 400px;
  position: relative;
  cursor: pointer;
  z-index: 50;

  -webkit-tap-highlight-color: #c8c8c8; }
  @media (max-width: 800px) {
    .card {
      width: 25%;
      height: 20%; } }
  .card .inside {
    width: 100%;
    height: 100%;
    display: block;
    transform-style: preserve-3d;
    transition: .4s ease-in-out;
    background: #ffffff; }
    .card .inside.picked, .card .inside.matched {
      transform: rotateY(180deg); }
    .card .inside.matched {
      animation: 1s matchAnim fixed;
      animation-delay: .4s; }
  .card .front{
    font-size:3vw;
    border: 2px solid black;
    backface-visibility: hidden;
  border-radius: 10px;        /* CSS3草案 */  
  -webkit-border-radius: 10px;    /* Safari,Google Chrome用 */  
  -moz-border-radius: 10px;   /* Firefox用 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0px; }
  .card .back {
    border: 2px solid black;
    backface-visibility: hidden;
  border-radius: 10px;        /* CSS3草案 */  
  -webkit-border-radius: 10px;    /* Safari,Google Chrome用 */  
  -moz-border-radius: 10px;   /* Firefox用 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0px; }
    .card .front img{
      height: 80%;
      width: 100%;
      object-fit: cover;
      border-radius: 5px;
    }
    .card .back img {
      max-width: 100%;
      height:100%;
      display: block;
      margin: 0 auto;
      border-radius:10px;
      object-fit: cover; 
    }
  .card .front {
    transform: rotateY(-180deg); }
    @media (max-width: 800px) {
      .card .front {
        padding: 0px; } }
  .card .back {
    transform: rotateX(0); 
    }
    @media (max-width: 800px) {
      .card .back {
        padding: 0px; } }

.modal-overlay {
  display: none;
  background: white;
  position: fixed;
  top: 250;
  left: 0;
  width: 100%;
  height: 30%; }

.modal {
  display: none;
  position: relative;
  width: 450px;
  height: 400px;
  max-height: 90%;
  max-width: 100%;
  min-height: 380px;
  margin: 0 auto;
  background: white;
  top: 50%;
  transform: translateY(-50%);
  padding: 30px 10px; }
  .modal .winner {
    font-size: 60px;
    text-align: center;
    font-family: "Anton", sans-serif;
    color: #4d4d4d;
    text-shadow: 0px 3px 0 black; }
    @media (max-width: 480px) {
      .modal .winner {
        font-size: 48px; } }
  .modal .restart {
    font-family: "Anton", sans-serif;
    margin: 30px auto;
    padding: 20px 30px;
    display: block;
    font-size: 24px;
    border: none;
    background: #4d4d4d;
    background: linear-gradient(#4d4d4d, #222);
    border: 1px solid #222;
    border-radius: 5px;
    color: white;
    text-shadow: 0px 1px 0 black;
    cursor: pointer; }
    .modal .restart:hover {
      background: linear-gradient(#ffffff, white); }
  .modal .message {
    text-align: center; }
    .modal .message a {
      text-decoration: none;
      color: #28afe6;
      font-weight: bold; }
      .modal .message a:hover {
        color: #56c0eb;
        border-bottom: 1px dotted #56c0eb; }
  .modal .share-text {
    text-align: center;
    margin: 10px auto; }
  .modal .social {
    margin: 20px auto;
    text-align: center; }
    .modal .social li {
      display: inline-block;
      height: 50px;
      width: 50px;
      margin-right: 10px; }
      .modal .social li:last-child {
        margin-right: 0; }
      .modal .social li a {
        display: block;
        line-height: 50px;
        font-size: 20px;
        color: white;
        text-decoration: none;
        border-radius: 5px; }
        .modal .social li a.facebook {
          background: #3b5998; }
          .modal .social li a.facebook:hover {
            background: #4c70ba; }
        .modal .social li a.google {
          background: #D34836; }
          .modal .social li a.google:hover {
            background: #dc6e60; }
        .modal .social li a.twitter {
          background: #4099FF; }
          .modal .social li a.twitter:hover {
            background: #73b4ff; }

p {
  font-size: 16px; 
  margin:0;}

h1 {
font-size:24px;
margin:5px;
}
    @media (max-width: 800px) {
      h1 {
        font-size:18px;
      margin:0px;} }

h2 {
font-size:20px;
margin:5px;
}
    @media (max-width: 800px) {
      h2 {
        font-size:16px;
      margin:0px;} }

footer {
  height: 25px;
  position: absolute;
  text-align:center;
  bottom: 0;
  width: 100%;
  z-index: 0;
  font-size: 20px; }
      @media (max-width: 550px) {
      footer {
        font-size: 14px;
        height:20px; }
}
  footer .disclaimer {
    line-height: 20px;
    font-size: 14px;
    color: #727272;
    text-align: center; }
 }