* {
  padding: 0;
  margin: 0;
}

body {
  background-color: whitesmoke;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid black;
  width: 600px;
  height: auto;
  padding: 3rem;
  gap: 2.5rem;
  border-radius: 1.5rem;
  background-color: white;
  margin-top: 7rem;
  margin-bottom: 5rem;
}

.para {
  display: flex;
  flex-direction: row;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: cornflowerblue;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form,
.text-inputs,
.buttons {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: center;
}

.theme-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.text {
  font-size: 1.25rem;
}

.checkbox {
  width: 1.25rem;
  height: 1.25rem;
}

.meme-preview {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
  text-align: center;
}

.meme-preview img {
  width: 100%;
  display: block;
}

.meme-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 2px 2px 5px black;
  width: 90%;
  word-wrap: break-word;
}

.meme-text.top-text {
  top: 10px;
}

.meme-text.bottom-text {
  bottom: 10px;
}

.input {
  font-family: "Montserrat", sans-serif;
  height: 45px;
  padding-left: .5rem;
  box-shadow: 0 0 0 1.5px #2b2c37, 0 0 25px -17px #000;
  border: 0;
  border-radius: 12px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: text;
  z-index: 0;
}

.input::placeholder {
  color: #bdbecb;
}

.input:hover {
  box-shadow: 0 0 0 2.5px #2f303d, 0px 0px 25px -15px #000;
}

.input:active {
  transform: scale(0.95);
}

.input:focus {
  box-shadow: 0 0 0 2.5px #2f303d;
}

button {
  position: relative;
  display: inline-block;
  padding: 15px 30px;
  text-align: center;
  font-size: 18px;
  letter-spacing: 1px;
  text-decoration: none;
  color: #725AC1;
  background: transparent;
  cursor: pointer;
  transition: ease-out 0.5s;
  border: 2px solid #725AC1;
  border-radius: 10px;
  box-shadow: inset 0 0 0 0 #725AC1;
}

button:hover {
  color: white;
  box-shadow: inset 0 -100px 0 0 #725AC1;
}

button:active {
  transform: scale(0.9);
}

.dark-mode {
  background-color: black;
  color: white;
}

.light-mode {
  background-color: whitesmoke;
  color: black;
}

@media screen and (max-width: 1024px) {
  .section {
    width: 650px;
    padding: 2.5rem;
  }
}

@media screen and (max-width: 768px) {
  .section {
    width: 400px;
    padding: 2rem 1rem;
  }

  .para {
    font-size: 2rem;
  }

  .meme-preview {
    width: 80%;
  }

  .form,
  .text-inputs,
  .buttons {
    flex-direction: column;
  }

  .text {
    font-size: 1.1rem;
  }

  .checkbox {
    width: 1.1rem;
    height: 1.1rem;
  }

  .meme-text {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 468px) {
  .section {
    width: 260px;
    padding: 2rem 0.75rem;
  }

  .para {
    font-size: 1.5rem;
  }

  button {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .input {
    width: 150px;
    height: 40px;
  }

  .text {
    font-size: 1rem;
  }

  .checkbox {
    width: 1rem;
    height: 1rem;
  }

  .meme-text {
    font-size: 1rem;
  }
}