:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --error-bg: #7f1d1d;
  --success-bg: #14532d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

h1 { margin: 0 0 8px; font-size: 1.5rem; }

.subtitle { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

label { font-weight: 600; font-size: 0.9rem; margin-top: 8px; }

.optional { color: var(--muted); font-weight: 400; }

textarea, input, select {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
}

textarea:focus, input:focus, select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

button {
  margin-top: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.status.success { background: var(--success-bg); }
.status.error { background: var(--error-bg); }

.secret-output {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
}

#passphrase-row { margin-top: 8px; }

footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  max-width: 520px;
}
