:root {
  --navy: #0b2a5b;
  --blue: #1668dc;
  --cyan: #22b8cf;
  --ink: #16213a;
  --muted: #6b7690;
  --line: #e3e8f2;
  --bg: #eef2f9;
  --card: #ffffff;
  --danger: #d4380d;
  --ok: #0f9d58;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(16, 42, 91, .12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 50% -220px, #dbe7ff 0%, transparent 70%),
    var(--bg);
  line-height: 1.55;
}

.page {
  width: min(560px, 100% - 28px);
  margin: 0 auto;
  padding: 22px 0 40px;
}

.page--narrow { width: min(440px, 100% - 28px); padding-top: 12vh; }

.poster {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 0 16px;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
}

.scroll-hint svg { animation: nudge 1.6s ease-in-out infinite; }

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(4px); opacity: 1; }
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card__title { margin: 0 0 4px; font-size: 19px; }

.card__desc { margin: 0 0 18px; font-size: 13px; color: var(--muted); }

.req { color: var(--danger); }

.alert {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #a8071a;
  font-size: 14px;
}

.alert p { margin: 0; }
.alert p + p { margin-top: 4px; }

.field { margin-bottom: 18px; border: 0; padding: 0; }

.field > label,
.field > legend {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #26324d;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="password"],
.field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7690' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.field input:focus,
.field select:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(22, 104, 220, .12);
}

.field__extra { margin-top: 10px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segmented__item { position: relative; }

.segmented__item input { position: absolute; opacity: 0; pointer-events: none; }

.segmented__item span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  font-size: 14px;
  color: #3b4666;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
}

.segmented__item input:checked + span {
  color: var(--blue);
  background: #eaf3ff;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  font-weight: 600;
}

.segmented__item input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.captcha { display: flex; align-items: center; gap: 10px; }

.captcha input {
  flex: 1;
  width: auto;
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}

.captcha input:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 104, 220, .12); }

.captcha img {
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
}

.captcha__refresh {
  flex: none;
  height: 46px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--blue);
  background: #eaf3ff;
  border: 1px solid #cfe2ff;
  border-radius: 10px;
  cursor: pointer;
}

.captcha__refresh:hover { background: #ddeaff; }

.agree {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 4px 0 20px;
  font-size: 13px;
  color: #4a5670;
}

.agree input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); flex: none; }

.agree a { color: var(--blue); }

.submit {
  position: relative;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .06em;
  cursor: pointer;
  background: linear-gradient(135deg, #1668dc, #0b4fb8);
  box-shadow: 0 10px 22px rgba(22, 104, 220, .28);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}

.submit:hover { box-shadow: 0 12px 26px rgba(22, 104, 220, .34); }
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: .7; cursor: default; }

.submit__spin {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.submit.is-loading .submit__spin { display: inline-block; }
.submit.is-loading { opacity: .85; }

@keyframes spin { to { transform: rotate(360deg); } }

.privacy { margin-top: 18px; font-size: 13px; color: var(--muted); }

.privacy summary { cursor: pointer; color: #4a5670; }

.privacy p { margin: 10px 0 0; line-height: 1.7; }

.foot { margin-top: 18px; text-align: center; font-size: 12px; color: #98a2b8; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 成功页 */
.success { text-align: center; padding: 38px 26px; }
.success__icon { color: var(--ok); margin-bottom: 10px; }
.success__title { margin: 0 0 10px; font-size: 24px; }
.success__text { margin: 0 auto 24px; max-width: 22em; color: #4a5670; font-size: 14px; }
.success__tip { margin: 18px 0 0; font-size: 12px; color: #98a2b8; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #1668dc, #0b4fb8);
  cursor: pointer;
}

.button--ghost {
  color: var(--blue);
  background: #fff;
  border: 1px solid #cfe2ff;
}

/* 后台 */
.admin { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 28px 0 48px; }

.admin__head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin__head h1 { margin: 0 0 2px; font-size: 22px; }
.admin__head p { margin: 0; font-size: 13px; color: var(--muted); }
.admin__actions { display: flex; gap: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stat--accent { border-color: #bcd7ff; background: #f2f8ff; }
.stat__num { font-size: 26px; font-weight: 700; color: var(--navy); }
.stat__label { font-size: 12px; color: var(--muted); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filters input,
.filters select {
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
}

.filters input { flex: 1; min-width: 200px; }
.filters input:focus, .filters select:focus { border-color: var(--blue); }
.filters .button { height: 42px; }

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }

.table th {
  position: sticky;
  top: 0;
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #f6f8fc;
  border-bottom: 1px solid var(--line);
}

.table td { padding: 12px 14px; border-bottom: 1px solid #f0f3f9; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table .muted { color: var(--muted); }
.table .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .02em; }
.empty { text-align: center; color: var(--muted); padding: 40px 0 !important; }

.tag {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  border-radius: 999px;
  color: #4a5670;
  background: #f1f4fa;
  border: 1px solid var(--line);
}

.tag--sh { color: #0b6b3a; background: #e9f8ef; border-color: #b9e6cc; }

.pager {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.pager a { color: var(--blue); text-decoration: none; }

.login { padding-top: 26px; }
.login__form { margin-top: 18px; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin { padding-top: 18px; }
  .page { padding-top: 14px; }
  .card { padding: 20px; border-radius: 16px; }
  .captcha { flex-wrap: wrap; }
  .captcha input { flex: 1 1 100%; }
  .captcha img { flex: none; }
  .captcha__refresh { flex: none; }
}
