* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #f5f5f5;
}

main {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 1rem;
  height: 100%;
  padding: 1rem;
}

main textarea {
  resize: vertical;
  border: none;
  outline: none;
  font-size: 1.5rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-width: 100%;
  height: 100%;
}

main textarea:focus {
  border: 1px solid #000;
}

main #result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

main #result .actions {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

main #result button {
  padding: 1rem;
  height: 10vh;
  width: 20vh;
  border: none;
  outline: none;
  border-radius: 8px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

main #result button:hover {
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

main #result button#convert {
  background-color: #000;
  color: #fff;
  transition: transform 0.3s;
}

main #result button#convert:hover {
  background-color: #353535;
  color: #fff;
  transform: scale(1.07);
}

main #result button#copy {
  background-color: #fff;
  height: 10vh;
  width: 20vh;
  color: #000;
  border: 1px solid #ccc;
  transition: transform 0.3s;
}

main #result button#copy:hover {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
  transform: scale(1.07);
}

main .output {
  width: 100%;
  border-radius: 8px;
}

main .output pre {
  font-size: 1.5rem;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  max-width: 100%;
}

main .output pre code {
  font-family: "Roboto Mono", monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.rotate-img {
  animation: spin 1s linear;
}

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

@media (max-width: 768px) {
  main {
    grid-template-columns: 100%;
    gap: 2rem;
  }
}
