:root {
  --primary: #2f6fed;
  --primary-dark: #1d4fd0;
  --bg: #f5f7fb;
  --card-bg: #ffffff;
  --text: #1f2733;
  --text-muted: #8a93a3;
  --border: #e7ebf2;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(31, 39, 51, 0.06);
  --shadow-hover: 0 12px 32px rgba(47, 111, 237, 0.16);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { width: 100%; }

a { text-decoration: none; color: inherit; }
img { display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}
.site-header .logo { height: 34px; width: auto; }
.site-header .site-title { font-size: 18px; font-weight: 700; }
.site-header .spacer { flex: 1; }
.site-header .back-link {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}
.site-header .header-query {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.site-header .header-query:hover { border-color: var(--primary); background: rgba(127, 127, 127, .06); }

.banner {
  width: 100%;
  max-width: var(--max-width);
  margin: 16px auto 0;
  padding: 0 16px;
}
.banner img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 360;
  object-fit: cover;
  border-radius: var(--radius);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 0 6px;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.category-tab:hover { color: var(--text); }
.category-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 14px 0 40px;
}
.activity-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.activity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.activity-card .cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #dbe4ff, #eef2fb);
}
.activity-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.activity-card .title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.activity-card .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.activity-card .meta { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2fb;
  color: var(--primary);
  font-weight: 600;
}
.tag.apply { background: #e8f7ee; color: #1f9d55; }
.badge-top {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff7a45, #ff4d4f);
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(255, 77, 79, .3);
}

.state {
  text-align: center;
  padding: 64px 16px;
  color: var(--text-muted);
}
.state .icon { font-size: 40px; margin-bottom: 12px; }
.state .retry {
  margin-top: 16px;
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.skeleton-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.skeleton-card .sk-cover { width: 100%; aspect-ratio: 16/9; }
.skeleton-card .sk-body { padding: 14px 16px 16px; }
.skeleton-card .sk-line { height: 14px; margin: 0 0 12px; border-radius: 6px; }
.skeleton-card .sk-actions { display: flex; gap: 8px; margin-top: 14px; }
.skeleton-card .sk-btn { flex: 1; height: 34px; border-radius: 10px; }
.sk-cover, .sk-line, .sk-btn { background: linear-gradient(90deg, #eef1f6 25%, #e2e7ef 37%, #eef1f6 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.detail-cover { width: 100%; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); }
.detail-cover img { width: 100%; height: auto; }
.detail-title { font-size: 26px; font-weight: 800; line-height: 1.35; margin: 0 0 8px; }
.detail-subtitle { font-size: 15px; color: var(--text-muted); margin: 0 0 14px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.detail-meta .expired { color: #ff4d4f; font-weight: 700; }

.act-content { line-height: 1.85; color: var(--text); word-wrap: break-word; font-size: 15px; }
.act-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.act-content p { margin: 0 0 1em; }
.act-content h1, .act-content h2, .act-content h3 { margin: 1.3em 0 .6em; font-weight: 700; line-height: 1.4; }
.act-content a { color: var(--primary); text-decoration: underline; }
.act-content ul, .act-content ol { padding-left: 1.6em; margin: 0 0 1em; }
.act-content table { max-width: 100%; border-collapse: collapse; }
.act-content td, .act-content th { border: 1px solid var(--border); padding: 6px 10px; }
.act-content video { max-width: 100%; }

.apply-bar {
  position: sticky;
  bottom: 0;
  margin-top: 28px;
  padding: 16px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 40px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .18s ease;
  min-width: 220px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .92; }
.btn:disabled, .btn-disabled { background: #c8cfdb; color: #fff; cursor: not-allowed; }

.site-footer { margin-top: auto; text-align: center; padding: 24px 16px 40px; color: var(--text-muted); font-size: 13px; }

@media (max-width: 768px) {
  .activity-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding-bottom: 28px; }
  .site-header .site-title { font-size: 16px; }
  .detail-title { font-size: 22px; }
  .activity-card .title { font-size: 15px; }
  .btn { width: 100%; }
  .apply-bar { padding: 12px; }
}

.btn { background: var(--primary); color: #fff; }
.btn:hover { opacity: .92; }
.btn-secondary { background: #eef2fb; color: var(--primary); }
.apply-section { margin-top: 24px; }
.apply-form, .apply-query {
  margin-top: 20px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.apply-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; color: var(--text); }
.apply-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.apply-row > label { flex: 0 0 96px; color: var(--text-muted); font-size: 14px; }
.apply-row .req { color: #e8543f; margin-left: 2px; }
.apply-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}
.apply-input:focus { border-color: var(--primary); }
textarea.apply-input { min-height: 72px; resize: vertical; }
.apply-captcha .captcha-img { flex: 0 0 auto; height: 40px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); }
/* 验证阶段区块：与申请表单用分隔线和标题明确区隔，让会员知道自己进到了下一步 */
.apply-verify {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.apply-verify-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.apply-verify-tip { font-size: 13px; color: var(--muted, #888); line-height: 1.6; }
.apply-verify-done { padding: 10px 0; }
.apply-verify-done .apply-verify-title { color: #2e9b5b; }

/* 多步验证的进度指示：已完成打勾、当前高亮、未轮到置灰 */
.apply-step-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.apply-step-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted, #999);
}
.apply-step-nav-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 12px;
  font-style: normal;
}
.apply-step-nav-item.active { color: var(--primary); font-weight: 600; }
.apply-step-nav-item.done { color: #2e9b5b; }
.apply-step-nav-item.done i::before { content: "\2713"; }
.apply-step-nav-item.done i { font-size: 0; }
.apply-step-nav-item.done i::before { font-size: 12px; }

/* 上行发信：口令与接收号码都要能一眼看清、一点即复制。
   在手机上逐字抄一串大写字母极易出错，而抄错的代价是会员白花一条短信钱。 */
.apply-inbound-line { font-size: 13px; color: var(--text); margin-bottom: 10px; }
.apply-inbound-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, .015);
}
.apply-inbound-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.apply-inbound-item .k { flex: 0 0 auto; font-size: 13px; color: var(--muted, #888); }
.apply-inbound-item .v {
  flex: 1 1 auto;
  font-size: 20px;
  letter-spacing: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--primary);
  word-break: break-all;
}
.btn-copy {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.btn-copy:hover { border-color: var(--primary); color: var(--primary); }
/* 等待接收：带一个呼吸动画，让会员知道页面仍在工作而不是卡住了 */
.apply-inbound-waiting {
  margin-top: 10px;
  font-size: 13px;
  color: #2e9b5b;
  animation: apply-breath 1.6s ease-in-out infinite;
}
@keyframes apply-breath { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* 已发送提示行：告知验证码发往哪个号码 */
.apply-sent .apply-sent-text {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #2e9b5b;
}
.apply-sent .apply-sent-text a { color: var(--primary); text-decoration: none; font-size: 13px; }
.apply-sent .apply-sent-text a:hover { text-decoration: underline; }

/* 短信验证码行：输入框自适应，按钮定宽，与图形验证码行的排布保持一致 */
.apply-sms .btn-sms {
  flex: 0 0 auto;
  min-width: 108px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
  white-space: nowrap;
}
.apply-sms .btn-sms:disabled { opacity: .6; cursor: not-allowed; }
.apply-msg { min-height: 20px; font-size: 13px; margin: 6px 0; }
.apply-msg.ok { color: #2e9b5b; }
.apply-msg.err { color: #e8543f; }
.apply-bar .btn { min-width: 160px; }
.apply-actions { margin-top: 16px; display: flex; }
.apply-actions .btn { min-width: 160px; }
.apply-result { margin-top: 12px; }
.apply-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.apply-table th, .apply-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.apply-table th { color: var(--text-muted); font-weight: 600; }
.apply-detail-link { color: var(--primary); text-decoration: none; font-size: 13px; }
.apply-detail-link:hover { text-decoration: underline; }
.apply-detail-row td { background: rgba(0, 0, 0, 0.02); }
.apply-detail-box { font-size: 13px; line-height: 1.6; color: var(--text-muted); word-break: break-word; white-space: pre-wrap; }
@media (max-width: 768px) {
  .apply-row { flex-wrap: wrap; }
  .apply-row > label { flex: 0 0 100%; }
}

.activity-card .card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
.card-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--primary);
  transition: border-color .16s ease, background .16s ease, opacity .16s ease, transform .12s ease;
}
.card-btn:hover { border-color: var(--primary); }
.card-btn:active { transform: scale(.98); }
.card-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.card-btn-primary:hover { opacity: .92; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 20, 28, 0.5);
  opacity: 0;
  transition: opacity .2s ease;
  overscroll-behavior: contain;
}
.modal-overlay.open { opacity: 1; }
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  transform: translateY(14px) scale(.98);
  transition: transform .2s ease;
}
.modal-overlay.open .modal-dialog { transform: none; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
}
.modal-close:hover { background: rgba(127, 127, 127, .14); color: var(--text); }
.modal-body { padding: 8px; }
.modal-body .apply-form,
.modal-body .apply-query {
  margin-top: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 16px;
}
.modal-loading, .apply-empty {
  padding: 44px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
