/* 
    English Learning App

    Author: WattoX00
    Date:   25/02/2024
*/
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --button-bg: #007bff;
    --button-text: #ffffff;
    --menu-bg: #ffffff;
    --menu-text: #000000;
    --footer-bg: #ffffff;
    --footer-text: #000000;
    --e-bg: #fafafa;
    --e-text: #000;
    --i-text: #fff;
    --i-bg: #444;
}

body.dark-theme {
    --bg-color: rgb(36, 39, 41);
    --text-color: #fff;
    --button-bg: #333;
    --button-text: #fff;
    --menu-bg: rgb(36, 39, 41);
    --menu-text: #fff;
    --footer-bg: rgb(36, 39, 41);
    --footer-text: #fff;
    --e-bg: #333;
    --e-text: #fff;
    --i-text: #444;
    --i-bg: #fff;
}

#toggleThemeButton {
    position: absolute;
    z-index: 11;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    margin: 10px;
    background-color: var(--bg-color);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#toggleThemeButton:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    display: grid;
    grid-template-rows: 1fr 3fr;
    grid-template-columns: 1fr 1fr 1fr;
    height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

header {
    grid-row: 1;
    grid-column: 1 / span 3;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    position: relative;
    border-bottom: 3px solid var(--footer-text);
}
#welcomeMessage {
    font-size: 2vw;
    text-align: center;
    margin: 0 auto;
}
#footerContainer {
    bottom: 0;
    left: 0;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    transition: transform 0.3s ease;
    transform: translateY(100%);
    display: flex;
    justify-content: space-between;
    padding: 20px;
    position: fixed;
    z-index: 1;
    width: 100%;
}

#footerContainer.active {
    transform: translateY(0);
}

#footerArrow {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: var(--footer-text);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#footerArrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.footer-section {
    text-align: center;
}

.footer-section p {
    margin: 0 50px 0 20px;
}

@keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  .fade-in {
    animation: fadeIn 2s ease-in-out; 
  }

#wordCounter,
#timer {
    margin-right: 10px;
    font-size: 2vw;
}

#fileInput {
    margin-right: 10px;
}

#outputContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#previousWords {
    margin-bottom: 20px;
}

#output {
    white-space: pre-line;
    font-size: 3vw;
    font-weight: bold;
    color: var(--menu-text);
}

#userInput {
    font-size: 2.5vw;
    display: none;
    margin: 10px auto;
    background-color: var(--e-bg);
    color: var(--e-text);
    border: none;
}

#showResultLink {
    height: max-content;
    width: max-content;
    margin: 10px auto;
    display: none;
    padding: 5px;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    cursor: pointer;
}

#showResultLink:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: 1s ease;
}

.correct {
    color: #00ff00;
    font-size: 2vw;
}

.incorrect {
    color: #ff0000;
    font-size: 2vw;
}

#menuToggle {
    grid-row: 1;
    grid-column: 1;
    cursor: pointer;
    padding: 10px;
    margin-top: 15px;
    margin-left: 15px;
    z-index: 11;
    color: var(--menu-text);
    border: none;
    width: max-content;
    height: max-content;
}

#menuToggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: 1s ease;
}

#slidingMenu {
    position: fixed;
    top: 0;
    width: 0;
    height: 100%;
    background-color: var(--menu-bg);
    color: var(--menu-text);
    padding: 20px;
    z-index: 10;
    transition: 1s ease;
    animation: colorTransition 0.2s steps(100,end) forwards;
}
#fileList li{
    list-style: none;
    padding: 10px;
    margin-top: 40px;
    z-index: 100;
}
#textFilesContainer{
    z-index: 100;
    width: 100%;
}
#textFilesContainer li{
    list-style: none;
    margin: 0.7 vw;
    padding: 5px;
}
#slidingMenu a:hover {
    transition: 0.5s ease;
    color: var(--i-bg);
    background-color: var(--i-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 1);
}

a {
    text-decoration: none;
    font-size: 2vw;
    color: var(--menu-text);
    position: relative;
    display: inline-block;
    overflow: hidden;
}

@keyframes colorTransition {
    to {
        width: 100%;
    }
}

.credit {
    position: fixed;
    bottom: 10px;
    font-size: 15px;
}

.hidden-menu {
    display: none;
}

@media only screen and (max-width: 768px) {
    #footerContainer {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }
    #fileList li {
    margin-top: 30px;
    }
    .footer-section {
        width: 100%;
        text-align: center;
        margin: 0 10px;
    }
    #welcomeMessage {
    padding-top: 4 0px;
    font-size: 3vw;
    text-align: center;
    margin: 0 auto;
}
    body:hover #footerContainer {
        display: block;
    }

    #output {
        font-size: 20px;
    }

    #userInput {
        font-size: 20px;
    }

    .correct {
        color: #00ff00;
        font-size: 20px;
    }

    .incorrect {
        color: #ff0000;
        font-size: 20px;
    }

    a {
        font-size: 5vw;
    }

    .credit {
        color: #fff;
        font-size: 15px;
        position: fixed;
        bottom: 20px;
    }

    #wordCounter,
    #timer {
        margin-right: 10px;
        font-size: 20px;
    }
}

@media only screen and (min-width: 2560px) {
    #menuToggle {
        padding: 5%;
        font-size: 2vw;
    }
    #showResultLink {
        padding: 5%;
        font-size: 2vw;
    }
    #footerContainer {
        padding: 40px;
    }

}