/* 视频号授权中心 - 清爽浅色主题 */

:root {
  --bg: #f4fafb;
  --surface: #ffffff;
  --surface-soft: #f7fbfc;
  --surface-tint: #eff8f9;
  --border: #e6eff3;
  --border-strong: #d3e2e9;
  --text: #16323e;
  --text-soft: #46687a;
  --text-dim: #7b95a4;
  --primary: #12b886;
  --primary-deep: #0b9770;
  --primary-2: #23bcd4;
  --mint: #d9f6ec;
  --sky: #dcf0fa;
  --danger: #e11d48;
  --warning: #c2740a;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 44px -30px rgba(22, 74, 92, 0.42);
  --shadow-soft: 0 2px 10px -4px rgba(22, 74, 92, 0.14);
}

* { box-sizing: border-box; }

/* 防止自定义 display 规则覆盖 hidden 属性 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 620px at 6% -10%, #d8f5ec 0%, rgba(216, 245, 236, 0) 62%),
    radial-gradient(880px 640px at 100% -6%, #dceffb 0%, rgba(220, 239, 251, 0) 58%),
    linear-gradient(180deg, #fafdfe 0%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; }
.orb-a { width: 380px; height: 380px; background: #c9f2e4; top: -140px; left: -100px; }
.orb-b { width: 320px; height: 320px; background: #d3ebfa; top: 90px; right: -130px; }
.orb-c { width: 280px; height: 280px; background: #e8e5fb; bottom: -150px; left: 38%; opacity: 0.4; }

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px;
  background: linear-gradient(135deg, #35d0a4, var(--primary-2));
  color: #ffffff;
  box-shadow: 0 10px 22px -12px rgba(18, 184, 134, 0.85);
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.32; }
.brand-text strong { font-size: 16px; letter-spacing: 0.2px; color: var(--text); }
.brand-text small { color: var(--text-dim); font-size: 12px; }

.shell {
  position: relative; z-index: 1;
  flex: 1;
  width: min(880px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4.5vw, 46px) clamp(16px, 4vw, 24px) 36px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: 18px;
}

.hero { text-align: center; margin-bottom: 24px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(23px, 4.2vw, 32px); letter-spacing: -0.4px; color: var(--text); }
.hero p { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.85; }

.steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.step-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-soft);
  border: 1px solid #dcecf2; border-radius: 999px; padding: 7px 14px;
  background: rgba(255, 255, 255, 0.86);
}
.step-chip b {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px;
  background: var(--mint); color: var(--primary-deep);
}

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 22px;
  background: #fffaf0;
  border: 1px solid #fbe3b6;
  color: #8a5a08; font-size: 13px; line-height: 1.7;
}
.notice span:first-child { font-weight: 700; flex: none; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.field label .hint { font-weight: 400; color: var(--text-dim); font-size: 12px; margin-left: 6px; }

.input, .select {
  width: 100%; padding: 14px 16px; font-size: 15px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  outline: none; transition: 0.18s ease;
  font-family: inherit;
}
.input::placeholder { color: #a8bcc7; }
.input:hover, .select:hover { border-color: #bcd4de; }
.input:focus, .select:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(18, 184, 134, 0.13);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

.fixed-note { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 22px; }
@media (max-width: 620px) { .fixed-note { grid-template-columns: 1fr; } }
.fixed-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--surface-tint);
  border: 1px solid #e0eff2;
}
.fixed-item .k { color: var(--text-dim); font-size: 13px; }
.fixed-item .v { font-size: 14px; font-weight: 700; color: var(--primary-deep); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 14px; padding: 14px 22px; font-size: 15px;
  transition: 0.18s ease; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #35d0a4, var(--primary-2));
  color: #ffffff;
  box-shadow: 0 14px 26px -16px rgba(18, 184, 134, 0.95);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -16px rgba(18, 184, 134, 1); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: #ffffff; color: var(--text-soft);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.btn-ghost:hover { background: var(--surface-tint); color: var(--text); border-color: #bcd4de; }
.btn-ghost:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 11px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 150px; }

/* 授权查询结果 */

.check-banner {
  display: flex; gap: 14px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 20px;
}
.check-banner.ok { background: #ecfdf6; border: 1px solid #a9ecd2; }
.check-banner.warn { background: #fffaf0; border: 1px solid #fbe3b6; }
.check-banner .cb-icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.check-banner.ok .cb-icon { background: #c9f5e2; color: #067a5c; }
.check-banner.warn .cb-icon { background: #fdeecb; color: #a3660a; }
.check-banner .cb-body { min-width: 0; }
.check-banner .cb-body strong { display: block; font-size: 15px; margin-bottom: 6px; }
.check-banner.ok .cb-body strong { color: #067a5c; }
.check-banner.warn .cb-body strong { color: #a3660a; }
.check-banner .cb-body p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text-soft); }

.check-groups { display: grid; gap: 14px; margin-bottom: 18px; }
.check-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-soft);
}
.cg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  background: var(--surface-tint);
  border-bottom: 1px solid #e4f0f3;
  flex-wrap: wrap;
}
.cg-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.cg-count { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.cg-items { padding: 10px; display: grid; gap: 8px; }
.check-item {
  padding: 12px 14px; border-radius: 12px;
  background: #ffffff; border: 1px solid var(--border);
}
.check-item .ci-main { min-width: 0; }
.check-item .ci-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 7px; }
.check-item .ci-sub { font-size: 12px; color: var(--text-dim); line-height: 1.75; word-break: break-all; }
.check-item .ci-msg { color: #a3660a; }
.mono-line { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.check-hint { font-size: 12.5px; color: var(--text-dim); line-height: 1.75; margin-bottom: 16px; }

/* 授权结果页 */

.result { text-align: center; }
.qr-frame {
  width: 236px; height: 236px; margin: 4px auto 18px;
  background: #ffffff; border-radius: var(--radius);
  padding: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  box-shadow: 0 20px 42px -26px rgba(22, 74, 92, 0.5);
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.qr-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 0 10px; line-height: 1.75; }

.result h2 { margin: 0 0 8px; font-size: 21px; color: var(--text); }
.result .sub { color: var(--text-soft); font-size: 13.5px; line-height: 1.85; margin: 0 0 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  white-space: nowrap;
}
.badge.success { background: #ddfaee; color: #067a5c; border: 1px solid #a9ecd2; }
.badge.warning { background: #fdeecb; color: #a3660a; border: 1px solid #f8dc9d; }
.badge.danger  { background: #ffe4e9; color: #b3123a; border: 1px solid #fdc9d4; }
.badge.muted   { background: #eef3f6; color: #5c7a89; border: 1px solid #dde8ed; }
.badge.info    { background: #e2f2fc; color: #10708f; border: 1px solid #bde3f5; }

.meta { display: grid; gap: 10px; margin: 20px 0 22px; text-align: left; }
.meta-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 15px; border-radius: 12px;
  background: var(--surface-tint); border: 1px solid #e4f0f3;
  font-size: 13.5px;
}
.meta-row span:first-child { color: var(--text-dim); flex: none; }
.meta-row span:last-child { text-align: right; word-break: break-all; color: var(--text); }
.meta-row code { font-size: 12.5px; color: var(--primary-deep); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.countdown { font-variant-numeric: tabular-nums; color: var(--warning); font-weight: 700; }

.empty { text-align: center; padding: 52px 20px; color: var(--text-dim); }
.empty .big { font-size: 40px; margin-bottom: 12px; opacity: 0.45; }

.loading { text-align: center; padding: 40px; color: var(--text-dim); }
.spinner {
  width: 30px; height: 30px; margin: 0 auto 12px;
  border: 3px solid #e2eef3; border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  position: relative; z-index: 1;
  text-align: center; padding: 20px; color: #93aab6; font-size: 12.5px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 22px);
  background: #16323e; color: #ffffff;
  padding: 12px 20px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: 0.25s ease; z-index: 99;
  max-width: min(90vw, 460px); text-align: center;
  box-shadow: 0 20px 40px -20px rgba(22, 50, 62, 0.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b3123a; }

.sandbox-flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #a3660a;
  background: #fdeecb; border: 1px solid #f8dc9d;
  padding: 4px 10px; border-radius: 999px; margin-left: 8px;
}
