
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: ephesis, cursive;
    background-color: rgb(33, 100, 45);
    color: green;
    transition: all 0.4s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
body.dark {
    background-color: rgb(22, 58, 2);
    color: green;
}

nav {
    display: flex;
    padding: 10px 30px;
    margin-bottom: 90px;
    background: rgb(135, 197, 99);
    color: rgb(194, 41, 66);
    align-items: center;
    width: 100%;
    font-size: 1.5rem;
    justify-content: space-evenly;
}

body.dark nav {
    background: rgb(54, 105, 54);
}

nav ul {
    justify-content: space-evenly;
    list-style: none;
    display: flex;
    gap: 50px;
    font-size: 1.5rem;
    font-style: italic;
    align-items: center;
    text-decoration: rgb(255, 84, 112) wavy underline;
}

nav a {
    text-decoration: none;
    color: rgb(243, 90, 115);
}

body.dark nav ul {
    color: pink;
    text-decoration: pink wavy underline;
}

body.dark nav a {
    color: pink;
}
#themeToggle {
    padding: 10px 30px;
    margin: 15px 40px 0 auto;
    margin-top: 15px;
    float: right;
    color: rgb(206, 164, 73);
    background: rgb(75, 109, 35);
    font-family: 'emphesis', cursive, sans-serif;
    font-weight: 700px;
    font-size: 1.21rem;
    width: 10rem;
    border: lightcoral dashed;
}

body.dark #themeToggle {
    background: rgb(35, 83, 35);
    color: rgb(248, 169, 182);
}

h2 {
    color: rgb(250, 250, 157);
    text-align: center;
    text-decoration: rgb(245, 245, 153) wavy underline;
    font-size: 1.7rem;
}

body.dark h2 {
    color: rgb(253, 84, 112);
    text-decoration: rgb(253, 84, 112) wavy underline;
}
p {
    color: rgb(247, 242, 174);
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
    margin: 15px 40px;
    gap: 20px;
    align-items: center;
}

body.dark p {
    color: rgb(250, 90, 117);
}
.container {
    text-align: center;
    padding: 10px 30px;
    margin-top: 50px;
    margin-bottom: 50px;
    justify-content: center;
    width: 50%;
    margin-left: 25%;
    color: rgb(128, 128, 73);
    background: pink;
}

body.dark .container {
    background-color: rgb(184, 83, 117);
}

body.dark h1 {
    color: rgb(57, 99, 1)
}

input {
    padding: 10px 20px;
    background-color: #8eb13e;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    width: 70%;
}

button {
    color: white;
    background: rgb(73, 128, 0);
    width: 25%;
    border-radius: 22px;
    padding: 9px 10px;
    margin: 10px 0;
    align-items: center;
}

body.dark button {
    background: rgb(245, 136, 154);
    color: rgb(151, 57, 57);
}
input[type="submit"]:hover,
button:hover {
    background-color: #218838;
}

canvas {
    width: 100% !important;
    max-height: 400px;
    margin-top: 1rem;
}


.controls {
    margin-bottom: 1rem;
}

.equationInput {
    display: inline-block;
    margin: 10px 0px;
    padding: 10px 0px;
    width: 200px;
    text-align: center;
    border-radius: 8px;
}

footer {
    padding: 10px 30px;
    margin-top: 50px;
    background: rgb(46, 102, 29);
    color: pink;
    font-size: 1.3rem;
    font-style: italic;
    width: 100%;
    text-align: center;
    bottom: 0;
    left: 0;
    width: 100%;
}

body.dark footer {
    background: rgb(38, 88, 38);
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    input {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .controls {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 12px;
        padding: 10px 3px;
    }

    nav ul {
        flex-direction: column;
        gap: 12px;
    }

    #themeToggle {
        width: 50%;
        margin: 23px auto;
        padding: 1rem;
    }

    input, button {
        width: 100%;
        margin-bottom: 10px;
    }

    footer {
        font-size: 1rem;
        padding: 17px 0;
    }
}