@import url('https://fonts.googleapis.com/css2?family=Arimo&family=Cabin:ital,wght@0,500;1,500&family=Josefin+Sans&display=swap');

/*-------------------- GLOBAL STYLING --------------------*/
/* Default anchor tags */
a {
    color: inherit;
    text-decoration: inherit;
}
/* Hidden class*/
.hidden {
    visibility: hidden;
    position: absolute;
}
/* Hide modal */
.hide-modal {
    display: none;
}
/* Uppercase font */
.upper-case {
    text-transform: uppercase;
}
/* Keep footer at the bottom of the page */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}
/* Spacers for game area on small screens */
.spacer {
    display: none;
}

/*-------------------- NAVIGATION BAR --------------------*/
/* Whole header secion */
#header-section {
    height: 120px;
    width: 100%;
    background-color: #F5F5F5;
}
/* Divs that hold the logo and navigation bar list */
.header-item {
    display: inline-block;
    margin: auto;
}
/* Header logo div */
#header-logo {
    color: black;
    width: 60%;
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
}
/* Header logo contents */
#logo {
    margin: auto;
    padding-top: 37px;
    padding-left: 10px;
}
/* Logo font awesome */
.brand-icon {
    color:#CF1020;
}
/* Logo link anchor */
#logo-link {
    display: inline-block;
    height: 120px;
    width: 100%;
}
/* Navigation links div */
#nav-links-div {
    width: 40%;
}
/* Navigation unordered list */
#nav-list {
    justify-content: right;
    margin: 0;
}
/*Individual list items */
.nav-list-item {
    width: 90px;
}
/* Navigation links */
.nav-link-red,
.nav-link-black {
    display: inline-block;
    width: 95%;
    height: 116px;
    border: 2px solid black;
    border-radius: 8%;
    margin: auto;
    background-color: #F5F5F5;
}
.nav-link-red {
    color: #CF1020;
}
.nav-link-black {
    color: #333A3F;
}
.nav-link-red-hover{
    display: inline-block;
    width: 95%;
    height: 116px;
    border: 2px solid black;
    border-radius: 8%;
    margin: auto;
    background-color: #CF1020;
    color: #F5F5F5;
}
.nav-link-black-hover{
    display: inline-block;
    width: 95%;
    height: 116px;
    border: 2px solid black;
    border-radius: 8%;
    margin: auto;
    background-color: #333A3F;
    color: #F5F5F5;
}
/* Navigation font-awesome: top */
.nav-icon-top {
    text-align: left;
    padding-left: 5px;
    margin: 0;
}
/* Navigation link name */
.nav-item-name {
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    text-align: center;
    margin: 0;
    padding-top: 6px;
}
/* Navigation font-awesome: bottom */
.nav-icon-bottom {
    text-align: right;
    align-self: flex-end;
    margin: 0;
    padding-right: 5px;
    padding-top: 9px;
}

/*-------------------- MAIN SECTIONS --------------------*/
main {
    flex: 1 0 auto;
    background-color: #F5F5F5;
}
/* Sequence length display box */
#length-box {
    font-family: "Cabin", Arial, Helvetica, sans-serif;
    color: #CF1020;
    text-align: center;
    margin: auto;
    margin-bottom: 20px;
    width: 83px;
    height: 112px;
    border: 2px solid black;
    border-radius: 8%;
    background-color: #F5F5F5;
    display: none;
}
#length-box-icon-top,
#length-box-icon-bottom,
#length-display {
    margin: 0;
}
#length-box-icon-top {
    text-align: left;
    padding-left: 5px;
}
#length-box-icon-bottom {
    text-align: right;
    padding-right: 5px;
    padding-top: 10px;
}
/* Buttons */
#button-section {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
}
#reset-container {
    float: left;
    padding-left: 20px;
    position: absolute;
}
.game-button, 
.submit-guess {
    font-family: "Cabin", Arial, Helvetica, sans-serif;
    background-color:#333A3F;
    color: #F5F5F5;
    transition: 
        color 0.5s,
        background-color 0.7s;
}
.game-button:hover {
    color: #F5F5F5;
    background-color: #CF1020;
}
.submit-guess:hover {
    background-color: #F5F5F5;
    color: #333A3F;
}
#quantity-label {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    color:#333A3F;
}
#quantity {
    font-family: "Cabin", Arial, Helvetica, sans-serif;
    width: 150px;
    text-align: center;
    margin-bottom: 10px;
}
/* Card images */
#game-area {
    max-width: 1100px;
    margin: auto;
}
.card-div {
    display: inline-block;
    text-align: center;
}
.card-image {
    width: 140px;
    height: 210px;
    border: 5px solid black;
    border-radius: 10%;
    margin-top: 10px;
}
/* Guessing table styling */
.table-container-style {
    margin: auto;
    max-width: 95%;
    padding-top: 30px;
}
#table-title {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    text-align: center;
}
#guessing-table {
    width: 100%;
    text-align: center;
    max-width: 800px;
    margin: auto;
}
thead {
    color: #F5F5F5;
    background-color:#CF1020;
}
tbody>tr:hover {
    color:#F5F5F5;
    background-color: #333A3F;
}
/* Table data cell classes */
.order-column{
    width: 10%;
}
.guess-column{
    width: 70%;
}
.guess-column > select {
    text-align: center;
}
.answer-column{
    width: 20%;
}
/* Guessing table transitions */
.correct-transition,
.incorrect-transition {
    transition: color 0.5s ease, background-color 5s ease;
    background-color: #F5F5F5;
}
.correct {
    background-color: #008000;
    color: #F5F5F5;
    font-family: cabin;
}
.incorrect{
    background-color: #CF1020;
    color: #F5F5F5;
    font-family: cabin;
}

/*-------------------- MODALS --------------------*/

#modal-background {
    height: 100vh;
    width: 100vw;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    display: none;
}
#sequence-error-modal,
#guess-error-modal,
#results-modal {
    display: none;
}
/* Modal global styling */
.game-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 450px;
    border: 2px solid black;
    border-radius: 8%;
    background-color: #F5F5F5;
    text-align: center;
    z-index: 2;
} 
.modal-top-icon {
    font-size: 1.6rem;
    text-align: left;
    color:#CF1020;
    padding-left: 15px;
    padding-top: 5px;
}
.modal-bottom-icon {
    font-size: 1.6rem;
    text-align: right;
    color:#CF1020;
    padding-right: 15px;
}
/* Game modals */
#modal-sequence-header,
#modal-guess-header,
#modal-results-header {
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    color:#333A3F;
    text-align: center;
}
#modal-sequence-text {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    color:#333A3F;
    text-align: center;
    width: 90%;
    margin: auto;
    padding-top: 60px;
    padding-bottom: 70px;
}
#modal-sequence-icon {
    padding-top: 50px;
}
#modal-guess-text {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    color:#333A3F;
    text-align: center;
    width: 90%;
    margin: auto;
    padding-top: 70px;
    padding-bottom: 80px;
}
#modal-guess-icon {
    padding-top: 50px;
}
#modal-results-text {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    color:#333A3F;
    text-align: center;
    width: 90%;
    margin: auto;
    padding-top: 90px;
    padding-bottom: 80px;
}
#modal-results-icon {
    padding-top: 55px;
}
/* Contact me modal */
#contact-me-modal {
    height: auto;
    max-height:95vh;
    overflow: scroll;
    overflow-x: hidden;
    background-color: #CF1020;
    display: none;
}
#modal-contact-header {
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    color:#F5F5F5;
    padding-top: 10px;
}
#contact-message {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    width: 90%;
    margin: auto;
    border: 1px solid black;
    margin-top: 10px;
}
#contact-text,
.contact-label {
    color: #F5F5F5;
}
#modal-contact-close {
    margin-top: 10px;
    margin-bottom: 10px;
}
/* How to play modal */
#how-to-play-modal {
    color:#F5F5F5;
    background-color: #333A3F;
    border-radius: 0;
    border-color: #F5F5F5;
    height: auto;
    max-height:95vh;
    overflow: scroll;
    overflow-x: hidden;
    display: none;
}
#modal-how-to-play-header {
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    padding-top: 10px; 
}
#how-to-intro {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
}
#modal-how-to-play-text {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    text-align: justify;
    width: 80%;
    margin: auto;
}
#modal-how-to-play-button {
    margin-bottom: 10px;
}
/* 404 */
#main-404 {
    text-align: center;
}
#display-404 {
    margin: auto;
    width: 200px;
    height: 300px;
    border: 2px solid black;
    border-radius: 8%;
    background-color: #F5F5F5;
    text-align: center;
    color: #333A3F;
} 
#top-404,
#bottom-404 {
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 32pt;
    margin: 0;
}
#top-404 {
    text-align: left;
    padding-left: 10px;
}
#header-404{
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
}
#message-404{
    font-family: "Arimo", Arial, Helvetica, sans-serif;
}
#link-404 {
    font-family: "Arimo", Arial, Helvetica, sans-serif;
    font-weight: bold;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}
#link-404-container {
    position: relative;
    margin: auto;
    width: 95%;
    height: 20%;
    border: solid 2px #333A3F;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#link-404-container:hover {
    color:#F5F5F5;
    background-color: #333A3F;
}
#bottom-404 {
    color:#333A3F;
    text-align: right;
    padding-right: 10px;
    padding-top: 40px;
}

/*-------------------- FOOTER --------------------*/
/* Complete footer */
#footer {
    position:relative;
    bottom: 0;
    background-color: #F5F5F5;
    height: 90px;
    margin: 0;
}
/* Footer logo outer */
#footer-logo {
    height: inherit;
    width: 70%;
    display: inline-block;
    margin: 0;
}
/* Footer logo anchor tag */
#logo-link-footer {
    width: 100%;
    height: 100%;
}
/* Footer logo text */
#footer-logo-content {
    color: #333A3F;
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    margin-left: 30%;
    padding-top: 32px;
    margin: 0;
    text-align: center;
    height: 90px;
}
/* Footer logo font awesome icons */
.footer-logo-icon {
    color:#CF1020;
}
/* Footer GitHub outer */
#footer-github {
    font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
    height: inherit;
    width: 30%;
    display: inline-block;
    text-align: right;
    margin: 0;
}
/* Footer GitHub anchor link */
#github-link {
    height: 80px;
    margin-top: 5px;
    width: 150px;
    border-radius: 15%;
    margin-right: 10px;
}
/* Footer GitHub Content */
#github-icon-top{
    text-align: right;
    padding-right: 10px;
    padding-top: 5px;
    margin: 0;
}
#github-icon-bottom {
    text-align: left;
    padding-left: 10px;
    padding-bottom: 5px;
    margin: 0;
}
#github-text{
    text-align: center;
    margin: 0;
}

/*-------------------- MEDIA QUERIES --------------------*/
@media screen and (max-width: 767px) {
    /*Make total head space 160*/
    #header-section {
        height: 160px;
    }
    /* New header logo height and width */
    #header-logo {
        height: 70px;
        width: 100%;
        text-align: center;
    }
    /* Logo positioning */
    #logo {
        padding: 20px;
    }
    /* New navigation bar height and width*/
    #nav-links-div {
        height: 90px;
        width: 100%;
    }
    /* Navigation bar UL new height and centred */
    #nav-list {
        height: 90px;
        justify-content: center;
    }
    /* Gaps between navigation bar items */
    .nav-list-item {
        margin-right: 30px;
        font-size: 11pt;
    }
    /* Rotate the navigation bar cards */
    .nav-link-red,
    .nav-link-black {
        width: 113px;
        height: 82px;
        border: 2px solid black;
        border-radius: 8%;
        margin: auto;
        background-color: #F5F5F5;
    }
    .nav-link-red-hover{
        width: 113px;
        height: 82px;
        border: 2px solid black;
        border-radius: 8%;
        margin: auto;
        background-color: #CF1020;
        color: #F5F5F5;
    }
    .nav-link-black-hover{
        width: 113px;
        height: 82px;
        border: 2px solid black;
        border-radius: 8%;
        margin: auto;
        background-color: #333A3F;
        color: #F5F5F5;
    }
    #home-text,
    #how-to-play-text,
    #contact-me-text {
        padding: 0;
    }
    .nav-icon-top {
        text-align: right;
        padding-right: 5px;
    }
    .nav-item-name {
        margin-top: 5px;
    }
    .nav-icon-bottom {
        text-align: left;
        padding-left: 5px;
        padding-top: 2px;
    }
    /* Footer logo */
    #footer-logo-content {
        padding-left: 5px;
        text-align: left;
        font-size: 20px;
    }
    #footer-logo {
        width: 60%;
    }
    #footer-github {
        width: 40%;
    }
}

@media screen and (max-height: 660px) {
    #contact-me-modal {
        border-radius: 0;
    }
}

@media screen and (max-width: 462px) {
    /* Header logo smaller */
    #logo {
        font-size: 16pt;
    }
    /* Move reset button left */
    #reset-container {
        padding-left: 7px;
    }
    /* Put space between reset and game buttons */
    .spacer {
        display: block;
    }
    /* Footer logo smaller */
    #footer-logo-content {
        font-size: 12pt;
        width: 100%;
        text-align: center;
    }
    #footer-logo-name {
        display: none;
    }
    #footer-logo {
        width: 50%;
    }
    #github-link {
        margin: auto;
        width: 100%;
    }
}
@media screen and (min-height: 639px) {
    #contact-me-modal::-webkit-scrollbar {
        display: none;
    }
}