:root {
  --cream: #F5F0E6;
  --paper: #FFFFFF;
  --coffee: #5C4A36;
  --ink: #2C2416;
  --muted: #8A7560;
  --line: #E8E2D6;
  --accent: #C26A6A;
  --accent-soft: #FBEDED;
  --ok: #3E7A52;
  --ok-soft: #EAF4EE;
  --warn: #B5732E;
}

* { box-sizing: border-box; }

body {
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  line-height: 1.6;
}

.screen { width: 100%; max-width: 440px; }

/* 验证卡片：更精致的层次与质感 */
.card {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFAF6 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 26px 26px;
  box-shadow: 0 12px 34px rgba(44, 36, 22, 0.09);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
  font-weight: 600;
}

.title {
  font-family: "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.7;
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin: 22px 0 8px;
  font-weight: 500;
}

.input-row {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.65;
  pointer-events: none;
}

.code-input {
  flex: 1;
  height: 52px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 14px 0 44px;
  font-size: 17px;
  letter-spacing: 2px;
  font-family: "Outfit", "Noto Sans SC", monospace;
  color: var(--ink);
  background: #FAF8F5;
  text-transform: uppercase;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.code-input::placeholder { color: #BCB1A0; letter-spacing: 1px; text-transform: none; }
.code-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.code-input.error {
  border-color: #DC2626;
  background: #FDECEC;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}
.code-input.ok {
  border-color: var(--ok);
  background: var(--ok-soft);
  box-shadow: 0 0 0 4px rgba(62, 122, 82, 0.14);
}

.btn-ghost {
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: var(--cream); border-color: #D8CFBE; }

.btn-primary {
  width: 100%;
  height: 52px;
  margin-top: 16px;
  border: none;
  border-radius: 26px;
  background: linear-gradient(180deg, #4F83F1 0%, var(--accent) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.30);
  transition: transform 0.06s, box-shadow 0.18s, opacity 0.18s;
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38); }
.btn-primary:active { transform: translateY(1px) scale(0.992); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

.msg {
  min-height: 20px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg.error { color: #DC2626; }
.msg.error::before { content: "\26A0"; }
.msg.rate  { color: var(--warn); }
.msg.ok    { color: var(--ok); }
.msg.ok::before { content: "\2713"; }

.hint {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.hint summary { cursor: pointer; color: var(--ink); }
.hint p { margin-top: 8px; line-height: 1.7; }

.success { text-align: center; }
.success .check {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-soft); color: var(--ok);
  font-size: 34px; line-height: 64px;
}
.hidden { display: none; }

/* 管理页样式 */
.admin-wrap { max-width: 460px; }
.admin-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.admin-form input {
  height: 44px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; font-size: 14px; background: #FAF8F5;
}
.admin-form input:focus { outline: none; border-color: var(--accent); }
.result-box {
  margin-top: 16px; padding: 14px; border-radius: 10px;
  background: var(--ok-soft); color: var(--ok); font-size: 14px;
  word-break: break-all; white-space: pre-wrap;
}
.result-box code { font-family: monospace; font-size: 16px; font-weight: 700; }
