:root {
    --gold: gold;
    --silver: #e1ecdf;
    --darksilver: rgb(180, 180, 180);
    --darkgreen: #15391d;
    --green: #1d4f29;
    --lightgreen: rgb(2, 182, 2);
    --navdarkgray: rgb(58, 58, 58, .7);
    --navlightgray: rgb(153, 153, 153);
    --shadowcol1: rgba(0,0,0,0.24);
    --shadowcol2: rgba(0,0,0,0.19);
}

html {
    background: url("./images/hyrulehistoriabg.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    background-size: cover;
}

* {
    box-sizing: border-box;
}

body {
    text-align: center;
    color: #e1ecdf;
    background-position: center top;
    background-attachment: scroll;
    background-size: cover;
    font-family: Tahoma, Arial, Verdana, sans-serif;
}

h1, h2, h3, h4, h5{
    margin-left: auto;
    margin-right: auto;
}

h1{
    font-weight: bold;
    font-family: "Kaisei Opti", "Simonetta", Trebuchet MS, Arial, Verdana, Tahoma, sans-serif;
    max-width:95%;
}

h3{
    display: inline;
    max-width:95%;
    padding: 0px 30px;
    margin: 0px;
    font-family: Trebuchet MS, Tahoma, Arial, Verdana, sans-serif;
}

h4{
    max-width:90%;
}

@media only screen and (max-width: 600px) {
    /* For mobile phones, making score and incorrect on 2 lines */
    h3 {
        width: 100%;
        padding: 10px 0px;
    }
}

@media only screen and (max-width: 400px) {
    /* Placing the numbers on a new line at the same time */
    h3 > span {
        display: block;
        width: 100%;
    }
}

/*              NAVBAR               */
ul.navbar{
    display:flex;
    background-color:darkgreen;
    width: 100%;
    list-style-type: none;
    margin: 0px;
    padding: 0px;
}

/* For the ilnks within the navbar */
.navbar > li {
    display: inline;
    margin: auto;
    border-radius: 5px;
}

/*              OPTIONS NAVBAR               */
ul.optnav{
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--navdarkgray);
}

ul.optnav li {
    margin: auto;
    display: inline-block;
}

ul.optnav li button {
    display: inline;
    background-color: transparent;
    border: transparent;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

ul.optnav li button.active {
    background-color: gold;
    color: black;
}

ul.optnav li button:hover:not(.active) {
    background-color: #111;
}

/*              OPTIONS MODAL               */
#optionsbtn {
    float: right;
    text-align: right;
    position: -webkit-sticky; /* Safari */
    position: sticky; 
    top: 5px;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    background-color:transparent;
}
  
#optionsbtn:hover, #optionsbtn:focus, #optionsbtn:active {
    color: var(--navlightgray);
    text-decoration: none;
    box-shadow: 0 0 0 0; /* Removing the Box Shadow that most links have */
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    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.9); /* Black w/ opacity */
}

/* Add Animation */
#optiondisplay {  
    animation-name: zoom;
    animation-duration: 0.2s;
}
  
@keyframes zoom {
    from {transform: scale(0.1)} 
    to {transform: scale(1)}
}

/* The Modal Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--silver);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover, .close:focus {
    color: var(--darksilver);
    text-decoration: none;
    cursor: pointer;
}

/*              BUTTONS AND LINKS               */
button {
    font-family: Trebuchet MS, Tahoma, Arial, Verdana, sans-serif;
    cursor: pointer;
    transition-duration: 0.4s;
}

a {
    transition-duration: 0.4s;
}

a:link, a:visited {
    color: gold;
    border: 2px solid gold;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: "Kaisei Opti", "Simonetta", Trebuchet MS, Arial, Verdana, Tahoma, sans-serif;
    font-style: italic;
}
  
a:hover, a:active {
    background-color: green;
    color: white;
    box-shadow: 0 12px 16px 0 var(--shadowcol1), 0 17px 50px 0 var(--shadowcol2);
}

a.active{ /*Active navbar element, not the active property, i realize now this is very confusing oops*/
    background-color:var(--lightgreen);
    color:white;
}

/*              The buttons for answers to questions, i.e. category, desc, and game               */
.qbtn {
    background-color: green;
    border: none;
    color: gold;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: bold;
    font-family: Trebuchet MS, Tahoma, Arial, Verdana, sans-serif;
    font-size: 14px;
    border-radius: 4px;
    box-shadow: 0 3px #999;
    overflow:hidden;
}

@media (max-width: 800px) {
    .qbtn {
      height: 70px;
    }
}

@media (max-width: 450px) {
    .qbtn {
      height: 110px;
    }
}

.qbtn:hover {
    background-color: lightgreen;
    color: black;
}

.qbtn:active {
    box-shadow: 0 1px #666;
    transform: translateY(4px);
    transition-duration: .1s;
}

/*              The "What's your spelling?" textbox              */
#answer {
    border: 4px solid gold;
    border-radius: 4px;
    padding: 12px 20px;
    margin: 2px;
    box-sizing: border-box;
    font-size: 30px;
    width: 80%;
    text-align: center;
}

@media (max-width: 600px) {
    #answer {
        font-size: 20px;
    }
}

/*              CHECK YOUR ANSWER BUTTON             */
#checkbtn{
    color: darkslategray;
    background-color: gold;
    border: 2px solid white;
    padding: 5px 15px;
    font-size: 20px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
}

#checkbtn:disabled{
    background-color: rgb(122, 122, 122);
    border: 2px solid rgb(133, 133, 133);
}

#checkbtn:hover:enabled{
    background-color: rgb(255, 237, 136);
}

/*              SMALL BUTTONS (Give up, New Word)             */
.smallbtn{
    color: gold;
    border: none;
    outline: none;
    background-color:transparent;
    max-width: 200px;
    padding: 5px 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    margin: 0px 20px;
}

.smallbtn:hover, .smallbtn:active{
    color: var(--silver);
    transition-duration: 0s;
}

/*              TABLES (Qbtn containers)             */
table {
    margin-left: auto;
    margin-right: auto;
    table-layout: fixed;
    width: 90vw;
    text-align: center;
    vertical-align: middle;
    border-spacing: 10px;
}

td {
    padding: 1px;
}

/*Panels for displaying the word info within the table*/
.panel {
    display: flex;
    background-color: green;
    border: solid 1px var(--silver);
    height: 80px;
    overflow: auto;
    font-size: 16px;
}

.panel-show{
    visibility: visible;
    animation: fadeIn .3s;
    -webkit-animation: fadeIn .3s;
    -moz-animation: fadeIn .3s;
    -o-animation: fadeIn .3s;
    -ms-animation: fadeIn .3s;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@-moz-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@-webkit-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@-o-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@-ms-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/*Centers the text within the panel*/
.panel > span {
    margin: auto;
}

/*              FLEXCONTAINER (Score, Incorrect)             */
.flexcontainer{
    margin: auto;
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 60%;
    justify-content: center;
    align-content: space-between;
}

/*Making the flex containers responsive*/
@media (max-width: 700px) {
    .flex-container {
      flex-direction: column;
    }
}

/* Formatting lists. Specifically for the about page in this case.*/
.listbox{
    width: 50%;
    text-align:left;
    margin: auto;
}

/*              CLEAR               */
/*Clears the area with a <p id='pclear'>*/
#pclear {
    clear: both;
}

.singlebtn { /*Button in the options menu*/
    display: block;
    margin: auto;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#reset { /*Button in the options menu*/
    background-color: red;
    color: white;
}

/*              CHECKBOXES               */

/* Customize the label (the checklist) */
.checklist {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 22px;
    margin: auto;
    width: 80%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide the browser's default checkbox */
.checklist input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    /* margin-left: calc(100vw/6); */
    height: 25px;
    width: 25px;
    background-color: #eee;
    outline: solid 1px black;
}

/* @media only screen and (max-width: 700px) {
    /* For desktop, make the margins bigger to keep checkmarks closer to content
    .checkmark {
        margin-left: 10px;
    }
} */

/* On mouse-over, add a grey background color */
.checklist:hover input ~ .checkmark {
    background-color: rgb(170, 170, 170);
}
  
/* When the checkbox is checked, add a green background */
.checklist input:checked ~ .checkmark {
    background-color: var(--green);
}

/* When checked and hovering, add darker green */
.checklist:hover input:checked ~ .checkmark {
    background-color: var(--darkgreen);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checklist input:checked ~ .checkmark::after {
    display: block;
}

/* Style the checkmark/indicator */
.checklist .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid gold;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/*          TOOLTIPS             */
/* .tooltip {
    border-bottom: 1px dotted black;
  } */
  
.tooltip .tooltiptext {
    font-size: 12px;
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0,.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
  
    /* Position the tooltip */
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -100px; /* Use half of the width (200/2 = 100), to center the tooltip */
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}

/*                  HOVER DROPDOWN                   */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .dropdown-list {
    padding: 12px;
    background: #fff;
    position: absolute;
    top: 30px;
    left: 2px;
    right: 2px;
    box-shadow: 0 1px 2px 1px rgba(0, 0, 0, .15);
    transform-origin: 50% 0;
    transform: scale(1, 0);
    transition: transform .15s ease-in-out .15s;
    max-height: 66vh;
    overflow-y: scroll;
}

.dropdown .dropdown-option{
    display: block;
    padding: 8px 12px;
    opacity: 0;
    transition: opacity .15s ease-in-out;
}

.dropdown .dropdown-label {
    display: block;
        height: 30px;
        background: #fff;
        border: 1px solid #ccc;
        padding: 6px 12px;
        line-height: 1;
        cursor: pointer;
}
  
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 12px 16px;
    z-index: 1;
}
  
.dropdown:hover .dropdown-content {
    display: block;
}

/*                  SEARCHBAR                   */
/* Create a column layout with Flexbox */
.row {
    display: flex;
}

@media only screen and (max-width: 650px){
    .row{
        flex-direction:column;
    }
}

/* Left column (menu) */
.left {
    flex: 35%;
    padding: 15px 0;
}
  
.left h2 {
    padding-left: 8px;
}
  
/* Right column (page content) */
.right {
    flex: 65%;
    padding: 15px;
}

/* Style the searchbar itself */
#mySearch {
    width: 100%;
    font-size: 18px;
    padding: 11px;
    border: 1px solid #ddd;
}

#myMenu { /* The list of items */
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Style the navigation links */
#myMenu .searchresult{
    padding: 12px;
    text-decoration: none;
    color: black;
    background-color: var(--lightgreen);
    display: block;
    width: 100%;
    border: 1px solid var(--gold);
}

#myMenu .searchresult:hover {
    background-color: #eee;
}

#myMenu .searchresult + .resultinfo{
    background-color: var(--darkgreen);
    padding-top: 10px;
    border: 1px solid var(--gold);
}

#searchoptions {
    background-color:rgba(0, 124, 0, .4);
}

/* label{
    cursor: pointer;
    padding:0px 200px 0px 200px;
    background-color:orange;
}

input[type=checkbox]{
    /* margin: 0px 0px 0px 100px; */
    /* float: left; 
    width: max(50%, 200px);
    cursor: pointer;
    margin: 8px 0px;
    border:8px solid rgb(122, 122, 122)
} */

.dropdown-checklist {
    display: inline-block;
    position: relative;
    padding-left: 35px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  .dropdown-checklist .anchor {
    position: relative;
    cursor: pointer;
    display: inline-block;
    padding: 5px 50px 5px 10px;
    border: 1px solid #ccc;
    width: 300px;
  }
  
  .dropdown-checklist .anchor:after {
    position: absolute;
    content: "";
    border-left: 2px solid black;
    border-top: 2px solid black;
    padding: 5px;
    right: 10px;
    top: 20%;
    -moz-transform: rotate(-135deg);
    -ms-transform: rotate(-135deg);
    -o-transform: rotate(-135deg);
    -webkit-transform: rotate(-135deg);
    transform: rotate(-135deg);
  }
  
  .dropdown-checklist .anchor:active:after {
    right: 8px;
    top: 21%;
  }
  
  .dropdown-checklist ul.items {
    background-color: gray;
    position: absolute;
    width: 300px;
    padding: 2px;
    display: none;
    margin: 0;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1;
  }
  
  .dropdown-checklist ul.items li {
    list-style: none;
  }
  
  .dropdown-checklist.visible .anchor {
    color: #0094ff;
  }
  
  .dropdown-checklist.visible .items {
    display: block;
  }