:root {
  --brand-blue: #1a79bf;
  --brand-blue-dark: #145f99;
  --brand-red: #cd4132;
  --ink: #1f2d3d;
  --ink-soft: #5a6b7d;
  --line: #e3eaf2;
  --card: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f2f7fc 0%, #e8f1f9 100%);
  display: flex;
  flex-direction: column;
}

/* ---------- 顶部：logo + 公司名 ---------- */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid var(--brand-blue);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(26, 121, 191, 0.08);
}

.site-header img {
  height: 38px;
  width: auto;
  display: block;
}

.header-divider {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.header-company {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--brand-blue-dark);
  line-height: 1.3;
}

.header-sub {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ---------- 主体 ---------- */
.main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-block {
  text-align: center;
  margin-bottom: 8px;
}

.main-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-blue-dark);
  margin: 0;
  letter-spacing: 1px;
}

.title-rule {
  width: 68px;
  height: 4px;
  background: var(--brand-red);
  border-radius: 2px;
  margin: 12px auto 0;
}

.subtitle {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------- 两个入口 ---------- */
.entries {
  width: 100%;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.entry {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(26, 121, 191, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.entry:hover {
  transform: translateY(-3px);
  border-color: var(--brand-blue);
  box-shadow: 0 10px 24px rgba(26, 121, 191, 0.18);
}

.entry:active { transform: translateY(-1px); }

.entry-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.entry-icon svg { display: block; }

.entry-1 .entry-icon { background: var(--brand-blue); }
.entry-2 .entry-icon { background: var(--brand-red); }

.entry-step {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.entry-name {
  font-size: 19px;
  font-weight: 700;
  margin: 6px 0 8px;
  color: var(--brand-blue-dark);
}

.entry-2 .entry-name { color: var(--brand-red); }

.entry-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  min-height: 42px;
}

.entry-go {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-blue);
}

.entry-2 .entry-go { color: var(--brand-red); }

/* ---------- 流程提示 ---------- */
.tips {
  width: 100%;
  margin-top: 26px;
  background: #ffffff;
  border-left: 4px solid var(--brand-blue);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.tips strong { color: var(--brand-blue-dark); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--brand-blue-dark);
  color: #d9e8f5;
  text-align: center;
  padding: 14px 20px;
  font-size: 12px;
  letter-spacing: 0.5px;
  line-height: 1.8;
}

/* ---------- 播放页 ---------- */
.player-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 20px 30px;
  flex: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--brand-blue);
  text-decoration: none;
  margin-bottom: 14px;
}

.back-link:hover { text-decoration: underline; }

.player-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue-dark);
  margin: 0 0 4px;
}

.player-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.video-box {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  position: relative;
}

/* 自动播放被彻底拦截时（iOS 低电量模式、部分微信版本）的兜底遮罩 */
.tap-mask {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  z-index: 2;
}

.tap-mask.show { display: flex; }

.tap-mask span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 12px 26px;
}

.video-box video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  background: #000;
}

.notice {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-soft);
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.8;
  display: none;
}

.notice.show { display: block; }

.notice button {
  font-family: inherit;
  font-size: 12px;
  color: #fff;
  background: var(--brand-blue);
  border: 0;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
}

.next-block {
  margin-top: 18px;
  text-align: center;
}

.btn-exam {
  display: inline-block;
  background: var(--brand-red);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(205, 65, 50, 0.28);
}

.btn-exam:hover { background: #b6362a; }

.next-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- 手机适配（现场扫码场景） ---------- */
@media (max-width: 640px) {
  .site-header { padding: 12px 14px; gap: 10px; }
  .site-header img { height: 30px; }
  .header-company { font-size: 15px; }
  .main { padding: 24px 16px 22px; }
  .main-title { font-size: 21px; }
  .entries { grid-template-columns: 1fr; gap: 14px; margin-top: 20px; }
  .entry { padding: 22px 18px 18px; }
  .entry-desc { min-height: 0; }
  .player-wrap { padding: 16px 12px 24px; }
  .btn-exam { width: 100%; padding: 13px 0; }
}

/* ---------- 入口三：通栏卡片（资料说明及模版） ---------- */
.entry-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 16px;
  padding: 18px 20px;
}

.entry-wide .entry-icon {
  margin: 0;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: var(--brand-blue-dark);
}

.entry-wide .entry-body { flex: 1; min-width: 0; }

.entry-wide .entry-name {
  margin: 0 0 4px;
  font-size: 16px;
}

.entry-wide .entry-desc { min-height: 0; }

.entry-wide .entry-go {
  margin: 0;
  flex-shrink: 0;
  color: var(--brand-blue-dark);
}

/* ---------- 页脚管理员栏 ---------- */
.footer-admin {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(217, 232, 245, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  color: #eaf3fb;
}

.footer-sep { opacity: 0.45; }

.footer-tel {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
}

.wx-btn {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #14532d;
  background: #2fbf5f;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}

.wx-btn:hover { background: #28aa54; }

/* ---------- 微信二维码弹窗 ---------- */
.modal-mask {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(15, 35, 55, 0.62);
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 20px;
}

.modal-mask.show { display: flex; }

.modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  padding: 22px 22px 18px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-blue-dark);
  margin-bottom: 14px;
}

.modal-qr {
  display: block;
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ---------- 资料页（materials） ---------- */
.mat-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.mat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 14px rgba(26, 121, 191, 0.07);
}

.mat-badge {
  flex-shrink: 0;
  width: 52px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.mat-badge-pdf  { background: var(--brand-red); }
.mat-badge-doc,
.mat-badge-docx { background: var(--brand-blue); }
.mat-badge-xls,
.mat-badge-xlsx { background: #2e8b57; }

.mat-info { flex: 1; min-width: 0; }

.mat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-blue-dark);
  line-height: 1.5;
}

.mat-desc {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.mat-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mat-btn {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border-radius: 7px;
  padding: 7px 14px;
  min-width: 76px;
}

.mat-preview {
  color: #fff;
  background: var(--brand-blue);
}

.mat-preview:hover { background: var(--brand-blue-dark); }

.mat-download {
  color: var(--brand-blue-dark);
  background: #eaf3fb;
  border: 1px solid var(--brand-blue);
}

.mat-download:hover { background: #dbeaf8; }

.mat-empty {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}

.mat-tips { margin-top: 22px; }

/* ---------- 手机适配补充 ---------- */
@media (max-width: 640px) {
  .entry-wide { flex-wrap: wrap; }
  .entry-wide .entry-go { width: 100%; }
  .mat-card { flex-wrap: wrap; }
  .mat-info { flex-basis: 100%; order: 2; }
  .mat-badge { order: 1; }
  .mat-actions { order: 3; flex-direction: row; width: 100%; }
  .mat-btn { flex: 1; }
  .footer-admin { font-size: 12px; }
}
