/* Modal (background) */

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 8%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */

.modal-content {
    position: relative;
    text-align: center;
    background-color: darkgray;
    border: none;
    border-radius: 20px;
    box-shadow: 0 -30px 4px -12px rgba(0, 0, 0, 0.6) inset;/*bottom shadow*/
    outline: none;
    margin: auto;
    padding: 0;
    width: 50%;
    height: auto;    
    overflow: auto;
    overflow-x: hidden;
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s
}

#leaderboard {
    z-index: 1;

}

#leaderboard::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5%;
    height: 40%;
    background: green;
    overflow: hidden;
    z-index: 2;
    box-shadow: 16px 0 12px -12px rgba(0, 0, 0, 0.5) inset;/*left shadow*/
}



@-webkit-keyframes animatetop {
    from {
        top: -500px;
        opacity: 0
    }
    to {
        top: 0;
        opacity: 1
    }
}

@keyframes animatetop {
    from {
        top: -500px;
        opacity: 0
    }
    to {
        top: 0;
        opacity: 1
    }
}


/* Close Button */

.close-modal {
    color: white;
    border: none;
    outline: none;
    font-weight: bold;
    float: left;
    position: relative;
    z-index: 0;
    width: 2.5%;
    background: none;
    padding: 0;
    margin-left: 2px;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#close_modal_new_highscore {
    float: right;
}

/*New Highscores Modal*/

#new_highscore {
    display: none;
    text-align: center;
    border: none;
    z-index: 1000;
}

.modal-header {
    border: none;
    padding: 2px 16px;
    text-shadow: 1px 1px 2px #000000;
    background-color: dodgerblue;
    color: yellow;
    font-weight: 100;
    box-shadow: 0 16px 12px -12px rgba(0, 0, 0, 0.5) inset, /*top shadow*/
    16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 16px -16px rgba(0, 0, 0, 0.5) inset; /*right shadow*/
}

.modal-header p {
    color: white;
    font-size: 1.1em;
}

.modal-body {
    border: none;
    display: block;
    background-color: gainsboro;
    padding: 2px 16px;
    height: 30vh;
    overflow: scroll;
    overflow-x: hidden;
    box-shadow: 16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 16px -16px rgba(0, 0, 0, 0.5) inset; /*right shadow*/
}

.flag_btn {
    border: none;
    outline: none;
    background-color: gainsboro;
    color: transparent;
}


.modal-footer {
    border: none;
    padding: 6px 16px;

    background-color: dodgerblue;
    color: white;
    text-align: center;
    box-shadow: 0 -16px 12px -12px rgba(0, 0, 0, 0.5) inset, /*bottom shadow*/
    16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 16px -16px rgba(0, 0, 0, 0.5) inset; /*right shadow*/
}

#new_record_form img {
    height: 32px;
    width: 32px;
}

#new_record_form #new_record_form_name_field {
    padding: 7px;
    margin-left: 5%;
    margin-right: 5%;
    color: white;
    text-shadow: 1px 1px 2px #000000;
    font-size: 1.5em;
    background-color: darkgray;
    text-align: center;
    caret-color: white;
}

::-webkit-input-placeholder {
    /* Chrome */
    color: lightyellow;
    text-shadow: 0px 0px 0px #000000;
    opacity: 0.6;
    text-align: center;
}

:-ms-input-placeholder {
    /* IE 10+ */
    color: lightyellow;
    opacity: 0.6;
}

::-moz-placeholder {
    /* Firefox 19+ */
    color: lightyellow;
    opacity: 0.6;
}

:-moz-placeholder {
    /* Firefox 4 - 18 */
    color: lightyellow;
    opacity: 0.6;
}

#new_record_form_submit {
    outline: none;
    background: green;
    color: white;
    font-size: 1.3em;

}

/*Loader*/
#loader {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    z-index: 1000;
    border: 16px solid white;
    border-top: 16px solid gray;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

/*Modal Tabs*/

div.tab {
    overflow: hidden;
    border: none;
    outline: none;
    box-sizing: border-box;
}

.tablinks {
    text-shadow: 1px 1px 2px #000000;
    box-sizing: border-box;
    float: left;
    position: relative;
    z-index: 5;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 1.5em;
    color: white;
    border-radius: 10px 10px 0px 0px;
    width: 32%;
}

#tab_easy,
#tab_how_to_play {
    box-shadow: 0 16px 12px -12px rgba(0, 0, 0, 0.5) inset, /*top shadow*/
    16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 16px -16px rgba(0, 0, 0, 0.5) inset, /*right shadow*/
    3px 0px 6px 0px rgba(0, 0, 0, 0.5);
}

#tab_easy {
    border-radius: 0px 10px 0px 0px;
}

.tab-easy {
    background-color: green;
}


.tab-how-to-play {
    border-radius: 0px 10px 0px 0px;
    background-color: #F44545;
}

#tab_medium,
#tab_languages {
    box-shadow: 0 16px 12px -12px rgba(0, 0, 0, 0.5) inset, /*top shadow*/
    16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 16px -16px rgba(0, 0, 0, 0.5) inset, /*right shadow*/
    3px 0px 6px 0px rgba(0, 0, 0, 0.5);
}

.tab-medium {
    background-color: #EE7600;
}

#tabcontent_medium {
    border-radius: 20px 20px 0px 0px;
}

.tab-languages {
    background-color: #F4E945;
}

#tabcontent_languages {
    border-radius: 20px 20px 0px 0px;
}

#tab_hard,
#tab_contact {
    box-shadow: 0 16px 12px -12px rgba(0, 0, 0, 0.5) inset, /*top shadow*/
    16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 16px -16px rgba(0, 0, 0, 0.5) inset, /*right shadow*/
    3px 0px 6px 0px rgba(0, 0, 0, 0.5);
}

.tab-hard {
    background-color: #cc0000;
}

#tabcontent_hard {
    border-radius: 20px 20px 0px 0px;
}

.tab-contact {
    background-color: #7ae2e2;
}

#tabcontent_contact {
    border-radius: 20px 20px 0px 0px;
}

.tabcontent {
    text-shadow: 1px 1px 2px #000000;
    position: relative;
    z-index: 5;
    display: none;
    border-radius: 0px 20px 0px 0px;
    text-align: center;
    padding: 12px 12px;
    border: none;
    outline: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    bottom: 1px;
    box-shadow: 16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*right shadow*/
    0 -16px 10px -10px rgba(0, 0, 0, 0.5) inset; /*bottom shadow*/
}

.tabcontent-info {
    position: relative;
    z-index: 5;
    border-radius: 0px 20px 0px 0px;
    text-align: center;
    padding: 6px 12px;
    border: none;
    outline: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    bottom: 1px;
    box-shadow: 16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*left shadow*/
    -16px 0 12px -12px rgba(0, 0, 0, 0.5) inset, /*right shadow*/
    0 -16px 10px -10px rgba(0, 0, 0, 0.5) inset; /*bottom shadow*/
}

#info {
    z-index: 1;
}

#info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5%;
    height: 40%;
    background: #F44545;
    overflow: hidden;
    z-index: 2;
    box-shadow: 16px 0 12px -12px rgba(0, 0, 0, 0.5) inset; /*left shadow*/
}

#info:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5%;
    height: 40%;
    background: #F44545;
    overflow: hidden;
    z-index: 2;
    box-shadow: 16px 0 12px -12px rgba(0, 0, 0, 0.5) inset; /*left shadow*/
}

#tabcontent_how_to_play {
    display: block;
    text-align: left;
    padding-top: 25px;
    color: white;
    text-shadow: 1px 1px 2px #000000;
}

.how-to-play-div {
    display: inline-block;
    margin-bottom: 20px;
}

#tabcontent_how_to_play p {
    margin-top: 5px;
    overflow: hidden;
    line-height: 1.2;
    font-size: 1.2em;
}

.img-info {
    float: left;
    width: 40px;
    margin-right: 10px;
    margin-left: 10px;
}


#tabcontent_languages {
    display: none;
}

#tabcontent_contact {
    display: none;
}

.no-img-p {
    margin-left: 50px;

}


/*Language Section*/

.tab-languages button {
    width: 40%;
    padding-top: 20%;
    border: none;
    outline: none;
    top: -5px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border-radius: 15px;
    background-color: #2a2a2a;
    background-repeat: no-repeat;
    text-align: center;
    background-size: cover;
    vertical-align: middle;
    background-position: center;    
    box-shadow: 4px 4px 10px #2a2a2a;
    -webkit-transition: all .4s;
    -moz-transition: all .4s;
    transition: all .4s;
    margin: 3%;
}

.tab-languages button:active {
    top: 5px;    
    box-shadow: none;
}

#flag_france {
    background-image: url(Res/flag_france.svg);
}

#flag_spain {
    background-image: url(Res/flag_spain.svg);
}

#flag_italy {
    background-image: url(Res/flag_italy.svg);
}

#flag_usa_uk {
    background-image: url(Res/flag_usa_uk.svg);
}

/*Contact Form*/

.tabcontent-info {
    color: #1e1e1e;
}

#contact_thank_message {
    display: none;
    font-size: 1.1em;
}

label {
    font-size: 1.5em;
    margin-right: 5%;
    position: relative;
}

#label_name_popup,
#label_email_popup {
    white-space: nowrap;
    position: absolute;
    display: none;
    font-size: 0.7em;
    background-color: #555;
    color: #fff;
    font-weight: 50;
    text-align: center;
    border-radius: 6px;
    z-index: 2;
    padding: 5px 4px;
}

#label_message_popup {
    width: 250px;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    margin-left: -125px;
    display: none;
    font-size: 0.7em;
    background-color: #555;
    color: #fff;
    font-weight: 50;
    text-align: center;
    border-radius: 6px;
    z-index: 2;
    padding: 6px 6px;
}

#form_header {
    width: 80%;
    margin: 3% 10% 0 10% ;
    display: block;
    text-align: left;
}

#label_message {
  margin-left: 10%;
}

#label_cont {
  text-align: left;
}

input[type=text],
input[type=email],
textarea {
    font-family: monospace;
    /*padding: 12px; removed because of bug on firefox: see http://biostall.com/firefox-not-displaying-placeholder-or-text-entered-into-textbox/*/    
    border: 1px solid #ccc;    
    border-radius: 8px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 5%;    
    box-shadow: 2px 2px 5px #2a2a2a;
    resize: vertical
}

input[type=text],
input[type=email] {
    text-align: center;
    width: 50%;
    height: 2em;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset;
}

textarea {
    width: 80%;
    min-height: 100px;
    resize: vertical;
    margin-bottom: 6px;
}

#textarea_character_counter {
    text-align: right;
    margin-right: 10%;
}

.hnypt {
    display: none;
}

#url {
    width: 40px;
}

#submit_btn_contact_form {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
    top: -5px;    
    box-shadow: 2px 2px 5px #2a2a2a;
    -webkit-transition: all .4s;
    -moz-transition: all .4s;
    transition: all .4s;
}

#submit_btn_contact_form:active {
    top: 5px;
    box-shadow: none;
}

#submit_btn_contact_form:hover {
    background-color: #45a049;
}

input[type=text]::-webkit-input-placeholder,
input[type=email]::-webkit-input-placeholder {
    /* Chrome */
    color: gray;
    opacity: 0.6;
}

input[type=text]:-ms-input-placeholder,
input[type=email]:-ms-input-placeholder {
    /* IE 10+ */
    color: gray;
    opacity: 0.6;
}

input[type=text]::-moz-placeholder,
input[type=email]::-moz-input-placeholder {
    /* Firefox 19+ */
    color: gray;
    opacity: 0.6;
}

input[type=text]:-moz-placeholder,
input[type=email]:-moz-input-placeholder {
    /* Firefox 4 - 18 */
    color: gray;
    opacity: 0.6;
}


/* Table */

.data-table {
    text-align: center;
    border-collapse: collapse;
    font-size: 3vh;
    width: 80%;
    margin: auto;
}

.data-table th,
.data-table td {
    border: 2px 0px 2px 0px solid #e1edff;
    padding: 3px 17px;
}

.data-table caption {
    margin: 7px;
}

table {
    color: white;
}

.data-table tbody td {
    color: white;
}

.data-table-easy tbody tr:nth-child(odd) td {
    background-color: darkgreen;
}

.data-table-medium tbody tr:nth-child(odd) td {
    background-color: #ee4e00;
}

.data-table-hard tbody tr:nth-child(odd) td {
    background-color: #A30000;

}

/*ScrollBar customization*/

::-webkit-scrollbar {
    width: 12px;
}

/* Track */

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

/* Handle */

::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: gainsboro;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb:window-inactive {
    background: gainsboro;
}

/*Media Queries*/

@media (max-width: 500px) {

    .close-modal {
        color: white;
        border: none;
        outline: none;
        font-weight: bold;
        float: left;
        position: relative;
        z-index: 0;
        width: 0.5%;
        background: none;
    }

    #tabcontent_how_to_play p {
        font-size: 0.9em;
    }

    .modal-content {
        width: 90%;
    }

    .tablinks {
        font-size: 1.1em;
    }
    .tab-languages button {
        width: 25%;

    }

    .data-table {
        font-size: 5vh;
        width: 90%;
    }

    label {
        font-size: 1em;
    }

}



@media (min-width: 501px)and (max-width: 767px) {

    #tabcontent_how_to_play p {
        font-size: 1em;
    }

    .modal-content {
        width: 80%;
    }

    .tablinks {
        font-size: 1.3em;
    }

    .tab-languages button {
        width: 30%;
    }

    .data-table {
        font-size: 4.5vh;
        width: 90%;
    }

    label {
        font-size: 1.25em;
    }

}

@media (min-width: 768px) and (max-width: 1024px) {

    #tabcontent_how_to_play p {
        font-size: 1.2em;
    }

    .modal-content {
        width: 66%;
    }

    .tablinks {
        font-size: 1.4em;
    }

    .data-table {
        font-size: 3vh;
        width: 90%;
    }

    label {
        font-size: 1.3em;
    }

    @media (min-width: 1025px) and (max-width: 1224px) {

        .modal-content {
            width: 60%;
        }

    }

    @media (min-height: 900px) {

        #tabcontent_how_to_play p {
            font-size: 1.3em;
        }

    }
}