@font-face {
  font-family: "Signature Raleway";
  font-style: normal;
  font-weight: 400;
  src: url("fonts/Raleway-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Signature Raleway";
  font-style: normal;
  font-weight: 600;
  src: url("fonts/Raleway-SemiBold.ttf") format("truetype");
}

body {
  font-family: "Signature Raleway", Arial, sans-serif;
  font-weight: 600;
  font-style: normal;
  background: #f3f4f6;
  color: #484848;
  display: flex;
  justify-content: center;
  align-items: start;
  min-height: 100vh;
  padding: 40px;
  margin: 0;
}

.container {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 900px;
}

h1 {
  margin: 0 0 20px;
  text-align: center;
}

h2 {
  font-size: 1.17em;
  margin: 0 0 1em;
}

.content {
  display: flex;
  gap: 30px;
}

.form-area {
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-area input,
select {
  background: #fff;
  padding: 10px 5px;
  border-radius: 5px;
  border: 1px solid #a79073;
}

.form-area input:focus {
  outline: none;
  border: 1px solid #1f3177;
}

.preview-area {
  width: 60%;
}

#previewCanvas {
  width: 525px;
  max-width: 100%;
  height: auto;
  display: block;
}

button,
.btn-download {
  background: #1f3177;
  color: white;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 6px;
  display: inline-block;
  text-decoration: none;
  font-family: "Signature Raleway", Arial, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s ease;
}

button:hover,
.btn-download:hover {
  background: #121f53;
}

.hidden {
  display: none;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.mensagem-sucesso {
  font-size: 20px;
  color: #16a34a;
  margin-bottom: 15px;
  animation: pop 0.4s ease;
}

@keyframes pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.botoes-acao {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Loading spinner */
#loading {
  text-align: center;
  margin-top: 60px;
}

#resultado {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #1f3177;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  body {
    padding: 20px;
  }

  .container {
    width: 100%;
    box-sizing: border-box;
  }

  .content,
  .botoes-acao {
    flex-direction: column;
  }

  .form-area,
  .preview-area {
    width: 100%;
  }
}
