/* ==========================================================================
   佳木斯新玛特迪桑特刘佳事件站 — 暗黑视频平台风样式
   --------------------------------------------------------------------------
   说明：
   - 移动端优先（竖屏适配）
   - 红紫渐变 + 电光蓝点缀
   ========================================================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --bg: #0b0b10;
  --bg-card: #161622;
  --bg-card-hover: #1e1e30;
  --line: #2a2a40;
  --text: #e8e8f0;
  --text-dim: #9a9ab0;
  --primary: #ff2d78;      /* 红 */
  --secondary: #8b5cf6;    /* 紫 */
  --accent: #38e1ff;       /* 电光蓝 */
  --gradient: linear-gradient(90deg, var(--primary), var(--secondary));
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a.active {
  color: #fff;
  background: var(--gradient);
}

/* ---------- 模块切换 ---------- */
.module { display: none; max-width: 720px; margin: 0 auto; padding: 16px; padding-bottom: calc(90px + var(--safe-bottom)); }
.module.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 Hero ---------- */
.hero {
  text-align: center;
  padding: 34px 16px 28px;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.22), transparent 60%),
              radial-gradient(circle at 80% 100%, rgba(56, 225, 255, 0.12), transparent 55%);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.hero-title {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.5px;
}
.gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--text-dim); margin: 10px 0 16px; font-size: 0.95rem; }

/* ---------- 按钮 ---------- */
.btn-download {
  display: inline-block;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(255, 45, 120, 0.4);
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-download:active { transform: scale(0.96); }
.block-btn { width: 100%; margin-top: 6px; }

/* 悬浮领取按钮 */
.float-download {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 42px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(255, 45, 120, 0.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 8px 30px rgba(255, 45, 120, 0.55); }
  50% { box-shadow: 0 8px 34px rgba(56, 225, 255, 0.55); }
  100% { box-shadow: 0 8px 30px rgba(255, 45, 120, 0.55); }
}

/* ---------- 区块标题 ---------- */
.block { margin-bottom: 26px; }
.block-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient) 0%, transparent 100%);
  margin-left: 8px;
}

/* ---------- 轮播 ---------- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); }
.carousel-track {
  display: flex;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 70%;
  max-width: 70%;
  scroll-snap-align: start;
  padding: 0 6px;
  position: relative;
  cursor: pointer;
}
.carousel-slide video, .carousel-slide canvas {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}
.carousel-slide.interactive img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}
.carousel-slide .slide-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  border-radius: 0 0 10px 10px;
}
.carousel-slide .slide-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--gradient);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.carousel-arrow.left { left: 4px; }
.carousel-arrow.right { right: 4px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary), var(--accent));
}
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -22px; top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 225, 255, 0.2);
}
.tl-time { font-size: 0.78rem; color: var(--accent); font-weight: 700; }
.tl-title { font-weight: 700; margin: 2px 0; }
.tl-desc { font-size: 0.9rem; color: var(--text-dim); }
.tl-item.collapsible .tl-desc {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 0;
}
.tl-item.collapsible.open .tl-desc { max-height: 600px; }
.tl-toggle {
  margin-top: 6px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 6px;
}

/* ---------- 卡片网格 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  transition: transform 0.15s, background 0.2s;
}
.card:active { background: var(--bg-card-hover); transform: scale(0.98); }
.card-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.card-meta { font-size: 0.8rem; color: var(--text-dim); display: flex; gap: 8px; flex-wrap: wrap; }

.hot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* ---------- 标签云 ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.tag.s { font-size: 0.75rem; }
.tag.m { font-size: 0.9rem; }
.tag.l { font-size: 1.05rem; }

/* ---------- 人物介绍 ---------- */
.person-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.person-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary);
  margin-right: 14px;
}
.person-head { display: flex; align-items: center; margin-bottom: 12px; }
.person-name { font-size: 1.2rem; font-weight: 800; }
.person-id { color: var(--accent); font-size: 0.85rem; }
.person-info { font-size: 0.9rem; color: var(--text-dim); }
.person-info p { margin: 4px 0; }
.person-info strong { color: var(--text); }

/* ---------- 关键证据 ---------- */
.evidence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.evidence-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
  cursor: pointer;
}
.evidence-card p { font-size: 0.85rem; margin-top: 6px; color: var(--text-dim); }

/* ---------- 评论 ---------- */
.comment {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.comment-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.comment-author { font-weight: 700; font-size: 0.9rem; color: var(--accent); }
.comment-date { font-size: 0.75rem; color: var(--text-dim); }
.comment-text { font-size: 0.92rem; color: var(--text); }
.comment-likes { font-size: 0.78rem; color: var(--text-dim); margin-top: 6px; }

/* ---------- 资源列表 ---------- */
.resource-list { display: flex; flex-direction: column; gap: 12px; }
.resource-row {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.resource-row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.resource-row-title { font-weight: 700; font-size: 0.95rem; }
.resource-tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.resource-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 225, 255, 0.12);
  color: var(--accent);
}
.resource-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.btn-play, .btn-copy {
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.btn-play { background: var(--gradient); color: #fff; }
.btn-copy { background: var(--bg-card-hover); color: var(--text); border: 1px solid var(--line); }

/* ---------- 图片网格 ---------- */
.image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.image-grid .img-item { cursor: pointer; position: relative; overflow: hidden; border-radius: 8px; }
.image-grid .img-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #000;
}
.image-grid .img-item span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px; font-size: 0.68rem; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}

/* ---------- 更新日志 ---------- */
.updates-title { font-size: 1.4rem; font-weight: 900; margin-bottom: 16px; text-align: center; }
.update-item {
  background: var(--bg-card);
  border-left: 4px solid var(--gradient);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}
.update-date { font-size: 0.8rem; color: var(--accent); font-weight: 700; }
.update-title { font-weight: 700; margin: 4px 0; }
.update-desc { font-size: 0.9rem; color: var(--text-dim); }

/* ---------- 视频播放器弹层 ---------- */
.player-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
  padding: 16px;
}
.player-overlay.active { display: flex; }
.player-box { position: relative; width: 100%; max-width: 480px; }
.player-box video { width: 100%; max-height: 80vh; border-radius: 10px; background: #000; }
.player-close {
  position: absolute; top: -42px; right: 0;
  background: none; border: none;
  color: #fff; font-size: 1.6rem;
  padding: 6px;
}

/* ---------- 图片灯箱 ---------- */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 110;
  background: rgba(0,0,0,0.94);
  align-items: center; justify-content: center;
  flex-direction: column;
  padding: 16px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 8px; }
.lightbox-caption { color: var(--text-dim); margin-top: 12px; text-align: center; font-size: 0.9rem; }
.lightbox-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  color: #fff; font-size: 2rem; z-index: 5;
}

/* ---------- Toast 提示 ---------- */
.toast {
  display: none;
  position: fixed;
  bottom: calc(26px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 22, 34, 0.95);
  color: #fff;
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 120;
  box-shadow: var(--shadow);
}
.toast.show { display: block; animation: toastIn 0.25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- 页脚 ---------- */
.seo-footer {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  background: #0d0d15;
}
.seo-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 16px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.8;
}

/* ---------- 爬虫可见的 SEO 隐藏文本（视觉隐藏、仍可被收录） ---------- */
.seo-hidden {
  height: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 380px) {
  .hero-title { font-size: 1.4rem; }
  .carousel-slide { flex: 0 0 78%; max-width: 78%; }
}

/* ---------- 桌面护眼限制宽屏（可选，保持移动风格） ---------- */
@media (min-width: 768px) {
  body { background: #07070b; }
  .module, .topbar-inner { max-width: 860px; }
  .carousel-slide { flex: 0 0 33%; max-width: 33%; }
  .hot-grid { grid-template-columns: repeat(3, 1fr); }
  .evidence-grid { grid-template-columns: repeat(3, 1fr); }
}