:root {
  --background: white;
  --togglemodebg: #757575;
  --inputworcolor: #2d2d2d;
  --meaningheadingcolor: white;
  --textmeaningcolor: #2d2d2d;
  --shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.1);
  --inputbg: #f4f4f4;
  --playbtnbg: rgba(164, 69, 237, 0.25);
  --meaningcolor: #2d2d2d;
  --meaninglists: #2d2d2d;
  --outlinecolor: #a445ed;
  --optionscolor: black;
}

[data-theme="dark"] {
  --optionscolor: white;
  --outlinecolor: #a445ed;
  --background: #171823;
  --togglemodebg: #a445ed;
  --inputworcolor: white;
  --meaningheadingcolor: #2d2d2d;
  --playbtnbg: rgba(164, 69, 237, 0.1);
  --textmeaningcolor: white;
  --shadow: 0px 5px 30px 0px #a445ed;
  --meaninglists: #fff;
  --inputbg: #1f1f1f;
  --meaningcolor: #757575;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transition: 0.3s linear;
}

main,
footer {
  opacity: 0;
  overflow-x: hidden;
}

body {
  font-family: "lora";
  background-color: var(--background);
}

header {
  max-width: 46rem;
  width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 26rem;
  margin-top: 3.62rem;
  margin-bottom: 3.22rem;
}

.subheader {
  display: flex;
  align-items: center;
}

.selected__font {
  display: flex;
  gap: 1.13rem;
}

.selected__font p {
  color: var(--textmeaningcolor);
  /* font-size: 1.125rem; */
  font-style: normal;
  font-weight: 700;
  line-height: 1.5rem;
  width: 5.625rem;
  /* width: 100%; */
}

.options__section {
  margin-right: 1.62rem;
}

.options__section p:hover {
  cursor: pointer;
}

.dropdown__img {
  border-right: 2px solid #e9e9e9;
  padding-right: 1.63rem;
}

.toggle__section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.toggle__btn {
  height: 1.25rem;
  background-color: var(--togglemodebg);
  border-radius: 2rem;
  padding-inline: 1.8rem;
  padding-block: 1rem;
}

.toggle {
  margin-left: -1.5rem;
  margin-top: -0.55rem;
  height: 1.2rem;
  width: 1.2rem;
  border-radius: 100%;
  background-color: white;
  transition: 0.3s linear;
}

.move__toggle {
  margin-left: 0;
  margin-right: -2.5rem;
  transition: 0.3s linear;
}

.options {
  position: absolute;
  top: 12%;
  z-index: 10;
  width: 11.4375rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  border-radius: 1rem;
  background: var(--background);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5rem;
  margin-left: -4.5rem;
  margin-top: 1.3rem;
  transition: 0.3s linear;
  color: var(--optionscolor);
}

.mono {
  font-family: "Inconsolata";
  font-size: 1.125rem;
}

.serif {
  font-family: "Lora";
}

.input__section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 46rem;
  width: 100%;
  margin-inline: auto;
}

.input__field {
  position: relative;
}

.input__section input {
  color: var(--textmeaningcolor);
  font-family: "Inter";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  width: 46rem;
  /* width: 100%; */
  height: 4rem;
  outline: none;
  border: 1px solid transparent;
  border-radius: 1rem;
  background: var(--inputbg);
  padding-left: 1.5rem;
}

input:focus {
  border: 1px solid var(--outlinecolor);
}

.search__icon {
  position: absolute;
  right: 0;
  margin-top: 1.5rem;
  margin-bottom: 1.53rem;
  margin-right: 1.53rem;
}

.error__msg {
  color: var(--FF5252, #ff5252);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-top: 0.5rem;
}

.header {
  max-width: 46.0625rem;
  width: 100%;
  margin-inline: auto;
  padding: 2.81rem;
  display: flex;
  align-items: center;
  gap: 32rem;
  justify-content: center;
}

.header__words {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.input__word {
  color: var(--textmeaningcolor);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 4rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.sound {
  color: var(--A445ED, #a445ed);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.play__sound {
  display: flex;
  justify-content: center;
  border-radius: 50%;
  padding: 2rem;
  background-color: var(--playbtnbg);
}

.meaning__heading {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 46rem;
  width: 100%;
  margin-inline: auto;
}

.meaning__heading p {
  color: var(--textmeaningcolor);
  font-family: "Inter";
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 700;
  line-height: normal;
}

.meaning__section {
  max-width: 46rem;
  width: 100%;
  margin-inline: auto;
}

.meaning__section p {
  color: #757575;
  font-feature-settings: "liga" off, "clig" off;

  /* Heading S - Sans */
  font-family: "Inter";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-bottom: 1.56rem;
}

ul li::marker {
  color: #8f19e8;
}

.meaning__section ul li {
  margin-bottom: 0.81rem;
  color: var(--meaninglists);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5rem;
  margin-left: 2rem;
}

.synonymn__section {
  display: flex;
  align-items: center;
  gap: 1.38rem;
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-top: 4rem;
  margin-bottom: 2.5rem;
}

.synonymn__section p:nth-child(2) {
  font-weight: 700;
  color: var(--A445ED, #a445ed);
}

.synonymn span:hover {
  cursor: pointer;
  text-decoration: underline;
}

.meaning__section .meaning {
  color: var(--meaningcolor);
}

p.sentence {
  color: var(--togglemodebg);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5rem;
}

.verb__meaning ul li {
  color: var(--inputwordcolor);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Inter";
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5rem;
  margin-left: 2rem;
}

.verb__meaning {
  border-bottom: 1px solid #e9e9e9;
  padding-bottom: 2.5rem;
  margin-bottom: 1.9rem;
}

.source {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding-bottom: 7.75rem;
  max-width: 46rem;
  width: 100%;
  margin-inline: auto;
  color: #2d2d2d;
  padding-top: 2rem;
  border-top: 0.0625rem solid #e9e9e9;
}

.source p {
  color: var(textmeaningcolor);
}

.source p:nth-child(1) {
  color: #757575;
}

a {
  color: var(--textmeaningcolor);
  text-decoration: none;
}

/* HOVER STATES */
.toggle__btn:hover,
.selected__font:hover,
.synonymn__section p:nth-child(2),
input:hover,
.play__sound:hover {
  cursor: pointer;
}

.hide__options,
.hide__error__msg {
  display: none;
  opacity: 0;
  transition: 0.2s linear;
}

.loader {
  display: none;
  margin-top: 3rem;
  border: 16px solid #a445ed3e; /* Light grey */
  border-top: 16px solid #a445ed; /* Blue */
  border-radius: 50%;
  width: 90px;
  height: 90px;
  animation: spin 2s linear infinite;
}

.error__page {
  display: none;
  font-family: "Inter";
  max-width: 46rem;
  width: 100%;
  height: 12.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 8.25rem;
}

.err__emoji {
  font-size: 4rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  padding-bottom: 2.75rem;
}

.err__heading {
  color: var(--meaninglists);
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  padding-bottom: 1.5rem;
}

.err__message {
  color: #757575;
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 760px) {
  header {
    max-width: 23.4375rem;
    width: 100%;
    margin-inline: auto;
    gap: 6rem;
    margin-bottom: 0;
  }

  .input__section {
    max-width: 20.4375rem;
    margin-inline: auto;
    margin-top: 1.75rem;
  }

  .input__section input {
    font-size: 1rem;
    width: 26rem;
  }

  .header {
    padding-top: 1.5rem;
    padding-bottom: 0;
    gap: 16rem;
  }

  input {
    padding-block: 0.87rem;
  }

  .input__word {
    font-size: 2rem;
  }

  .sound {
    font-size: 1.125rem;
  }

  .play__sound {
    padding: 1rem;
  }

  .play__img {
    width: 0.8rem;
    height: 0.8rem;
  }

  .meaning__heading {
    max-width: 23.4375rem;
    width: 100%;
  }

  .meaning__heading {
    gap: 1rem;
    padding-top: 1.81rem;
    margin-bottom: 1.94rem;
  }

  .meaning__heading img {
    width: 20rem;
  }

  .meaning__section {
    max-width: 23.4375rem;
    width: 100%;
  }

  .meaning__section ul li {
    font-size: 0.9375rem;
  }

  .meaning__section .meaning {
    font-size: 1rem;
    margin-top: -0.8rem;
    padding-bottom: 0;
    margin-bottom: 1.06rem;
  }

  .synonymn__section {
    margin-top: 0;
    padding-top: 0.6rem;
    margin-bottom: 0;
  }

  .verb {
    margin-top: 0;
    padding-top: 0;
  }

  .verb__meaning {
    padding-bottom: 0;
  }

  p.sentence {
    font-size: 0.9375rem;
  }

  .synonymn__section p {
    font-size: 1rem;
  }

  .source {
    max-width: 23.1375rem;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.5rem;
  }

  .source p:nth-child(1),
  .source p:nth-child(2) a {
    color: #2d2d2d;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
  }

  .source p:nth-child(2) a {
    text-decoration: none;
  }
}

@media screen and (max-width: 430px) {
  body {
    overflow-x: hidden;
  }

  header {
    gap: 1rem;
  }

  .input__section input {
    width: 22.5rem;
  }

  .header {
    /* gap: 9rem; */
  }

  .meaning__section,
  .meaning__heading {
    padding-inline: 1rem;
  }

  .error__msg {
    margin-left: 0;
    /* margin-right: 29.5rem; */
  }
}
