:root {
  --primary-color: #1e1e1e;
  --secondary-color: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-size: 1.2rem;
  line-height: 1.5;
}

.notepad {
  width: 100%;
  height: 100vh;
  padding: 1rem;
  overflow: hidden;
}

.notepad__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  height: 10%;
}

.notepad__header__title {
  font-size: 0.9rem;
  font-weight: 100;
}

/* animated line under h1 */
.notepad__header__title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
  margin-top: 0.5rem;
}

.notepad__header__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.notepad__header__buttons__button {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.notepad__header__buttons__button {
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.notepad__header__buttons__search {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  outline: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.notepad__body {
  height: calc(85% - 1rem);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.notepad__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 5%;
  border-top: 1px solid var(--secondary-color);
}

.notepad__footer p {
  font-size: 0.8rem;
  font-weight: 100;
  text-align: center;
  margin-top: 0.5rem;
}

.notepad__footer p a {
  text-decoration: none;
  color: var(--secondary-color);
}

.notepad__body__textarea {
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 0.5rem;
  outline: none;
  resize: none;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 10px;
  font-family: "Courier New", Courier, monospace;
}

.notepad__body__textarea::-webkit-scrollbar {
  width: 0.5rem;
  background-color: var(--primary-color);
}

/* make interactive textarea */

.notepad__body__textarea::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  /* give border radius */
  border-radius: 0.5rem;
}

.notepad__body__textarea:focus {
  border: 1px solid var(--secondary-color);
}

.notepad__body__textarea:focus::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  /* give border radius */
  border-radius: 0.5rem;
}

@media screen and (max-width: 768px) {
  .notepad__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .notepad__header__buttons {
    margin-top: 1rem;
  }

  .notepad__header__buttons__button {
    margin-right: 0.5rem;
  }

  .notepad__body__textarea {
    font-size: 0.8rem;
  }

  .notepad__header__title {
    font-size: 0.8rem;
  }

  .notepad__header__buttons__button {
    font-size: 0.8rem;
  }

  .notepad__header__buttons__button {
    padding: 0.3rem 0.5rem;
  }

  .notepad__header {
    height: 15%;
  }

  .notepad__body {
    height: 80%;
  }

  .notepad__footer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5%;
  }

  .notepad__header__title {
    margin-bottom: 0;
  }

  .notepad__footer p {
    font-size: 0.6rem;
  }

  .notepad__footer p a {
    font-size: 0.6rem;
  }

  .notepad__header__buttons__word-count {
    font-size: 0.6rem;
  }
}
