:root {
  --bg: #f4f8ff;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --accent-strong: #1d4ed8;
  --success: #0f9d68;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
}

.page-shell {
  min-height: 100vh;
  padding: 32px 16px;
  display: grid;
  place-items: center;
}

.card {
  width: min(620px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 16px 50px rgba(37, 99, 235, 0.10);
}

.hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.hero-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--text);
  background: #fcfdff;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

button {
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}

button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.message {
  min-height: 24px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--danger);
}

.result-panel {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #fcfdff;
}

.result-panel.hidden {
  display: none;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-header h2 {
  margin: 0;
  font-size: 18px;
}

#copyBtn {
  padding: 8px 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  resize: vertical;
  font-family: Consolas, monospace;
}

@media (max-width: 620px) {
  .card { padding: 24px; }
  h1 { font-size: 24px; }
}
