* {
    font-family: "Space Grotesk", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: rgb(101, 102, 105);
    transition: all 0.2s ease-in-out;
}

body {
    overflow: hidden;
    background-color: rgb(51, 52, 55);
    height: 100vh;
    width: 100vw;
}

#main {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    background-color: rgb(51, 52, 55);
    align-items: center;
}

main {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
    height: 100vh;
}

.mode-wrapper {
    display: flex;
    padding: 6px;
    background-color: rgb(45, 46, 49);
    height: fit-content;
    width: fit-content;
    border-radius: 8px;
    margin: 10px;
    gap: 3px;
}

.mode {
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

.mode-input:checked + .mode {
    background-color: rgb(70, 71, 73);
    color: #E2B715;
}

.mode-input {
    appearance: none;
    cursor: pointer;
}

.mode:hover {
    color: white;
}

.mode.selected {
    color: #E2B715;
}

#settings-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slider {
  -webkit-appearance: none;
  width: 200px;
  height: 25px;
  background: rgb(45, 46, 49);
  padding: 3px;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
  border-radius: 10px;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #E2B715;
  cursor: pointer;
  border-radius: 10px;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  background: #E2B715;
  cursor: pointer;
}

#flashlight {
    aspect-ratio: 1;
    width: 30vh;
    background-color: rgb(45, 46, 49);
    border-radius: 10px;
    border: 5px solid rgb(101, 102, 105);
    transition: none;
    text-align: center;
    font-size: 40px;
    vertical-align: middle;
}

#flashlight.active {
    background-color: #E2B715;
}

#controls-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    font-size: 30px;
}

#controls-wrapper i {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#controls-wrapper i:hover {
    color: white;
}

#controls-wrapper i.active {
    color: #E2B715;
}

#controls-wrapper i.disabled {
    cursor: not-allowed;
    color: rgb(70, 71, 73);
}

.mode-parent {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-direction: row;
}

#info-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;;
}

#input-wrapper > input {
    background-color: rgb(45, 46, 49);
    border: none;
    color: #E2B715;
    caret: white;
    font-size: 20px;
    margin: 10px;
    text-align: center;
}

#input-wrapper > i {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: rgb(45, 46, 49);
    padding: 10px;
    border-radius: 8px;
}

#input-wrapper > i:hover {
    color: white;
}

#input-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: 3px solid rgb(101, 102, 105);
    border-radius: 8px;
    background-color: rgb(45, 46, 49);
}

#input-wrapper > input:focus {
    outline: none;
}

#input-parent {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 30px;
}

#input-wrapper:has(#answer-input.correct) {
    border: 3px solid rgb(0, 206, 0);
}

#input-wrapper:has(#answer-input.incorrect) {
    border: 3px solid rgb(195, 0, 0);
}

#input-wrapper:has(#answer-input.partial) {
    border: 3px solid #E2B715;
}

.correct-letter {
    color: #11B981;
}

.misplaced-letter {
    color: #E2B715;
}

.incorrect-letter {
    color: #C30000;
}

#answer-feedback > span::after {
    content: "_";
    opacity: 0;
    position: absolute;
    font-size: 30px;
    transform: translate(-100%, -100%);
    color: rgb(101, 102, 105);
    transition: all 0.2s ease-in-out;
}

#answer-feedback > span.highlighted-letter::after {
    opacity: 1;
}

#answer-feedback > span {
    cursor: pointer;
}

#morse-table {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 10px;
    width: 320px;
    margin-left: 20px;
    height: 90vh;
}

.morse-letter {
    position: absolute;
    display: none;
}

.morse-letter-wrapper {
    display: flex;
    justify-content: space-between;
    background-color: rgb(45, 46, 49);
    padding: 6px 10px;
    border-radius: 8px;
    width: 50%;
}

#unit-length {
    width: 30vw;
}

@media screen and (max-width: 450px) {
    .mode-wrapper-label {
        display: none;
    }
    #input-parent {
        flex-direction: column;
    }
    #feedback-info {
        display: none;
    }
}

@media screen and (max-width: 800px) {
    #morse-table {
        display: none;
    }
    #statistics-wrapper {
        display: none;
    }
}

/* The switch - the box around the slider */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
  scale: 0.7;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(70, 71, 73);
  border: 1px solid #adb5bd;
  transition: .4s;
  border-radius: 30px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  border-radius: 20px;
  left: 0.27em;
  bottom: 0.25em;
  background-color: rgb(101, 102, 105);
  transition: .4s;
}

input[type="checkbox"]:checked + .switch-slider {
  background-color: #E2B715;
  border: 1px solid #E2B715;
}

input[type="checkbox"]:focus + .switch-slider {
  box-shadow: 0 0 1px #E2B715;
}

input[type="checkbox"]:checked + .switch-slider:before {
  transform: translateX(1.4em);
  background-color: rgb(45, 46, 49);
}

#switches-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

#text-output {
    width: 100%;
    height: 30vh;
    transition: none;
    text-align: center;
    padding: 10px;
    font-size: 30px;
    overflow-y: auto;
    display: none;
}

#text-output-desc {
    font-size: 17px;
    text-align: center;
}

#regenerate-button {
    transition: transform .75s ease-in-out, color 0.2s ease-in-out !important;
}

#logo {
    width: 50px;
    aspect-ratio: 1;
}

nav {
    position: absolute;
    top: 0px;
    left: 0px;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 10px;
    height: 80px;
    width: 100vw;
    padding-left: 15px;
    pointer-events: none;
}

#button {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 3px solid rgb(101, 102, 105);
    cursor: pointer;
    overflow: hidden;
}

#button:hover {
    border-color: white;
    position: relative;
    z-index: 0;
}

#button::after{
    content: "";
    width: 56px;
    aspect-ratio: 1;
    display: block;
    position: relative;
    left: -3px;
    top: -3px;
    z-index: -1;
    background-color: #E2B715;
    border-radius: 50%;
    scale: 0;
    transition: all .25s ease-in-out;
}

#button:active {
    border-color: #E2B715;
}

#button:active::after {
    scale: 2;
}

#wave-diagram {
    width: 50vw;
    height: 15vh;
    background-color: rgb(45, 46, 49);
    margin-top: 10px;
    border-radius: 10px;
    display: none;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltiptext {
  width: 200px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  left: 110%;
  opacity: 0;
  pointer-events: none;
  transform: translate(0%, -25%);
}

.tooltiptext::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

.tooltip:hover .tooltiptext {
  opacity: 1;
}

#feedback-info {
    font-size: 15px;
    cursor: pointer;
}