/* Fonts - Newsreader , Roboto */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;

    font-family: 'Newsreader', serif;
    min-width: 320px;
    min-height: 100vh;
    padding: 25px 20px 0;
}

body.light-mode {
    background-color: rgb(103, 146, 224);
    color: #222;
}

body.dark-mode {
    background-color: rgb(45, 48, 49);
    color: #eee;
}

.main-container {
    animation: fadeIn 1s ease;
}

header {
    font-family: 'Newsreader', serif;
    text-align: center;
}

.btn {
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    transition: ease-in-out 0.2s;
}

#searchContainer {
    display: flex;
    justify-content: center;
    margin: 15px auto;
    width: 100%;
}

#searchInput {
    border: 1px solid gray;
    border-radius: 10px 0 0 10px;
    font-size: 18px;
    margin-right: 2px;
    padding: 6px;
}

#btnSearch {
    padding: 6px;
    border: 1px solid gray;
    border-radius: 0 10px 10px 0;
    background-color: #f5473b;
    font-size: 16px;
    color: white;
}

#audioContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#audioBtn {
    background-color: #f5473b;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    padding: 12px;
}

#btnSearch:hover,
#audioBtn:hover,
#closeModalBtn:hover {
    background-color: #d43a2c;
}

#modalErrorWindow {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    color: white;
    font-family: 'Newsreader', serif;
    padding: 20px;

    width: 80%;
    max-width: 520px;
    transform: translate(-50%, -50%);
    z-index: 2;
}

#closeModalBtn {
    background-color: transparent;
    border: none;
    color: white;
    font-size: 30px;
}

#resultsContainer {
    display: none;
    font-family: 'roboto', sans-serif;
}

#wordTitle {
    margin: 10px 0;
}

#wordDefinition ul li {
    margin-bottom: 10px;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    font-size: 19px;
    text-align: center;
}

#light-dark--toggle {
    border: none;
    border-radius: 10px;
    font-size: 16px;
    padding: 10px;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (width <=1015px) {
    .main-container {
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
        font-family: 'Roboto', sans-serif;
        max-width: 650px;
        margin-bottom: 20px;
        padding: 30px;
        width: 85%;
    }

    .main-container.dark-mode {
        background-color: rgb(45, 48, 49);
        border: 2px solid white;
        box-shadow: 0 2px 5px rgba(212, 212, 212, 0.5);
    }

    #modalErrorWindow {
        display: none;
        position: fixed;
        left: 50%;
        top: 325px;
    }

    #closeModalBtn {
        position: absolute;
        right: 20px;
        top: 10px;
    }

    #resultsContainer {
        margin-top: 18px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 20px;
    }
}

@media screen and (width > 1015px) {
    .main-container {
        display: flex;
        width: 80vw;
        max-width: 800px;
        min-height: 80vh;
        border-radius: 8px;
        overflow: hidden;
        padding: 10px;
    }

    .page {
        flex: 1;
        padding: 2rem;
        background: linear-gradient(to right, #fff, #fdfaf4);
        position: relative;
    }

    .page.dark-mode {
        background: rgb(78, 75, 75);
    }

    .page.left {
        border-right: 1px solid #ddd;
        border-top: 7px solid grey;
        border-left: 7px solid grey;
        border-bottom: 7px solid grey;
        border-top-right-radius: 35px;
        box-shadow: inset -3px 0 5px rgba(0, 0, 0, 0.05);
    }

    .page.right {
        border-left: 1px solid #ddd;
        border-top: 7px solid grey;
        border-right: 7px solid grey;
        border-bottom: 7px solid grey;
        border-top-left-radius: 35px;
        box-shadow: inset 3px 0 5px rgba(0, 0, 0, 0.05);
    }

        header {
        margin-bottom: 65px;
    }

    
    #modalErrorWindow {
        display: none;
        position: absolute;
        left: 50%;
        top: 250px;
    }

    
    #closeModalBtn {
        position: absolute;
        right: 10px;
        top: 3px;
    }

        #resultsContainer {
        border-radius: 4px;
        /* padding: 20px; */
    }

    #audioBtn{
        padding: 8px;
    }
}