/* ===== 站内媒体查看器 ===== */
.mv-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000;
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s; user-select: none;
}
.mv-overlay.show { opacity: 1; }
.mv-stage {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mv-media-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease-out;
}
.mv-media-wrap img {
  max-width: 92vw; max-height: 88vh; object-fit: contain;
  cursor: grab; display: block; border-radius: 4px;
}
.mv-media-wrap img.dragging { cursor: grabbing; transition: none; }
.mv-media-wrap video {
  max-width: 92vw; max-height: 84vh; display: block; border-radius: 4px; background: #000;
}

/* 顶部工具栏 */
.mv-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1002;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: linear-gradient(rgba(0,0,0,.6), transparent);
}
.mv-title { color: #fff; font-size: 16.1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50vw; }
.mv-counter { color: rgba(255,255,255,.75); font-size: 15px; margin-left: 12px; flex-shrink: 0; }
.mv-top-actions { display: flex; gap: 8px; }

/* 通用图标按钮 */
.mv-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 20.7px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; flex-shrink: 0;
}
.mv-btn:hover { background: rgba(255,255,255,.28); }
.mv-btn:active { transform: scale(.92); }

/* 左右切换箭头 */
.mv-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1002;
  width: 48px; height: 48px; font-size: 27.6px;
}
.mv-nav.prev { left: 14px; }
.mv-nav.next { right: 14px; }

/* 照片底部缩放控制条 */
.mv-photo-controls {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1002;
  display: flex; gap: 8px; align-items: center;
  background: rgba(0,0,0,.5); padding: 8px 14px; border-radius: 999px;
}
.mv-zoom-label { color: rgba(255,255,255,.85); font-size: 13.8px; min-width: 44px; text-align: center; }

/* 视频底部控制条 */
.mv-video-controls {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 1002;
  padding: 10px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.75));
  display: flex; flex-direction: column; gap: 8px;
}
.mv-progress { width: 100%; height: 5px; background: rgba(255,255,255,.25); border-radius: 999px; cursor: pointer; position: relative; }
.mv-progress-fill { height: 100%; background: #ff5a5f; border-radius: 999px; width: 0%; position: relative; }
.mv-progress-fill::after {
  content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; background: #fff; border-radius: 50%;
}
.mv-video-row { display: flex; align-items: center; gap: 10px; }
.mv-time { color: rgba(255,255,255,.85); font-size: 13.8px; min-width: 88px; font-variant-numeric: tabular-nums; }
.mv-spacer { flex: 1; }
.mv-vol-wrap { display: flex; align-items: center; gap: 6px; }
.mv-vol-slider { width: 80px; accent-color: #ff5a5f; cursor: pointer; }
.mv-rate-btn { width: auto; padding: 0 12px; border-radius: 999px; font-size: 15px; height: 32px; }

/* 加载与错误提示 */
.mv-loading { color: rgba(255,255,255,.7); font-size: 17.3px; position: absolute; z-index: 1001; }
.mv-error { color: #ff8a8f; font-size: 17.3px; position: absolute; z-index: 1001; text-align: center; padding: 0 30px; }

/* 移动端适配 */
@media (max-width: 640px) {
  .mv-title { max-width: 34vw; font-size: 13.8px; }
  .mv-nav { width: 40px; height: 40px; font-size: 23px; }
  .mv-nav.prev { left: 6px; }
  .mv-nav.next { right: 6px; }
  .mv-vol-slider { width: 56px; }
  .mv-time { min-width: 76px; font-size: 12.6px; }
}

/* 文本预览样式 */
.mv-text-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e1e1e;
  padding: 24px;
  box-sizing: border-box;
  overflow: hidden;
}

pre.mv-text {
  width: 100%;
  max-width: 900px;
  max-height: 100%;
  margin: 0;
  padding: 20px 24px;
  background: #252526;
  color: #d4d4d4;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 16.1px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

pre.mv-text::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

pre.mv-text::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 5px;
}

pre.mv-text::-webkit-scrollbar-track {
  background: #1e1e1e;
}

/* 网格文本/视频占位图标 */
.tile-doc, .tile-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 73.6px;
  background: var(--card, #1a1a20);
  color: var(--muted, #9a9aa5);
}
.tile-video {
  color: var(--accent2, #7c5cff);
}

/* PDF 内嵌预览 */
.mv-pdf-wrap {
  position: relative;
  width: 92vw;
  height: 88vh;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #2a2a2a;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.mv-pdf {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  transform-origin: center center;
  transition: transform .2s;
}
.mv-pdf-toolbar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.75);
  border-radius: 999px;
  z-index: 1003;
  backdrop-filter: blur(4px);
}
.mv-pdf-toolbar button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 18.4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.mv-pdf-toolbar button:hover { background: rgba(255,255,255,0.32); }
.mv-pdf-toolbar button:active { transform: scale(0.92); }

/* Word/Excel 在线预览容器 */
.mv-doc-body {
  width: 92vw;
  max-width: 1000px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  color: #222;
  border-radius: 4px;
  padding: 24px;
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.mv-doc-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 16.1px;
}
.mv-doc-body td, .mv-doc-body th {
  border: 1px solid #d0d0d0;
  padding: 6px 10px;
}
.mv-doc-body tr:nth-child(even) { background: #f7f7f7; }

/* 办公文档不支持在线预览提示 */
.mv-doc-tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted, #9a9aa5);
  text-align: center;
  padding: 20px;
}
