* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  color: #172033;
}

.container {
  width: min(900px, 92%);
  margin: 35px auto;
}

.card {
  background: #fff;
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .12);
}

.badge {
  display: inline-block;
  background: #fff3bf;
  color: #7c5d00;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 14px 0 6px;
  font-size: 36px;
}

.subtitle {
  margin: 0 0 24px;
  color: #64748b;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
}

input, textarea, select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 13px;
  font: inherit;
  outline: none;
  background: #fff;
}

input:focus, textarea:focus, select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.help {
  color: #64748b;
  font-size: 12px;
  margin: 7px 0 0;
}

.help a {
  color: #4f46e5;
  font-weight: 700;
}

#prompt {
  resize: vertical;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

#generate {
  width: 100%;
  margin-top: 22px;
  background: #4f46e5;
  color: #fff;
}

#generate:disabled {
  opacity: .65;
  cursor: wait;
}

.result {
  margin-top: 28px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-head h2 {
  margin: 0;
  font-size: 20px;
}

.secondary {
  padding: 9px 14px;
  background: #e2e8f0;
  color: #172033;
}

#output {
  margin-top: 10px;
  resize: vertical;
  line-height: 1.6;
}

.status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 13px;
}

.note {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .container {
    width: 94%;
    margin: 18px auto;
  }

  .card {
    padding: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
