:root {
  --teal: #0F766E;
  --teal-dark: #0c5e58;
  --amber: #F59E0B;
  --amber-dark: #B45309;
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --text: #1A1D1F;
  --muted: #6B7280;
  --green: #16A34A;
  --red: #DC2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Sarasa Gothic SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
.btn {
  border: 0; border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 600;
  background: var(--teal); color: #fff; transition: opacity .15s;
}
.btn:hover { opacity: .9; }
.btn.ghost { background: #fff; color: var(--teal); border: 1px solid var(--teal); }
.btn.amber { background: var(--amber); color: #fff; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, .file {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--text);
}
.label { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: block; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 32px; width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; color: var(--teal); }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

/* 后台布局 */
.admin { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-head .brand { font-size: 18px; font-weight: 700; color: var(--teal); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
.share-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.share-item:last-child { border-bottom: 0; }
.share-name { font-weight: 600; }
.share-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat { display: inline-block; background: var(--bg); border-radius: 8px; padding: 2px 8px; font-size: 12px; margin-right: 6px; color: var(--muted); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.badge.on { background: #DCFCE7; color: var(--green); }
.badge.off { background: #FEE2E2; color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1A1D1F; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* 用户端（移动端） */
.user { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.statusbar { height: 44px; }
.user-content { flex: 1; padding: 24px 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.brand-sm { color: var(--teal); font-weight: 600; font-size: 13px; }
.title { font-size: 22px; font-weight: 700; }
.subtitle { color: var(--muted); font-size: 14px; line-height: 1.6; }
.upload-zone {
  width: 100%; border: 1.5px dashed var(--teal); border-radius: 16px; background: #fff;
  padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer;
}
.upload-zone.filled { border-style: solid; }
.upload-zone .ic { width: 44px; height: 44px; color: var(--teal); }
.upload-zone .t { font-weight: 500; }
.upload-zone .h { font-size: 12px; color: var(--muted); }
.preview { max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--border); }
.hint-pc { width: 100%; background: #FFF7ED; border: 1px solid #FED7AA; color: var(--amber-dark); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.7; text-align: left; }
.example { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-align: left; }
.example .et { color: var(--teal); font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.example div { font-size: 13px; color: #374151; line-height: 1.7; }
/* 结果页：圆形居中在标题正上方，按钮下移留出呼吸感 */
.circle { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 12px; }
.circle.ok { background: var(--green); }
.circle.no { background: var(--amber); }
.circle svg { width: 48px; height: 48px; color: #fff; }
#view-result { display: flex; flex-direction: column; align-items: center; gap: 0; }
#view-result .circle { margin-top: 8px; margin-bottom: 18px; }
#view-result .title { margin: 0 0 10px; }
#view-result .subtitle { margin: 0 0 26px; max-width: 300px; line-height: 1.8; word-break: break-word; overflow-wrap: break-word; white-space: normal; }
#view-result #downloadBtn { margin: 0 0 14px; }
#view-result #forwardBtn { margin: 0 0 14px; }
#view-result .hint-pc { margin: 4px 0 16px; }
#view-result #retryBtn { margin-top: 4px; }
.user .footer { padding: 16px; text-align: center; color: #9CA3AF; font-size: 12px; }
.hidden { display: none !important; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 审核中：slogan + 雨点叠加（节目话题/嘉宾） */
#view-loading { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* 节流提示视图：扫码即看到，倒计时归零后自动跳上传 */
#view-throttled { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; padding-top: 8vh; }
.throttle-icon { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #FFF7ED; border: 2px solid #FED7AA; margin-bottom: 22px; }
.throttle-icon svg { width: 48px; height: 48px; color: var(--amber); }
.throttle-icon { animation: throttle-pulse 1.4s ease-in-out infinite; }
@keyframes throttle-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.throttle-cd { display: inline-block; color: var(--amber-dark); font-weight: 700; font-size: 18px; padding: 2px 8px; background: #FEF3C7; border-radius: 6px; font-variant-numeric: tabular-nums; }
.throttle-share { margin-top: 18px; font-size: 13px; color: var(--muted); }
.loading-slogan { font-size: 15px; font-weight: 700; color: var(--teal); text-align: center; line-height: 1.7; padding: 4px 6px 10px; }
.loading-status { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 8px; }
.rainbox { position: relative; width: 100%; height: 46vh; min-height: 300px; overflow: hidden; margin-top: 6px; }
.rain-item {
  position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%);
  white-space: nowrap; padding: 7px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 4px 14px rgba(15,118,110,.08);
  font-size: 13px; color: #374151; opacity: 0;
  animation: rain-rise linear forwards;
}
.rain-item.guest { background: #ECFDF5; border-color: #A7F3D0; color: var(--green); }
.rain-item .tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--teal); background: #E6F4F2; border-radius: 6px; padding: 1px 7px; margin-right: 7px; vertical-align: 1px; }
.rain-item.guest .tag { color: var(--green); background: #D1FAE5; }
@keyframes rain-rise {
  0% { transform: translateX(-50%) translateY(0); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateX(-50%) translateY(calc(-46vh - 60px)); opacity: 0; }
}

/* 海报预览弹窗（后台） */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(15,29,31,.45); }
.modal-box { position: relative; width: min(440px, 92vw); max-height: 92vh; background: #fff; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.poster-frame { width: 100%; height: 78vh; border: 0; background: #eef1f4; }

/* 必填标识（后台新建分享） */
.req { color: #e02424; font-weight: 600; }
.field-req { position: relative; }
.field-req::before {
  content: '*';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #e02424;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.field-req .input { padding-left: 26px; border-color: #e02424; }
.field-req .input:focus { border-color: #e02424; box-shadow: 0 0 0 3px rgba(224,36,36,.12); }
