/* 首页样式。与项目根目录 home.html 里的 <style> 保持一致：
   在 home.html 里调好样式后，把那段样式同步到这里（不含预览页专用的提示条样式）。
   在首页（index.html）和电脑端登录页（login.html）加载，和 style.css 一起生效，本文件后加载、同优先级时以本文件为准。 */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #6b7280;
  --ink: #14213d;        /* 标题用的深色 */
  --primary: #2f6fed;    /* 链接、强调色 */
  --navy: #1f3b63;       /* 和视频封面的深蓝一致 */
  --border: #e5e7eb;
  --radius: 12px;
  --container: 1160px;
  --shadow-sm: 0 1px 3px rgba(20, 33, 61, .06);
  --shadow-md: 0 10px 28px rgba(20, 33, 61, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

/* ---------- 顶栏：头像 + 站名 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
/* 头像裁成圆形，并稍微放大，让脸更清楚 */
.logo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border);
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3);
  transform-origin: 51% 40%;
}
.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  white-space: nowrap;
}
.brand-tag {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--primary);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- 头图区：介绍 + 二维码 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #edf2fd 0%, var(--bg) 100%);
}
/* 两个淡淡的圆形装饰，呼应视频封面上的圆形 */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  top: -180px;
  right: -140px;
  width: 460px;
  height: 460px;
  background: radial-gradient(closest-side, rgba(47, 111, 237, .13), transparent);
}
.hero::after {
  bottom: -220px;
  left: -160px;
  width: 400px;
  height: 400px;
  background: radial-gradient(closest-side, rgba(31, 59, 99, .10), transparent);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* 只写上下内边距，保留 .container 的左右留白 */
  padding-top: 22px;
  padding-bottom: 20px;
}
.hero-text h1 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}
.hero-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* 二维码卡片：手机上是横条，电脑上是竖卡片 */
.qr-card {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.qr-card img {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 8px;
}
.qr-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.qr-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
/* 电脑和手机上的提示语不同：手机显示“长按识别”，电脑显示“手机扫码” */
.qr-tip-desktop { display: none; }
.in-wechat .qr-card { display: none; }

/* ---------- 视频列表 ---------- */
.videos {
  padding-top: 6px;
  padding-bottom: 32px;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 14px;
}
.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.section-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: #e6eaf1;
  color: var(--muted);
  font-size: 12px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* 手机：2 列 */
  gap: 16px 10px;
}
.video-card {
  display: block;
  min-width: 0;
}
/* 用 padding-top 撑出 16:9，老版本微信内核也支持 */
.cover {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e3e8ef;
  box-shadow: var(--shadow-sm);
}
.cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 封面加载失败时显示深蓝底，不留破图 */
.cover.no-cover::after {
  content: "晓舟报告";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
}
/* 播放按钮，电脑上鼠标移上去才出现 */
.play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(20, 33, 61, .58);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .2s ease, transform .2s ease;
}
.play::before {
  content: "";
  margin-left: 3px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #fff;
}
.video-title {
  display: -webkit-box;
  margin: 8px 2px 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;     /* 太长才换行，不把 ".mp4" 这样的词从中间拆开 */
  word-break: break-word;
  -webkit-line-clamp: 2;        /* 标题最多两行 */
  -webkit-box-orient: vertical;
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.site-footer a { color: var(--muted); }

/* ---------- 平板及更宽 ---------- */
@media (min-width: 768px) {
  .container { padding: 0 24px; }
  .header-inner { height: 64px; }
  .logo { width: 40px; height: 40px; }
  .brand-name { font-size: 20px; }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .hero-text h1 { font-size: 34px; }
  .hero-sub { font-size: 16px; }
  /* 电脑上打开微信（比如电脑版微信）时没有二维码，文字居中 */
  .in-wechat .hero-inner { justify-content: center; text-align: center; }
  .qr-card {
    flex-direction: column;
    gap: 10px;
    min-width: 204px;
    padding: 18px 22px 16px;
    text-align: center;
  }
  .qr-card img { width: 150px; height: 150px; }
  .qr-title { font-size: 16px; }
  .qr-tip-mobile { display: none; }
  .qr-tip-desktop { display: block; }
  .videos {
    padding-top: 10px;
    padding-bottom: 48px;
  }
}

/* ---------- 中等宽度：3 列 ---------- */
@media (min-width: 600px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 14px;
  }
}

/* ---------- 电脑：4 列 ---------- */
@media (min-width: 960px) {
  .video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 18px;
  }
  .video-title { font-size: 15px; }
}

/* ---------- 有鼠标的设备才做悬停效果 ---------- */
@media (hover: hover) and (pointer: fine) {
  .cover { transition: box-shadow .2s ease; }
  .cover img { transition: transform .4s ease; }
  .video-card:hover .cover { box-shadow: var(--shadow-md); }
  .video-card:hover .cover img { transform: scale(1.04); }
  .video-card:hover .play,
  .video-card:focus-visible .play {
    opacity: 1;
    transform: scale(1);
  }
}
