/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 背景 ── */
.page-bg {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f0f2f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* ── 卡片 ── */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 40px 40px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
}

/* ── 标题 ── */
.card-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}
.card-title .star {
  color: #f5a623;
  margin-right: 6px;
}

/* ── Notice 框 ── */
.notice-box {
  background: linear-gradient(135deg, #fffbf0, #fff8e6);
  border: 1px solid #fde8a8;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 22px;
}
.notice-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 4px;
}
.notice-line:last-child { margin-bottom: 0; }
.notice-line a {
  color: #e07b00;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.notice-line a:hover { color: #b85c00; text-decoration: underline; }
.notice-icon { font-size: 13px; flex-shrink: 0; }
.notice-divider {
  border-top: 1px dashed #fdc94a;
  margin: 8px 0;
}
.notice-query a { color: #2680eb; }
.notice-query a:hover { color: #1a5fb4; }

/* ── 表单字段 ── */
.field-group {
  margin-bottom: 16px;
}
.field-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 7px;
}
.label-icon { margin-right: 3px; }

.input-field {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 9px;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
.input-field::placeholder { color: #bbb; font-size: 13px; }
.input-field:focus {
  border-color: #4a90e2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
}

/* ── 备用安全码区 ── */
.backup-group {
  background: #f7f8fb;
  border: 1.5px solid #e8eaf0;
  border-radius: 12px;
  padding: 14px 16px 12px;
}
.backup-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}
.backup-star { color: #f5a623; margin-right: 4px; }
.or-divider {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  margin: 8px 0;
  position: relative;
}
.or-divider::before, .or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: #e8eaf0;
}
.or-divider::before { left: 0; }
.or-divider::after  { right: 0; }
.backup-help-link {
  margin-top: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.backup-help-link a { color: #f5a623; text-decoration: none; }
.backup-help-link a:hover { text-decoration: underline; }
.help-icon { color: #f5a623; }

/* ── 按钮区 ── */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn-primary, .btn-secondary {
  flex: 1;
  padding: 14px 0;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, #3a7ef5, #1a5fd4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(58, 126, 245, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(58, 126, 245, 0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: #6c757d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.25);
  font-size: 14px;
  max-width: 130px;
}
.btn-secondary:hover { background: #5a6268; transform: translateY(-1px); }
.btn-secondary:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── 结果框 ── */
.result-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  animation: fadeIn 0.3s ease;
}
.hidden { display: none; }
.result-success { background: #edfaf1; border: 1px solid #a3d9b5; color: #1a6b3a; }
.result-error   { background: #fff0f0; border: 1px solid #f5b8b8; color: #9b2020; }
.result-info    { background: #eef4ff; border: 1px solid #b3cdfa; color: #1e4a9b; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 响应式 ── */
@media (max-width: 540px) {
  .card { padding: 24px 20px 28px; }
  .btn-row { flex-direction: column; }
  .btn-secondary { max-width: 100%; }
}
