/* ==========================================================================
 *  叠玩移动端 - 补充样式（m_extra.css）
 *  m_style.css 里缺失的部分：详情页 hero / Tab / 截图画廊 / 评价系统 / 空状态
 *  命名全部加 dm- 前缀或沿用旧模板已引用的类名，避免与 m_style.css 冲突
 * ========================================================================== */

/* ------------------------------------------------------------ 空状态 */
.m-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--gray-400, #9ca3af);
  font-size: 14px;
}

/* -------------------------------------------------------- 详情页 Hero */
.det-hero {
  position: relative;
  padding: 16px 14px 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #0fb9a4 0%, #04897a 60%, #036b5f 100%);
  color: #fff;
}
.det-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.dh-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}
.dh-icon {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.dh-info { min-width: 0; flex: 1 1 auto; }
.dh-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dh-meta {
  font-size: 12px;
  opacity: 0.88;
  line-height: 1.6;
}
.dh-meta span + span::before { content: '·'; margin: 0 5px; opacity: 0.6; }
.dh-score {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 600;
}

.dh-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.dh-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.dh-btn.primary { background: #fff; color: #04897a; }
.dh-btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
}
.dh-btn.disabled { opacity: 0.45; pointer-events: none; }

/* 用 m_style.css 已有的 detail-card 语义（旧模板引用）补齐 */
.detail-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
}
.detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 auto;
}
.detail-info { flex: 1 1 auto; min-width: 0; }
.detail-name { font-size: 15px; font-weight: 600; color: var(--gray-800, #1f2937); }
.detail-meta { font-size: 12px; color: var(--gray-400, #9ca3af); margin-top: 3px; }
.detail-dl {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--brand-500, #00bfa5);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.detail-body {
  padding: 4px 2px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--gray-700, #374151);
  word-break: break-word;
}
.detail-body img { max-width: 100%; height: auto; border-radius: 8px; }
.detail-body p { margin: 0 0 10px; }

/* ------------------------------------------------------------- Tab */
.det-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
  background: #fff;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
}
.det-tab {
  flex: 1 1 0;
  padding: 9px 0;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--gray-500, #6b7280);
  position: relative;
  cursor: pointer;
}
.det-tab.active {
  color: var(--brand-600, #00a68f);
  font-weight: 600;
}
.det-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand-500, #00bfa5);
}
.det-panel { display: none; padding: 14px 12px; }
.det-panel.active { display: block; }

/* --------------------------------------------------------- 截图画廊 */
.shot-box {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shot-box::-webkit-scrollbar { display: none; }
.shot-img {
  flex: 0 0 auto;
  width: 168px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-100, #f3f4f6);
  scroll-snap-align: start;
  cursor: pointer;
}
.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
}
.shot-lightbox.show { display: flex; }
.shot-lb-img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.shot-lb-close {
  position: absolute;
  top: 18px;
  right: 20px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

/* --------------------------------------------------------- 评价系统 */
.cm-wrap { background: #fff; border-radius: 14px; padding: 14px 12px; }
.cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cm-title { font-size: 15px; font-weight: 700; color: var(--gray-800, #1f2937); }
.cm-count { font-size: 12px; font-weight: 400; color: var(--gray-400, #9ca3af); margin-left: 4px; }
.cm-sort { display: flex; gap: 4px; }
.cm-sort-btn {
  padding: 4px 10px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  color: var(--gray-500, #6b7280);
  cursor: pointer;
}
.cm-sort-btn.active {
  border-color: var(--brand-500, #00bfa5);
  color: var(--brand-600, #00a68f);
  font-weight: 600;
}

.cm-form {
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--gray-50, #f9fafb);
}
.cm-star-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cm-star-label { font-size: 12px; color: var(--gray-500, #6b7280); }
.cm-stars { display: flex; gap: 2px; }
.cm-star { font-size: 20px; color: var(--gray-300, #d1d5db); cursor: pointer; line-height: 1; }
.cm-star.active { color: #fbbf24; }
.cm-input,
.cm-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--gray-800, #1f2937);
}
.cm-input { margin-bottom: 8px; }
.cm-textarea { min-height: 78px; resize: vertical; }
.cm-submit {
  width: 100%;
  margin-top: 10px;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: var(--brand-500, #00bfa5);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cm-list { display: flex; flex-direction: column; gap: 14px; }
.cm-item { display: flex; gap: 10px; }
.cm-item.child { margin-top: 10px; }
.cm-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-item.child .cm-avatar { width: 26px; height: 26px; font-size: 12px; }
.cm-main { flex: 1 1 auto; min-width: 0; }
.cm-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-name { font-size: 13px; font-weight: 600; color: var(--gray-800, #1f2937); }
.cm-tag {
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 16px;
  color: #fff;
}
.cm-tag.admin { background: var(--brand-500, #00bfa5); }
.cm-tag.mine { background: #f59e0b; }
.cm-score { font-size: 11px; color: #f59e0b; font-weight: 600; }
.cm-date { font-size: 11px; color: var(--gray-400, #9ca3af); margin: 2px 0 4px; }
.cm-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-700, #374151);
  word-break: break-word;
}
.cm-foot { display: flex; gap: 14px; margin-top: 6px; }
.cm-like,
.cm-reply {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--gray-400, #9ca3af);
  cursor: pointer;
}
.cm-kids {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--gray-100, #f3f4f6);
}
.cm-empty {
  padding: 26px 0;
  text-align: center;
  font-size: 13px;
  color: var(--gray-400, #9ca3af);
}
.cm-more {
  width: 100%;
  margin-top: 14px;
  height: 38px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: var(--gray-600, #4b5563);
  cursor: pointer;
}

/* ------------------------------------------------- 名称省略号（CSS 兜底）
 * 模板已去掉 str_cut 硬截断（会让"金铲铲之战"变成"金..."），
 * 改由 CSS 单行省略号处理，与本地设计稿的显示方式保持一致。
 */
.ac-name,
.hc-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-card .ac-name { width: 100%; text-align: center; }

/* 20261001: 列表页标签行滑动保障 + 真实标签链接 */
.tag-scroll { min-width: 0; }
.tag-scroll .tag-chip { flex: 0 0 auto; }
.tag-scroll a.tag-chip { text-decoration: none; }
