@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap');

/*CSS styles below taken from https://github.com/code-sketch/memory-game/  */

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

/*index.html*/

body {
    background: url(../img/sp-background-k.png) no-repeat center center fixed;
    background-size: cover;
    height: 100%;
    overflow: hidden;
}

.btn-menu {
    margin-top: 10px;
    font-family: 'Alfa Slab One', cursive, sans-serif;
    font-size: 25px;
}

.btn:focus {
  outline: none;
  box-shadow: none;
}

.btn-menu:hover {
    transform: scale(1.5);
}

.btn-difficulty {
    transform: scale(1.2);
}

.btn-difficulty:hover {
    transform: scale(1.5);
}

img {
    width: 100px;
}

.disclaimer {
    font-size: 12px;
}

a {
    color: black;
    text-decoration: none;
    transform: scale(1);
}

a:active {
    color: black;
}

a:visited {
    color: black;
}

.fa-github:hover {
    transform: scale(1.5);
}

#gold {
    width: 60px;
    /* animation: pulse 1s linear infinite; */
}

#silver {
    width: 50px;
    /* animation: pulse 1s linear infinite; */
}

#bronze {
    width: 40px;
    /* animation: pulse 1s linear infinite; */
}

/* Modified code from https://codepen.io/ITpresent/pen/mdbPJLO which makes a pulsing animation of trophies when winning */

@keyframes pulse {
0% {
    
    transform: scale(1.1);
}
50% {
   
   transform: scale(0.8);
}
100% {
   
   transform: scale(1);
}
}

.game-board {
    height: 600px;
    width: 600px;
    display: flex;
    flex-wrap: wrap;
    margin: auto;
}

/*Using calc to subtract margin in order to fit card container*/
/*Initial CSS styles taken from https://github.com/code-sketch/memory-game/ and later modified */

.game-card {
    width: calc(25% - 8px);
    height: calc(33.333% - 8px);
    position: relative;
    margin: 4px;
    transform: scale(1);
    transform-style: preserve-3d;
    transition: all 0.4s ease;
    background-color: rgb(180 185 178 / 0.5);
    border-radius: 5%;
    -webkit-transform-style: preserve-3d;
  -webkit-transition: -webkit-transform 0.5s;
  -o-transform-style: preserve-3d;
  -o-transition: -o-transform 0.5s;
  -moz-transform-style: preserve-3d;
  -moz-transition: -moz-transform 0.5s;
}

.game-card:active {
    transform: scale(.96);
    transition: transform .1s;
}

.game-card:hover {
    cursor: pointer;
}

/*Initial CSS styles taken from https://github.com/code-sketch/memory-game/ and later modified */

.front-side,
.back-side {
    position: absolute;
    height: 100%;
    width: 100%;
    padding: 25px;
    backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -o-backface-visibility: hidden;
  
}

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

.cardFlipped {
    transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
}

#flips {
    
    color: black;
    font-family: 'Alfa Slab One', cursive, sans-serif;
    margin-top: 15px;
}

#timer {
    color: black;
    font-family: 'Alfa Slab One', cursive, sans-serif;
    margin-top: 15px;
}

#restart-icon {
    margin-top: 20px;
    cursor: pointer;
}

.row-header {
    width: 600px;
    display: flex;
    margin: auto;
    margin-top: 5vh;
    font-size: 20px;
}

.row-difficulty {
    margin-top: 50px;
}

#contact-menu {
    margin-top: 10px;
}

#restart-icon {
    transform: scale(1);
}

.icon-div{
    position: relative;
}

#mute:hover, #volume:hover {
    transform: scale(1.5);
    transition: transform .1s;
}

#mute, #volume {
    position: absolute;
    margin-top: 20px;
    cursor: pointer;
    transform: scale(1);
}

.muted {
    display: none;
}

h4, h5, h6 {
    letter-spacing: 1.5px;
}

#flips, #timer{
    letter-spacing: 1.5px;
}

.btn {
    letter-spacing: 1.5px;
}

.github-index {
    position: fixed;
    bottom: 4%;
    width: 100%;
}

.row-contact-index {
    width: 600px;
    margin: auto;
    margin-top: 10px;
}

.contact-index {
    font-family: 'Alfa Slab One', cursive, sans-serif;
    transform: scale(1);
}

.contact-index:hover {
    transform: scale(1.1);
}

/* menu modal in index.html */

.modal {
    font-family: 'Alfa Slab One', cursive, sans-serif;
}

.modal-content { 
    border: none;
}

#start-game {
    width: 30%;
    margin: auto;
}

.modal-content-background {
     background: url(../img/sp-group-3-k.png) bottom;
    background-repeat: no-repeat;
    background-size: contain;
    height: 690px;
    border-radius: .3rem
}

.modal-header-start {
    z-index: 102;
    border-bottom: none!important;
}

.modal-body  {
    z-index: 102;
}

.modal-footer {
    z-index: 102;
    border-top: none!important;
    padding: 0rem;
}

.menu {
    background-color: #8be4e2;
}

.amount-cards {
    margin-top: 4px;
    font-size: 12px;
}

#easy, #medium, #hard {
    transform: scale(1);
}

#easy:hover,
#medium:hover,
#hard:hover {
    transform: scale(1.2); 
    transition: transform .1s;
}

#easy:active,
#medium:active,
#hard:active {
    transform: scale(1.5); 
    transition: transform .1s;
}

#easy:visited {
    border: 1px solid red;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal-backdrop {  
    background: url(../img/sp-background-k.png) center center / cover no-repeat fixed;
    overflow: hidden;
}

.bubble {
    width: 250px;
    position: absolute;
    z-index: 103;
    margin-left: 10%;
    margin-top: 40px;
}

/*winning modal in index.html */

.winning-modal {
    background-color: #edeeed;
    background-image: url(../img/sp-group-k.png);
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 99;
    height: 200px;
    margin-top: 30px;
}

.modal-header-win {
    background-color: #00004f;
    color: white;
}

.modal-content-win {
    background-color: #edeeed;
    border: 2px solid #00004f;
}

.btns-win {
    background-color: #00004f;
}

.btns-win:hover {
    background-color: #306a51;
}

/*losing modal in index.html */

.losing-modal {
    background-color: #65436f;
    background-image: url(../img/sp-satan-k.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    z-index: 99;
    height: 400px;
}

.header-lost,
.footer-lost {
    background-color: #65436f;
    border-bottom: none!important;
    border-top: none!important;
}

.modal-content-lost {
    background-color: #65436f;
}

.btns-lose:hover {
    background-color: #306a51;
}

/*Making an image shake, code from https://www.w3schools.com/howto/howto_css_shake_image.asp */

.pc {
    width: 250px;
    position: absolute;
    z-index: 103;
    animation: shake 0.5s;
    animation-iteration-count: 2;
    margin-top: 95px;
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/*contact.html*/

#fullname,
#emailaddress,
#message {
    margin-bottom: 2px;
}

.center-form {
    width: 750px;
    margin: auto;
}

.btn-back {
    transform: scale(1);
}

.btn-back:hover {
    transform: scale(1.1);
}

.btn-contact:hover {
    background-color: #306a51;
}

.sp-logo-contact {
    width: 300px;
    margin-top: 20px;
}

.text-above-form {
    margin-top: 30px;
    font-family: 'Alfa Slab One', cursive, sans-serif;
}

.back-to-menu {
    width: 750px;
    margin: auto;
    --bs-gutter-x: 0;
    align-items: center;
}

.btn-back {
    font-family: 'Alfa Slab One', cursive, sans-serif;
    text-align: end;
}

.disclaimer {
    position: fixed;
    bottom: 0;
    width: 100%;
}

.github {
    position: fixed;
    width: 100%;
    bottom: 75px;
}

#email-message {
    color: red;
}

/*smartphone responsiveness*/

@media only screen and (max-width: 480px) and (min-width: 320px){

/*index.html*/

    .modal-content-background {
        background-color: #8be4e2;
        height: 560px;
    }

    .row-difficulty {
        margin-top: 20px;
    }

    .setting-modal {
        font-size: 14px;
    }

    .rules-modal {
        font-size: 14px;
    }

    .rules-modal-p {
        font-size: 12px;
    }

    #start-game {
    width: 50%;
    }

    .row-buttons {
        font-size: 12px;
    }

    .row-contact-index {
        width: 320px;
        margin-top: 5px;
    }

    .github-index {
    position: fixed;
    bottom: 4%;
    width: 100%;
    }

    .contact-index {
        font-size: 14px;
    }

    .bubble {
      width: 180px!important;
      margin-left: 5%!important;
    }

    .pc {
      width: 170px!important;
      margin-top: 32%!important;
    }

    .game-board {
      height: 320px!important;
      width: 320px!important;
    }

    .front-side,
    .back-side {
        padding: 15px 5px 15px 5px!important;
    }

    .modal-dialog-centered {
        align-items: start;
        position: relative;
    }

    .modal-body {
        padding: 1px;
    }

    .losing-modal {
        height: 350px;
    }

    .btns-lose {
        font-size: 12px;
        margin: .15rem!important;
    }

    #easy:active,
    #medium:active,
    #hard:active {
        transform: scale(1.2); 
    }

    .btn {
        padding: .2rem .5rem;
    }

    .btn-menu {
        font-size: 12px;
    }

/*contact.html*/

    #message {
        height: 90px;
    }

    .row-header {
        font-size: 12px;
        --bs-gutter-x: 0;
        width: 300px;
    }

    .sp-logo-contact{
        width: 200px;
    }

    .text-above-form {
    margin-top: 10px;
    font-size: 12px;
    }

    .center-form {
    width: 300px;
    }

    .back-to-menu{
    width: 300px;
    }

    .disclaimer {
    position: fixed;
    bottom: 1%;
    width: 100%;
    }

    .disclaimer-p {
        margin-bottom: 0rem!important;
    }

    .btn-contact {
    font-size: 12px;
    }

    #message {
        font-size: 12px;
    }

    #emailaddress {
        font-size: 12px;
    }

    #fullname {
        font-size: 12px;
    }

    .btn-back {
    font-size: 12px;
    
    }

    .disclaimer {
    font-size: 8px;
    }
}

/*Tablet responsiveness*/

@media only screen and (max-width: 1024px) and (min-width: 768px){

/*contact.html*/

    

    .back-to-menu {
        width: 600px;
    }

    .center-form {
        width: 600px;
    }

    .row-header {
        width: 600px;
    }

/*index.html*/    

    .game-board {
        width: 600px;
        height: 600px;
    }

    .github-index {
    position: fixed;
    bottom: 4%;
    width: 100%;
    }

    .row-contact-index {
        width: 600px;
    }
}
