/* Google fonts import */
@import url('https://fonts.googleapis.com/css2?family=Tektur&display=swap');

/* Asterisk wildcard selector to override default styles added by the browser */
* {
    padding: 0%;
    margin: 0%;
    box-sizing: border-box;
}

/* --------- Global style */
body {
    background-color: white;
    font-family: "Tektur", sans-serif;
    color: #445361;
    text-align: center;
}

/* Main content */
main {
    /* Enlarge main element to push footer down */
    flex: 1 0 auto;
    /* Enable flex properties for child elements */
    display: flex;
    flex-direction: column;
    padding: 20px;
}

header a {
    text-decoration: none;
    color: inherit;
}

#Instructions {
    text-align: left;
}

button {
    margin: 10px;
    padding: 5px;
    border-radius: 10px;
    background-color: #3a3a3a;
    color: #f7f7f7;
    font: inherit;
    font-size: 100%;
}

#tries {
    text-align: center;
}

#details {
    font-size: 80%;
    text-align: center;
}

#errorNumber {
    color: red;
}

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

.choice {
    border: 2px solid paleturquoise;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.choice:hover {
    background-color: paleturquoise;
}

.selected {
    background-color: turquoise;
}

.scores {
    display: inline-block;
    padding: 10px;
}

#scoreboard {
    font-size: 90%;
}

#wins {
    color: green;
    font-weight: bold;
}

#losses {
    color: red;
    font-weight: bold;
}

#result {
    margin: 15px;
    font-size: 80%;
    color: gold;
}

/* This code for implementing the Modal was derived from W3Schools in https://www.w3schools.com/howto/howto_css_modals.asp */
/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    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/Box */
  .modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
  }
  
  /* The Close Button */
  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }

/* Footer */
footer {
    display: flex;
    background-color: #252525;
    padding: 0;
    width: 100%;
    bottom: 0;
    right: 0;
    letter-spacing: 0;
    flex-basis: auto;
    justify-content: space-between;
    list-style-type: none;
    color: #f7f7f7;
}

#copyright {
    font-size: 80%;
}

footer i {
    font-size: 120%;
    padding: 10px;
    color: #f7f7f7;
}

footer a {
    font-size: 80%;
    text-decoration: none;
    color: #f7f7f7;
}

#social-networks {
    align-self: center;
    text-align: center;
    display: flex;
    justify-content: space-evenly;
    list-style-type: none;
    flex-grow: 1;
}

/* media query: tablets and larger (768px and greater) */
@media screen and (min-width: 768px) {
    header {
        font-size: 150%;
        line-height: 50px;
        margin: 0 0.5rem;
    }

    #copyright {
        font-size: 100%;
    }

    footer i {
        font-size: 150%;
        padding: 10px;
        color: #f7f7f7;
    }

    footer a {
        font-size: 100%;
        text-decoration: none;
        color: #f7f7f7;
    }
}

/* media query: laptops and larger (992px and greater) */
@media screen and (min-width: 992px) {
    header {
        font-size: 200%;
        line-height: 50px;
        margin: 0 0.5rem;
    }

    #Instructions {
        display: flex;
        justify-content: space-around;
        align-items: flex-start;
    }

    #Instructions>div {
        width: 30%;
    }

    footer a:hover {
        border-bottom: 1px solid #f7f7f7;
    }

    button:hover {
        background-color: #f7f7f7;
        color: #3a3a3a;
    }
}