body {
    font-family: Verdana;
    background: rgb(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    transition: background-color 0.4s ease, color 0.4s ease;
}
body.dark-mode {
    background: rgb(0, 0, 0);
}

html {
    scroll-behavior: smooth;
}

h1 {
    color: grey;
    font-size: clamp(0.5vw, 1.52em, 2rem);
    margin-top: 5px;
    transition: color 0.4s ease;
}
body.dark-mode h1 {
    color: lightgrey;
}

.maindiv {
    background-color: white;
    color: black;
    width: 80%;
    max-width: 400px;
    padding: 10px 10px 5px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.2s ease;
}
body.dark-mode .maindiv {
    background-color: rgb(30, 30, 30);
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.maindiv:hover,
.maindiv:focus-within {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
body.dark-mode .maindiv:hover,
body.dark-mode .maindiv:focus-within {
    background-color: rgb(30, 30, 30);
    color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.inputdiv {
    background-color: rgb(255, 188, 107);
    width: 85%;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
body.dark-mode .inputdiv {
    background-color: rgb(205, 138, 57);
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.outputdiv {
    background-color: rgb(142, 255, 108);
    width: 85%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
body.dark-mode .outputdiv {
    background-color: rgb(57, 205, 138);
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

div#principalDiv,
div#rateDiv,
div#timeDiv {
    margin: 2px;
}

span#input {
    float: left;
    color: black;
    font-size: 16px;
    text-transform: uppercase;
    padding: 5px;
    transition: color 0.4s ease;
}
body.dark-mode span#input {
    color: white;
}

input#rateValue {
    width: 16%;
    float: right;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-right: 10px;
}

input[type="number"] {
    width: 50%;
    float: right;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-right: 10px;
}

input[type="range"] {
    width: 30%;
    float: right;
    cursor: pointer;
    padding: 5px;
}

span#outputLable {
    color: black;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    border: 1px dashed black;
    padding: 2px;
    border-radius: 5px;
    transition: color 0.4s ease, border-color 0.4s ease;
}
body.dark-mode span#outputLable {
    color: white;
    border: 1px dashed white;
}

span#result {
    font-size: 18px;
    color: black;
    display: block;
    margin-top: 10px;
    transition: color 0.4s ease;
}
body.dark-mode span#result {
    color: white;
}

span#output {
    font-weight: bold;
    color: black;
    font-size: 18px;
    text-transform: uppercase;
    transition: color 0.4s ease;
}
body.dark-mode span#output {
    color: white;
}

#compute {
    background-color: gray;
    color: white;
    padding: 5px;
    margin-top: 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
body.dark-mode #compute {
    background-color: grey;
    color: white;
}

#compute:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
body.dark-mode #compute:hover {
    background-color: grey;
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

#compute:active {
    background-color: rgb(80, 80, 80);
    transition: background-color 0.1s ease;
}
body.dark-mode #compute:active {
    background-color: rgb(80, 80, 80);
    color: white;
}

#DayNightSwitch {
    position: fixed;
    top: 16px;
    right: 32px;
    background: linear-gradient(to top, yellow, orange);
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    transition:  0.4s ease, box-shadow 0.4s ease, transform 0.2s ease;
}
body.dark-mode #DayNightSwitch {
    background: linear-gradient(to top, #000428, #004e92);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#DayNightSwitch:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
body.dark-mode #DayNightSwitch:hover {
    background: linear-gradient(to top, #000428, #004e92);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

#DayNightIcon {
    display: block;
    margin: 0 auto;
    width: 100%;
    transition: transform 0.2s ease;
}

#DayNightSwitch:hover #DayNightIcon {
    transform: rotate(30deg);
    transition: transform 0.2s ease;
}

#DayNightSwitch:active #DayNightIcon {
    transform: rotate(90deg);
    transition: transform 0.1s ease;
}
body.dark-mode #DayNightSwitch:active #DayNightIcon {
    transform: rotate(90deg);
    transition: transform 0.1s ease;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: grey;
    border-radius: 10px 10px 0 0;
    background-color: rgb(255, 255, 255);
    padding: 5px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
body.dark-mode footer {
    background-color: rgb(30, 30, 30);
    color: lightgrey;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}