:root {
  --bg-0: #070a0f;
  --bg-1: #0d1117;
  --card: #10151d;
  --card-border: #1c2430;
  --text: #e6edf6;
  --text-dim: #8b98a9;
  --text-faint: #5a6675;
  --brand: #1668dc;
  --brand-hover: #3c89e8;
  --brand-soft: rgba(22, 104, 220, 0.14);
  --accent: #62d4f9;
  --danger: #e5534b;
  --danger-soft: rgba(229, 83, 75, 0.12);
  --ok: #3fb950;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(22, 104, 220, 0.16), transparent 60%),
    radial-gradient(720px 520px at 88% 12%, rgba(98, 212, 249, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px 32px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 28px;
}

.brand img {
  height: 34px;
  width: auto;
}

.lock {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--brand-soft);
  border: 1px solid rgba(98, 212, 249, 0.25);
  box-shadow: 0 0 0 8px rgba(22, 104, 220, 0.05);
}

.lock svg { width: 28px; height: 28px; }

h1 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 22px 0 8px;
}

textarea,
select,
input[type="text"] {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-0);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

textarea:focus,
select:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

select { cursor: pointer; }

.reveal-box {
  position: relative;
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-0);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  max-height: 320px;
  overflow: auto;
  color: var(--text);
}

button {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}

button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; }

.btn-primary {
  width: 100%;
  color: #fff;
  background: var(--brand);
  margin-top: 24px;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); }

.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.field-row input[type="text"] { flex: 1; }
.field-row button { white-space: nowrap; padding: 0 16px; }

.result { margin-top: 4px; }

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  background: var(--brand-soft);
  border: 1px solid rgba(22, 104, 220, 0.2);
}
.note svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }

.note.warn {
  color: #f3c9c5;
  background: var(--danger-soft);
  border-color: rgba(229, 83, 75, 0.28);
}
.note.warn svg { color: var(--danger); }

.state { text-align: center; }
.state h1 { margin-top: 4px; }

.footer {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}
.footer strong { color: var(--text-dim); font-weight: 600; }

.hidden { display: none !important; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 8px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.copied-flash {
  color: var(--ok) !important;
  border-color: rgba(63, 185, 80, 0.4) !important;
}

@media (max-width: 520px) {
  .card { padding: 32px 22px 26px; }
  .field-row { flex-direction: column; }
}
