:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #f8fafc;
  --text-color: #334155;
  --border-color: #e2e8f0;
  --error-color: #ef4444;
  --success-color: #10b981;
  --primary-dark: #1d4ed8;
}

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

body {
  background-color: #f1f5f9;
  color: var(--text-color);
  line-height: 1.6;
}
#exportPdfBtn, #generateKeywordsBtn {
  margin: 10px;
  padding: 10px 20px;
  display: inline-block;
}

.container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
}

.form-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-top: 20px;
}

.header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.logo {
  width: 90px;
  height: 90px;
  /* background-color: var(--primary-color);
   */
  background: linear-gradient(to right, #e94963, #ed7951, #f29c42);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: white;
  font-weight: bold;
  font-size: 24px;
}
.logo img {
  width: 90px;
}

.title {
  flex: 1;
}

.title h1 {
  color: #1e293b;
  font-size: 24px;
  margin-bottom: 5px;
}

.title p {
  color: #64748b;
  font-size: 16px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #334155;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-color);
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-group {
  margin-top: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--primary-hover);
}

.btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.btn-secondary {
  background-color: white;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
}

.required::after {
  content: " *";
  color: var(--error-color);
}

.help-text {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

#result {
  white-space: pre-wrap;
  font-family: monospace;
  min-height: 100px;
  unicode-bidi: embed;
}

#loading {
  display: none;
  text-align: center;
  margin-top: 20px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.form-row .form-group {
  flex: 1;
  min-width: 200px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn,
.btn-export {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background: linear-gradient(to right, #e94963, #ed7951, #f29c42);
  color: white;
}

.btn:hover,
.btn-export:hover {
  background-color: #1d4ed8;
}

#exportBtn {
  display: none;
}

/* Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
    margin: 20px auto;
  }

  .form-container {
    padding: 20px;
  }

  .header {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 14px;
}

.footer p {
  margin: 0;
}
.footer a {
  text-decoration: none;
  color: var(--text-color);
}

/* Mobile */
@media (max-width: 768px) {
  .footer {
    font-size: 12px;
    padding: 15px 0;
  }
  .back-to-top-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }
}
