:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #ffffff;
  --surface: #f9fafb;
  --border: #e5e7eb;
  --text: #111827;
  --text-light: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.app-container {
  width: 100%;
  max-width: 500px;
}

header {
  margin-bottom: 32px;
  text-align: center;
}

h1 {
  font-size: 24px;
  margin: 0 0 4px 0;
  font-weight: 700;
}

.desc {
  font-size: 14px;
  color: var(--text-light);
}

.section {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-light);
}

textarea, input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: var(--surface);
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

textarea:focus, input:focus {
  outline: 2px solid var(--primary);
  background: #fff;
}

.key-row {
  display: flex;
  gap: 8px;
}

.button-group {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

button {
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  transition: all 0.1s;
}

button:active { transform: scale(0.98); }

.btn-main {
  background: var(--primary);
  color: white;
  border: none;
}

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

.utility-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  padding: 4px 8px;
  text-decoration: underline;
}

.status {
  margin-top: 24px;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  background: var(--surface);
  color: var(--text-light);
}

footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}
