/* ============================================================
   PPT 预览组件样式 (assets/ppt-viewer.css)
   ------------------------------------------------------------
   组件结构：
     .ppt-view            预览框容器（圆角、裁剪溢出）
       .ppt-view-stage      内嵌 PDF 即时预览
       .ppt-view-btn        右下角「查看详情」按钮
     .ppt-modal           详情弹窗（点击「查看详情」打开）
       .ppt-modal-stage    弹窗内 PDF 预览
   ============================================================ */

/* ---------- 预览框容器 ---------- */
.ppt-view {
  position: relative;      /* 供内部 .ppt-view-stage 绝对定位 */
  flex: 1;                 /* 撑满父级剩余高度 */
  min-height: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;        /* 圆角 + 裁剪溢出内容 */
}

/* ---------- 内嵌 PDF 即时预览 ---------- */
.ppt-view-stage {
  position: absolute;
  inset: 0;                /* 铺满预览框 */
  overflow: hidden;        /* PDF 内部自带滚动，容器不出现多余滚动条 */
  background: #fff;
}
.ppt-view-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  overflow: hidden;      /* 隐藏 PDF 预览内部的横向/纵向滚动条 */
}
.ppt-view-stage .ppt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 缩略图铺满预览框，保持比例 */
  display: block;
  background: #fff;
}

/* ---------- 预览框顶部渐变遮罩（保证右上角标题可读） ---------- */
.ppt-view::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.05) 45%,
    rgba(0, 0, 0, 0.3) 100%
  );
  z-index: 1;
  pointer-events: none;
  border-radius: 16px;
}

/* ---------- 预览框右上角标题（作品页形式） ---------- */
.ppt-cell-title {
  position: absolute;
  top: 22px; right: 26px;
  z-index: 3;
  max-width: 62%;
  text-align: right;
}
.ppt-cell-title .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
}
.ppt-cell-title h1 {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}

/* ---------- 「查看详情」按钮 ---------- */
.ppt-view-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.76rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}
.ppt-view-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.5);
}
.ppt-view-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- 详情弹窗 ---------- */
.ppt-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ppt-modal.is-open { display: flex; }
.ppt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
.ppt-modal-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 92vh;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ppt-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.ppt-modal-title { min-width: 0; }
.ppt-modal-title .kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 5px;
}
.ppt-modal-title h2 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ppt-modal-close {
  margin-left: auto;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.ppt-modal-close:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.ppt-modal-stage {
  flex: 1;
  position: relative;
  overflow: hidden;        /* PDF 内部自带滚动，容器不出现多余滚动条 */
  background: #0c0c0c;
  min-height: 0;
}
.ppt-modal-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
