/* ================================================================
   comment.css - 全局评论区样式（抖音风格 / 白色简约 + 黑雾）
   ================================================================ */

/* ---------- 评论区外层容器 — 黑雾效果 ---------- */
.comment-section-wrap {
  position: relative;
  background: #fff;
  border-radius: 14px;
  margin: 12px auto;
  padding: 16px 12px 4px 12px;
  overflow: hidden;
  /* 多层级黑雾 box-shadow — 阵阵耀眼黑雾向外扩散 */
  box-shadow:
    0 0 8px rgba(0, 0, 0, 0.05),
    0 0 16px rgba(0, 0, 0, 0.04),
    0 0 32px rgba(0, 0, 0, 0.03),
    0 0 64px rgba(0, 0, 0, 0.02),
    0 0 128px rgba(0, 0, 0, 0.01);
  transition: box-shadow 0.8s ease;
}

/* 黑雾脉冲动画 — 呼吸式光晕 */
.comment-section-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: transparent;
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.06),
    0 0 40px rgba(0, 0, 0, 0.03),
    0 0 80px rgba(0, 0, 0, 0.02);
  animation: blackMistPulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes blackMistPulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(0, 0, 0, 0.06),
      0 0 40px rgba(0, 0, 0, 0.03),
      0 0 80px rgba(0, 0, 0, 0.02);
  }
  50% {
    box-shadow:
      0 0 30px rgba(0, 0, 0, 0.10),
      0 0 60px rgba(0, 0, 0, 0.05),
      0 0 120px rgba(0, 0, 0, 0.03);
  }
}

/* ---------- 评论头 — 评论数标题 ---------- */
.comment-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  padding: 6px 4px 10px 4px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 8px;
}

/* ---------- 一级评论项 ---------- */
.comment-item-v2 {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.comment-item-v2:last-child {
  border-bottom: none;
}

/* 评论顶部（头像 + 昵称 + 时间） */
.cmt-top-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cmt-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
}

.cmt-avatar img,
.cmt-avatar .avatar-letter-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.cmt-body {
  flex: 1;
  min-width: 0;
}

.cmt-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.cmt-nickname {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmt-time {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
}

.cmt-content {
  font-size: 14px;
  color: #222;
  line-height: 1.5;
  word-break: break-word;
  margin-bottom: 8px;
}

/* 评论操作行 */
.cmt-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cmt-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  color: #999;
  font-size: 12px;
  transition: color 0.2s;
}

.cmt-like-btn svg {
  width: 15px;
  height: 15px;
  transition: all 0.2s;
}

.cmt-like-btn.liked {
  color: #fe2c55;
}

.cmt-like-btn.liked svg {
  fill: #fe2c55;
  stroke: #fe2c55;
}

.cmt-reply-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  padding: 2px 0;
  transition: color 0.2s;
}

.cmt-reply-btn:hover {
  color: #666;
}

/* ---------- 子评论容器 ---------- */
.cmt-sub-list {
  margin-top: 6px;
  margin-left: 44px;
  background: #f8f8f8;
  border-radius: 8px;
  padding: 6px 10px;
}

/* 子评论项 */
.cmt-sub-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
}

.cmt-sub-item + .cmt-sub-item {
  border-top: 1px solid #eee;
}

.cmt-sub-avatar {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}

.cmt-sub-avatar img,
.cmt-sub-avatar .avatar-letter-wrap {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.cmt-sub-body {
  flex: 1;
  min-width: 0;
}

.cmt-sub-name {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  display: inline;
}

.cmt-sub-content {
  font-size: 13px;
  color: #333;
  line-height: 1.45;
  word-break: break-word;
}

.cmt-sub-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 3px;
}

.cmt-sub-actions .cmt-like-btn {
  font-size: 11px;
}

.cmt-sub-actions .cmt-like-btn svg {
  width: 13px;
  height: 13px;
}

.cmt-sub-actions .cmt-reply-btn {
  font-size: 11px;
}

.cmt-sub-time {
  font-size: 10px;
  color: #bbb;
}

/* ---------- 展开/分隔线 ---------- */
.cmt-expand-divider {
  display: flex;
  align-items: center;
  margin: 8px 0 8px 44px;
  cursor: pointer;
  user-select: none;
}

.cmt-expand-divider::before,
.cmt-expand-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.cmt-expand-text {
  padding: 0 12px;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  transition: color 0.2s;
}

.cmt-expand-divider:hover .cmt-expand-text {
  color: #555;
}

.cmt-expand-more {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #888;
  padding: 8px 0 4px;
  cursor: pointer;
  user-select: none;
}

.cmt-expand-more:hover {
  color: #555;
}

/* ---------- 评论面板（首页弹窗内） ---------- */
.comment-panel-v2 {
  background: #fff;
}

/* 首页评论面板 — 黑雾光晕 */
#commentPanel.comment-panel-v2 {
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08), 0 0 40px rgba(0,0,0,0.03);
}

.comment-panel-v2 .comment-item-v2 {
  padding: 12px 16px;
}

/* 适配首页评论面板默认样式覆盖 */
#commentPanel .comment-item-v2 {
  padding: 12px 16px;
}

#commentPanel .cmt-sub-list {
  margin-left: 44px;
  margin-right: 0;
}

/* ---------- 全局 rainbow avatar 兼容 ---------- */
.cmt-avatar .rainbow-avatar,
.cmt-sub-avatar .rainbow-avatar {
  width: 100%;
  height: 100%;
}

.cmt-avatar .rainbow-avatar .avatar-letter,
.cmt-sub-avatar .rainbow-avatar .avatar-letter {
  font-size: 11px;
}

.cmt-avatar .rainbow-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.cmt-sub-avatar .rainbow-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}
