* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: black;
    text-align: center;
}

.links {
    position: fixed;
    right: 0;
    width: fit-content;
    height: 64px;
    z-index: 2;
    padding: 20px;
}

.links ul {
    margin-right: 0;
    padding: 0;
    list-style-type: none;
    display: inline;
}

.links ul li {
    margin-right: 10px;
    float: left;
}

#info-button {
    border: 1px solid black;
    border-radius: 25px;
    padding: 0 12px;
    font-size: 25px;
    cursor: pointer;
}

#title-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: auto;
}

.title-content {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    font-size: 32px;
    text-align: center;
}

.title-header {
    font-size: 48px;
}

.title-desc-box {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid black;
    padding: 10px;
    background-color: #9bccffaa;
}

.title-difficulty {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.title-difficulty p {
    text-align: left;
}

.title-difficulty h2 {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-bottom: 1px solid black;
}

#easy-difficulty, #medium-difficulty, #hard-difficulty {
    font-size: 32px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    padding: 10px;
}

#easy-difficulty {
    background-color: lightgreen;
}

#medium-difficulty {
    background-color: #ffff70;
}

#hard-difficulty {
    background-color: #ff4450;
}

.game::before, #title-screen::before {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    z-index: -1;
    height: 100%;
    background-color: #deb887;
    background-image: url(../images/background.png);
    background-repeat: no-repeat;
    background-position: center center;
    -webkit-background-size: 100% 100%;
    -moz-background-size: 100% 100%;
    -o-background-size: 100% 100%;
    background-size: 100% 100%;
    -webkit-filter: blur(6px);
    filter: blur(6px);
}

.column {
    float: left;
    width: 33.333333%;
    min-height: 1px;
}

#word-bank {
    width: 50%;
    margin-left: 10%;
    margin-top: 20%;
    background-color: #e7dcd0aa;
    text-align: center;
}

    #word-bank h1 {
        border-bottom: 1px solid black;
    }

    #word-bank p {
        padding-bottom: 5px;
        padding-top: 5px;
    }

.good-word {
    text-decoration: line-through;
}

.bad-word {
    animation-name: flash-word;
    animation-duration: 5s;
    animation-fill-mode: forwards;
}

.species-viewport {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

    .species-viewport h1 {
        font-size: 48px;
        margin-bottom: 10px;
    }

#species-image {
    border-radius: 100%;
    border: 5px solid black;
    width: 100%;
    pointer-events: none;
}

#answer {
    border: none;
    border-bottom: 1px dotted black;
    background-color: transparent;
    font-size: 24px;
    width: 80%;
    margin-top: 1rem;
    text-align: center;
}

    #answer:focus {
        outline: none;
    }

.bottom-controls {
    margin-top: 1rem;
}

#submit-answer {
    margin-top: 10px;
    padding: 0 10px;
    font-size: 48px;
    background-color: #f1f1f1;
    border: 1px solid black;
    border-radius: 5px;
    box-shadow: #00000033 0 3px 5px -1px;
    cursor: pointer;
}

.bad-answer {
    animation-name: shake;
    animation-duration: 0.4s;
}

#go-next {
    float: right;
}

#go-back {
    float: left;
    visibility: hidden;
}

#go-next, #go-back {
    font-size: 72px;
    font-weight: bold;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    #go-next:hover, #go-next:focus,
    #go-back:hover, #go-back:focus {
        text-decoration: none;
        cursor: pointer;
    }

#give-up {
    display: none;
    margin: 5px auto;
    padding: 5px;
    font-size: 24px;
    background-color: orangered;
    border: 1px solid black;
    border-radius: 5px;
    box-shadow: #00000033 0 3px 5px -1px;
    cursor: pointer;
    animation-name: fade-in;
    animation-duration: 10s;
    text-align: center;
}

.modal {
    display: none;
    z-index: 3;
    overflow: auto;
}

.modal-content {
    position: fixed;
}

#info-box {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #00000066;
    z-index: 4;
}

#info-box .modal-content {
    left: 20%;
    top: 12.5%;
    width: 60%;
    height: 75%;
    background-color: #deb887;
}

#vert-fmnp {
    display: none;
}

#good-modal .modal-content {
    right: 0;
    top: 25%;
    width: 25%;
    font-size: 18px;
    -webkit-animation-name: slide-in-left;
    -webkit-animation-duration: 0.4s;
    animation-name: slide-in-left;
    animation-duration: 0.4s;
}

#modal-close, #modal-show {
    display: none;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
}

#modal-close {
    float: right;
}

#modal-show {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f1f1f1;
}

.modal-header {
    padding: 20px;
    margin: 0;
    background-color: green;
    border-top-left-radius: 10px;
}

.modal-body {
    padding: 20px;
    background-color: #325f7c;
    color: #fff;
    text-align: left;;
    border-bottom-left-radius: 10px;
}

#species-nomen {
    text-align: center;
    font-style: italic;
    background-color: #fff;
}

#full-species-image {
    width: 0;
    height: 0;
}

/* very basic support for mobile functionality (not pretty) */
@media only screen and (max-width: 750px) {
    #horz-fmnp {
        display: none;
    }

    #vert-fmnp {
        display: block;
    }

    #info-box .modal-content {
        overflow: auto;
    }

    #title-screen {
        margin-top: 32px;
    }

    .column {
        display: none;
    }

    .primary-column {
        display: block;
        position: absolute;
        width: 100%;
    }

    #submit-answer {
        font-size: 24px;
    }

    .go-next, .go-back {
        font-size: 36px;
    }

    #give-up {
        font-size: 12px;
    }

    #good-modal .modal-content {
        top: auto;
        right: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        -webkit-animation-name: slide-in-up;
        animation-name: slide-in-up;
    }

    #modal-close {
        display: block;
    }

    .modal-header {
        border-top-left-radius: 0;
    }
    
    .modal-body {
        border-bottom-left-radius: 0;
    }
}

@-webkit-keyframes shake {
    0%, 100% {
        -webkit-transform: rotate(0deg);
    }
    25%, 75% {
        -webkit-transform: rotate(-15deg);
    }
    50% {
        -webkit-transform: rotate(15deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
        color: black;
    }
    25%, 75% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(15deg);
        color: red;
    }
}

@-webkit-keyframes slide-in-left {
    from {
        right: -300px;
        opacity: 0;
    } 
    to {
        right: 0;
        opacity: 1;
    }
}
  
@keyframes slide-in-left {
    from {
        right: -300px;
        opacity: 0;
    } 
    to {
        right: 0;
        opacity: 1;
    }
}

@-webkit-keyframes slide-in-up {
    from {
        bottom: -300px;
        opacity: 0;
    } 
    to {
        right: 0;
        opacity: 1;
    }
}
  
@keyframes slide-in-up {
    from {
        bottom: -300px;
        opacity: 0;
    } 
    to {
        right: 0;
        opacity: 1;
    }
}

@-webkit-keyframes fade-in {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
}

@keyframes fade-in {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
}

@-webkit-keyframes flash-word {
    20% {
        background-color: #ff4500aa;
    }
    40% {
        background-color: #ff450077;
    }
    60% {
        background-color: #ff450077;
    }
    80% {
        background-color: #00000000;
    }
    100% {
        background-color: #ff450077;
    }
}

@keyframes flash-word {
    20% {
        background-color: #ff450077;
    }
    40% {
        background-color: #00000000;
    }
    60% {
        background-color: #ff450077;
    }
    80% {
        background-color: #00000000;
    }
    100% {
        background-color: #ff450077;
    }
}
