:root {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d1d1f;
  background-color: #f5f6fa;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f4f4fb 0%, #e6f5ff 100%);
  min-height: 100vh;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.tagline {
  color: #5f6778;
  max-width: 640px;
  margin: 0 auto;
}

form {
  background: #fff;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font: inherit;
  background: #fbfcfe;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus,
input[type="text"]:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

input[type="file"] {
  width: 100%;
  background: transparent;
  padding: 0.4rem 0;
}

.helper-text {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.actions {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  font-size: 1rem;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.status {
  font-size: 0.95rem;
  color: #475467;
}

#result-card {
  margin-top: 2rem;
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  display: none;
}

#result-card pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
}

#error-banner {
  margin-top: 1.5rem;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 12px;
  padding: 1rem;
  display: none;
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.9rem;
  }

  form {
    padding: 1.5rem;
  }
}
