:root {
  --h1font: 300 3.75rem "Roboto", sans-serif;
  --h2font: 300 2.5rem "Roboto", sans-serif;
  --h3font: 300 1.875rem "Roboto", sans-serif;
  --textfont: 300 1.125rem "Roboto", sans-serif;
  --transition: all 0.3s ease-in-out;
  --transitionslow: all 1s ease-in-out;
  --textcolor: #000;
  --textareabg: #fff;
  --maingreen: #cce5cf;
  --mainblue: #1581bf;
  --background: linear-gradient(
    to bottom,
    #ffffff,
    #f5eefb,
    #f1daf2,
    #f3c6e3,
    #f6b1ce
  );
}
:root[data-theme="dark"] {
  --textcolor: #fff;
  --textareabg: rgb(72, 72, 72);
  --maingreen: #68766a;
  --mainblue: #0d547d;
  --background: linear-gradient(
    to bottom,
    #000000,
    #3a2c31,
    #745560,
    #b38194,
    #f6b1ce
  );
}
@media (max-width: 800px) {
  :root {
    --h1font: 300 2.6875rem "Roboto", sans-serif;
    --h2font: 300 2.25rem "Roboto", sans-serif;
    --h3font: 300 1.625rem "Roboto", sans-serif;
    --textfont: 300 1rem "Roboto", sans-serif;
  }
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100dvh;
  overscroll-behavior: none;
  background-image: var(--background);
  transition: var(--transition);
}
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  padding: 0;
}
p {
  margin: 0;
}
.text {
  font: var(--textfont);
}
.content {
  margin: 3rem 0;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
.content__mainheader {
  font: var(--h1font);
  color: var(--textcolor);
  transition: var(--transition);
}
.content__label {
  font: var(--textfont);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.content__switch {
  position: relative;
  height: 1.5rem;
  width: 3rem;
  cursor: pointer;
  appearance: none;
  border-radius: 0.75rem;
  background-color: rgba(100, 100, 100, 0.3);
  transition: var(--transition);
}
.content__switch:checked {
  background-color: var(--maingreen);
}
.content__switch::before {
  content: "";
  position: absolute;
  height: 1.6rem;
  width: 1.6rem;
  left: calc(1.5rem - 1.6rem);
  top: calc(1.5rem - 1.55rem);
  display: block;
  background-color: #fff;
  border-radius: 0.8rem;
  transition: var(--transition);
}
.content__switch:checked::before {
  transform: translateX(100%);
}
.app {
  border-radius: 2rem;
  padding: 2rem;
  background-color: var(--maingreen);
  width: 90%;
  max-width: 1440px;
  box-shadow: 0 5px 5px #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: var(--transition);
}
.app__form {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.app__textarea {
  width: 100%;
  height: 480px;
  resize: none;
  outline: none;
  border: solid 1px #000;
  border-radius: 0.25rem;
  padding: 1rem;
  font: var(--textfont);
  color: var(--textcolor);
  background-color: var(--textareabg);
  transition: var(--transition);
}
.app__textarea--highlighted {
  border: solid 3px rgba(165, 10, 10, 0.5);
}
.app__controlbox {
  width: 100%;
  display: flex;
  gap: 1rem;
}
.app__button {
  padding: 0.5rem;
  width: 8rem;
  border: none;
  border-radius: 16px;
  color: #fff;
  background-color: var(--mainblue);
  cursor: pointer;
  font: var(--textfont);
  transition: var(--transition);
}
.app__button:active {
  scale: 0.95;
}
.app__btntext {
  transition: var(--transition);
}
.app__btntext--faded {
  opacity: 0;
}
.app__controlbox .text {
  margin-left: auto;
  align-self: center;
}
.content__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
#hotkeysHint {
  position: relative;
  cursor: pointer;
  text-decoration: underline;
}
#hotkeysHint:hover::before {
  opacity: 1;
  content: "Save: Ctrl + S Reload: Ctrl + G";
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 3rem;
  top: -5.5rem;
  left: -8rem;
  background-color: var(--mainblue);
  padding: 1rem;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 5px 5px #000;
}
.modal {
  width: 100vw;
  height: 100vh;
  display: none;
  background-color: #000;
  opacity: 0.9;
  position: fixed;
  left: 0;
  top: 0;
}
.modal--shown {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__container {
  width: 90%;
  max-width: 640px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.modal__minorcaption {
  color: #fff;
  font: var(--h3font);
}
.modal__text {
  color: #fff;
  font: var(--textfont);
}
.modal__button {
  padding: 0.5rem;
  width: 8rem;
  border: none;
  border-radius: 16px;
  background-color: #fff;
  cursor: pointer;
  font: var(--textfont);
  transition: var(--transition);
}
.modal__button:active {
  scale: 0.95;
}
.welcome {
  background-color: #000;
  opacity: 0.9;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  transition: var(--transitionslow);
}
.welcome--transparent {
  opacity: 0;
}
.welcome--shown {
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome__caption {
  color: #fff;
  opacity: 0;
  font: var(--h2font);
  text-align: center;
  padding: 1rem;
  transition: var(--transitionslow);
}
.welcome__caption--shown {
  opacity: 1;
}

@media (max-width: 800px) {
  .app {
    border-radius: 1.125rem;
    padding: 1.125rem;
  }
  .app__controlbox {
    flex-direction: column;
    align-items: center;
  }
  .app__button {
    padding: 0.375rem;
    width: 6rem;
  }
}
