@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(325deg,  #6a040f 0%,#d00000 50%,#faa307 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Style for cards grid and game container */
.game-container {
    position: relative;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 5px 3px 15px 1px #03071e;
    text-align: center;
    padding: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

/* buttons style code */

#start-button {
    background: #282A3A;
    color: #FFF;
    border-radius: 5px;
    padding: 10px 20px;
    border: 0;
    cursor: pointer;
    font-size: 18pt;
    box-shadow: 5px 3px 15px 1px #03071e;
    transition: all 0.5s;
}

#reset-button {
    background: #282A3A;
    color: #FFF;
    border-radius: 5px;
    padding: 10px 20px;
    border: 0;
    cursor: pointer;
    font-size: 18pt;
    box-shadow: 5px 3px 15px 1px #03071e;
    transition: all 0.5s;
}

#reset-button:hover {
    color:#fc7900;
}

#start-button:hover {
    color:#fc7900;
}



 /*styling cards code when open and clicked  */
.card {
    width: 100px;
    height: 100px;
    background-color: #940208;
    color: #fff;
    font-size: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    position: relative; 
}

.card::before {
    content: "";
    background-color: #03071e;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 10px;
    transition: background-color 0.3s ease-in-out;
}

.card.open, .card.match {
    background-color: #2ecc71;
    cursor: default;
}

.card.open::before, .card.match::before {
    display: none;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 18px;
}

#moves, #timer {
    flex: 1;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.button-container button {
    background: #282A3A;
    color: #FFF;
    border-radius: 5px;
    padding: 10px 20px;
    border: 0;
    cursor: pointer;
    font-size: 18pt;
    box-shadow: 5px 3px 15px 1px #03071e;
    transition: all 0.5s;
    margin: 0 10px; 
}

.button-container button:hover {
    color: #fc7900;
}

/* Code found on CodePen for the How to play window. Has been adapted for my needs */

h2 {
    color: #007fed;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
  
p {
    color: #001818;
    
}
  
.wrap {
    position: absolute;
    overflow: hidden;
    top: 0;
    right: 0;
    bottom: 85px;
    left: 0;
    padding: 20px 50px;
    display: block;
    border-radius: 4px;
    transition: all 0.5s;
    visibility: hidden;
}

.wrap .content {
    opacity: 0;
}
  
.wrap:before {
    position: absolute;
    width: 1px;
    height: 1px;
    background: white;
    content: "";
    bottom: 20px;
    left: 60%;
    top: 95%;
    color: #fff;
    border-radius: 50%;
    transition: all 800ms cubic-bezier(0.215, 0.61, 0.355, 1); 
}
  
.wrap.active {
    display: block;
    visibility: visible;
    box-shadow: 2px 3px 16px silver;

}

.wrap.active:before {
    height: 2000px;
    width: 2000px;
    border-radius: 50%;
    top: 40%;
    left: 50%;
    margin-left: -1000px;
    margin-top: -1000px;
    display: block;
    transition: all 600ms cubic-bezier(0.215, 0.61, 0.355, 1);
  
}
  
.wrap.active .content {
    position: relative;
    z-index: 1;
    opacity: 1;
    transition: all 600ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
  
}
  
/* End of CodePen window code */

/* Contact form code adapted from CodePen  */

form { max-width:420px; margin:50px auto; }

.feedback-input {
  color:rgb(7, 6, 6);
  font-family: 'Roboto', sans-serif;
  font-weight:500;
  font-size: 18px;
  border-radius: 5px;
  line-height: 22px;
  background-color: transparent;
  border:2px solid #ffba08;
  transition: all 0.3s;
  padding: 13px;
  margin-bottom: 15px;
  width:100%;
  box-sizing: border-box;
  outline:0;
}

.feedback-input:focus { border:2px solid #03071e; }

textarea {
  height: 150px;
  line-height: 150%;
  resize:vertical;
}

[type="submit"] {
    background: #282A3A;
    color: #FFF;
    border-radius: 5px;
    padding: 10px 20px;
    border: 0;
    cursor: pointer;
    font-size: 18pt;
    box-shadow: 5px 3px 15px 1px #03071e;
    transition: all 0.5s;
}

[type="submit"]:hover { background:#d00000; }

ol li{
    text-align: left;
}

/* End of CodePen contact form */

/* media css code for different screen sizes*/

@media (max-width: 768px) {
    body {
        flex-direction: column;
        padding: 20px;
    }

    .game-container {
        padding: 10px;
        
    }

    .card {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .game-container {
        padding: 5px;
    }

    .card {
        width: 80px;
        height: 80px;
        font-size: 30px;
    }
}

@media (max-width: 320px){
    .card {
        width: 60px;
        height: 70px;
        font-size: 28px;
    }
    body {
        padding: 10px;
    }

    .game-container {
        padding: 5px;
    }


}