* { box-sizing: border-box; }

:root {
  --header-h: 76px;
  --gap: 24px;
  --bg: #f5f6f8;
  --text: #1f2329;
  --muted: #8f959e;
  --accent: #3370ff;
  --accent-dark: #245bdb;
  --danger: #f53f3f;
  --card-bg: #ffffff;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 头部 / Logo ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  flex-shrink: 0;
  z-index: 100;
}

.site-header .logo-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 12px 0 12px 24px;
}

/* 不限制图片形状，只统一约束展示区域高度，宽度按原图比例自适应 */
.site-header .logo-wrap img {
  height: 100%;
  max-width: 320px;
  width: auto;
  object-fit: contain;
}

.site-header .logo-placeholder {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--muted);
}

/* ---------- 首页 2x2 卡片 ---------- */
.home-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--gap);
  padding-top: calc(var(--header-h) + 25px);
  box-sizing: border-box;
}

/* 首页按钮固定在底部时，为避免遮挡最后的内容，给主区域留出底部空间 */
.home-main.has-fixed-btn {
  padding-bottom: 110px;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* 头部与卡片之间的提示框 */
.home-notice {
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 首页按钮固定悬浮在页面底部；背景透明，与卡片区域共用同一页面底色，不再是独立的白条 */
.home-extra-btn-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 14px var(--gap);
  background: transparent;
  box-sizing: border-box;
  z-index: 90;
}

.home-extra-btn {
  display: block;
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
  padding: 13px 40px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.home-extra-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
  opacity: .92;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  grid-template-rows: repeat(2, minmax(220px, 320px));
  gap: var(--gap);
  width: 100%;
  max-width: 700px;
  margin-bottom: 30px;
}

/* 卡片下方出现提示框二时，间距改由提示框二自身的 margin-top 控制，避免和卡片自身的 margin-bottom 叠加 */
.card-grid.no-gap-bottom {
  margin-bottom: 0;
}

/* 提示框二（卡片与社交链接之间）与卡片的距离，等于首页顶部提示框与头部的距离（25px，见 .home-main 的 padding-top） */
.home-notice-lower {
  margin-top: 25px;
}

/* 卡片下方新增的视频模块 / 说明模块，紧接卡片时使用同样的 25px 顶部间距 */
.home-gap-top {
  margin-top: 25px;
}

/* 视频模块：16:9 自适应，最大宽度与卡片区域一致 */
.home-video-wrap {
  width: 100%;
  max-width: 700px;
  margin-bottom: 25px;
}

.home-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}

.home-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 视频下方的说明模块：纯文本，无背景色/边框等样式 */
.home-description {
  width: 100%;
  max-width: 700px;
  margin-bottom: 25px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 卡片下方的社交账号纯文本链接：一行多列，列间距 25px */
.social-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 25px;
  row-gap: 10px;
  width: 100%;
  max-width: 700px;
}

.social-link {
  color: #7ab8ff;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.social-link:hover {
  opacity: .8;
}

/* 文本链接底部的空白占位区域 */
.home-bottom-spacer {
  width: 100%;
  height: 150px;
  flex-shrink: 0;
}

.card-item {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  display: block;
  border: none;
  padding: 0;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-item .card-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  background: #f0f1f3;
}

/* ---------- 详情页（图片 + 口令输入） ---------- */
.verify-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 60px;
  padding-top: calc(var(--header-h) + 40px);
}

.verify-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.verify-image-row {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.verify-image-row img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
  object-fit: contain;
}

.verify-image-row .img-empty {
  width: 100%;
  max-width: 640px;
  height: 220px;
  border-radius: 12px;
  background: #eceef1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.verify-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.verify-form input[type="password"],
.verify-form input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #dee0e3;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease;
  background: #fff;
}

.verify-form input:focus {
  border-color: var(--accent);
}

.verify-form button {
  padding: 13px 16px;
  border: none;
  border-radius: 8px;
  background: #000000;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease;
}

.verify-form button:hover {
  background: #262626;
}

.verify-form button:disabled {
  background: #c6c6c6;
  cursor: not-allowed;
}

.verify-msg {
  min-height: 18px;
  font-size: 13px;
  text-align: center;
}

.verify-msg.err { color: var(--danger); }
.verify-msg.ok  { color: #00b578; }

.back-link {
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    grid-template-rows: repeat(2, minmax(140px, 1fr));
    gap: 14px;
  }
}

/* 电脑端：详情页的输入框/按钮所在表单，宽度自动与上方图片的实际显示宽度保持一致 */
@media (min-width: 641px) {
  .verify-content {
    display: inline-grid;
    grid-template-columns: minmax(320px, max-content);
    justify-items: stretch;
    max-width: 640px;
    width: 100%;
  }

  .verify-form {
    max-width: none;
  }
}
