/* Import Google fonts Cinzel and Playfair */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap');

/* REMOVE DEFAULT BROWSER SETTINGS */
* {
    margin:0;
    padding: 0;
    box-sizing: border-box;
    overscroll-behavior: none;
    cursor: default;
}

/* GENERAL STYLES */
body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: url(../img/dac-background.webp) no-repeat center center / cover;
    font-family: 'Playfair', serif;
    color: #26241E;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #26241E;
}

.hidden-heading {
    display: none;
}

.button-align {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Styling for main action buttons */
.main-buttons {
    text-decoration: none;
    font-weight: 500;
    width: 80%;
    max-width: 450px;
    color: whitesmoke;
    background-color: #590202;
    min-height: 50px;
    height: fit-content;
    border-radius: 10px;
    border: 2px #333 solid;
    font-size: 1.5rem;
    font-family: 'Cinzel', serif;
    text-align: center;
    padding: 0 10px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Tooltip styling */
.button-hints {
    align-self: center;
    position: absolute;
    top: 110%;
    color: #333;
    width: fit-content;
    padding: 5px;
    background-color: #F9E9B8;
    border: 2px #333 solid;
    border-radius: 5px;
    text-align: center;
    text-transform: uppercase;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    z-index: 200;
}

/* Ignoring double tap zoom for mobile */
.no-double-tap-zoom {
    touch-action: manipulation;
}

/* HEADER */
header {
    display: flex;
    justify-content: center;
    padding: 20px 20px 0 20px;
    position: relative;
}

#main-logo {
    text-align: center;
    border-radius: 10px;
    padding: 11.5px 20px;
    color: whitesmoke;
    font-size: 1.5rem;
    background-color: rgba(89, 2, 2, 0.5);
    position: absolute;
    top: 60px;
}

#dragon-logo {
    height: 140px;
}

/* MAIN */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    margin: 20px 0;
    align-items: center;
}

#text-container { 
    width: 90%;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(115, 72, 34, 0.5);
    border-radius: 20px;
}

#text-box {
    text-align: center;
    padding: 20px;
    background-color: #FDF8E7;
    border: 2px #333 solid;
    border-radius: 10px;
}

#text-box h2 {
    margin-bottom: 1rem;
}

/* HOMEPAGE */
#quiz-length-container {
    display: flex;
    justify-content: space-evenly;
}

.quiz-length-choice {
    display: flex;
    flex-direction: column;
}

.quiz-length-input {
    accent-color: #333;
}

/* GAME PAGE */
#game-box {
    width: 90%;
    max-width: 500px;
    padding: 25px 20px 20px 20px;
    background-color: rgba(115, 72, 34, 0.5);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 10px;
    align-items: center;
    position: relative;
}

/* No selection message box */
#no-selection {
    background-color: #F9E9B8;
    border: 2px #333 solid;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: absolute;
    display: none;
}

#progress-bar {
    border-radius: 5px;
    background-color: #F9E9B8;
    width: 95%;
}

#progress {
    transition: all 0.5s ease-in-out;
    background-color: rgba(89, 2, 2, 0.7);
    width: 0%;
    height: 10px;
    border-radius: 5px;
    position: relative;
}

#progress-dragon {
    height: 2rem;
    position: absolute;
    right: -20px;
    bottom: -5px;
}

/* Question box styling */
#question {
    padding: 10px;
    background-color: #F9E9B8;
    width: 100%;
    max-width: 450px;
    color: #333;
    height: 75px;
    border-radius: 10px;
    border: 2px #333 solid;
    text-align: center;
    margin-top: 5px;
}

/* Answer options styling */
.options {
    background-color: #FDF8E7;
    width: 100%;
    max-width: 450px;
    color: #333;
    height: 40px;
    border-radius: 10px;
    border: 2px #333 solid;
    font-weight: 700;
}

.correct-answer {
    background-color: #93C47D;
}

.incorrect-answer {
    background-color: #A65638;
}

/* Highlighting selected answer */
.radio-check:checked + label {
    background-color: #F2CF63;
}

#game-box input {
    display: none;
}

#next-button {
    display: none;
}

/* DAC PAGE */
.dragon-container {
    position: relative; 
}

.dragon-container:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    background: url(../img/fire-dragon.png) no-repeat center center / contain;
    opacity: 0.3;
}

.dragon-content {
    position: relative; 
    z-index: 2;
}

/* FOOTER */
footer {
    padding: 0.75rem;
    background-color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#help-toggle {
    display: none;
}

#help-toggle:checked~div {
    display: flex;
    flex-direction: column;
    align-content: space-evenly;
}

.help-toggle-label {
    align-self: center;
}

#help-logo {
    font-size: 1.5rem;
    color: whitesmoke;
    align-self: center;
}

#help-content {
    padding: 20px;
    text-align: center;
    align-self: center;
    width: 100vw;
    max-width: 500px;
    background-color: #F9E9B8;
    border: 2px #333 solid;
    position: absolute;
    bottom: 100%;
    display: none;
}

#nav-links {
    display: flex;
    justify-content: space-evenly;
}

#help-content i {
    font-size: 2rem;
    color: #333;
}

/* Adding tooltips for devices with a mouse */
@media (pointer: fine) {
    .button-hints::after {
        content: " ";
        position: absolute;
        bottom: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: transparent transparent #333 transparent;
      }
    
    /* Making tooltips fade into view */
    .main-buttons:hover .button-hints {
        visibility: visible;
        opacity: 1;
        transition: opacity 1s;
        transition-delay: 1s;
    }
  }

  /* Adding responsive design for screen widths above 768px */
@media screen and (min-width : 768px) {    
    body {
        font-size: 1.25rem;
    }
    
    h1, h2, h3 {
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    #main-logo {
        font-size: 2rem;
        top: 75px;
    }
    
    #dragon-logo {
        height: 160px;
    }
}

/* Adding responsive design for screen widhts above 1024px */
@media screen and (min-width : 1024px) {    
    #main-logo {
        font-size: 2.5rem;
        top: 90px;
    }
    
    #dragon-logo {
        height: 200px;
    }
}