* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", sans-serif;
  background: #0f1115;
  color: #e6e8ee;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #171a21;
  border: 1px solid #262b36;
  border-radius: 16px;
  padding: 22px 20px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

h1 { font-size: 1.25rem; margin: 0 0 6px; }
.sub { margin: 0 0 18px; font-size: .85rem; color: #9aa3b2; }

label {
  display: block;
  font-size: .8rem;
  color: #9aa3b2;
  margin: 12px 0 6px;
}

input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: #e6e8ee;
  background: #0f1115;
  border: 1px solid #2c3240;
  border-radius: 10px;
  outline: none;
}
input:focus { border-color: #4f8cff; box-shadow: 0 0 0 3px rgba(79,140,255,.2); }

details.adv { margin-top: 14px; }
details.adv summary {
  cursor: pointer;
  font-size: .8rem;
  color: #7f8a9c;
  user-select: none;
}

button {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #4f8cff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
button:active { transform: translateY(1px); }

button.ghost {
  background: transparent;
  border: 1px solid #2c3240;
  color: #c6cdd9;
  font-weight: 500;
  font-size: .9rem;
}

.msg {
  margin-top: 12px;
  font-size: .85rem;
  min-height: 1.1em;
  color: #ff7b72;
  word-break: break-all;
}
.msg.ok { color: #5dd39e; }

.result {
  margin-top: 16px;
  padding: 14px;
  background: #0f1115;
  border: 1px solid #262b36;
  border-radius: 12px;
}
.result .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.result .row span { font-size: .8rem; color: #9aa3b2; }
.result code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .95rem;
  color: #e6e8ee;
  word-break: break-all;
  text-align: right;
}
.result code.big {
  font-size: 1.5rem;
  font-weight: 700;
  color: #5dd39e;
  letter-spacing: 2px;
}

.hidden { display: none; }