:root {
  --post-comment-card-bg: rgba(17,17,18,0.78);
  --post-comment-toolbar-bg: #0f0f10;
}
/* 帖子详情页 */
.post-detail-page { max-width: 800px; margin: 0 auto; padding: 40px 28px 80px; }

.post-back-btn {
  background: none; border: 1px solid var(--color-border);
  color: var(--color-text-dim); padding: 8px 18px; border-radius: 10px;
  font-size: 13px; cursor: pointer; transition: all .15s;
  margin-bottom: 24px; font-family: inherit;
}
.post-back-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }

.post-detail-loading { text-align:center; color:var(--color-text-dim); padding:80px 0; font-size:15px; }

.post-detail-head { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.post-detail-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; flex-shrink:0; cursor:pointer; }
.post-detail-author-info {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px 6px;
  flex:1;
  min-width:0;
}
.post-detail-author { font-size:15px; font-weight:700; color:var(--color-text); cursor:pointer; }
.post-detail-author:hover { color:var(--color-accent); }
.post-detail-author-info #postDetailAuthorLevel {
  align-items:center;
  margin:0;
  line-height:1;
}
.post-detail-author-info #postDetailAuthorLevel .level-badge {
  margin-left:0;
  transform:none;
}
.post-detail-time { flex-basis:100%; font-size:12px; color:var(--color-text-dim); }
.post-detail-category {
  padding:4px 12px; background:rgba(255,255,255,0.12); color:var(--color-accent);
  border-radius:8px; font-size:12px; font-weight:600; flex-shrink:0;
}

.post-detail-title { font-size:24px; font-weight:900; line-height:1.4; margin:0 0 20px; }
.post-detail-content { font-size:15px; line-height:1.8; color:var(--color-text); white-space:pre-wrap; word-break:break-word; overflow-wrap:break-word; }
.post-detail-content img { max-width:100%; height:auto; border-radius:10px; }

.post-detail-images { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; overflow:hidden; }
.post-detail-images img { max-width:100%; max-height:400px; border-radius:10px; cursor:pointer; object-fit:contain; }
.post-detail-edited-time {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-text-dim);
  opacity: 0.82;
}
.post-detail-id {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-text-dim);
  opacity: 0.88;
}

.post-detail-actions {
  position: fixed;
  right: max(24px, calc((100vw - 800px) / 2 - 76px));
  top: calc(var(--nav-height, 52px) + 112px);
  z-index: 20;
  display:flex;
  flex-direction: column;
  align-items:center;
  gap:10px;
}
.post-action-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  width:48px; height:48px; padding:0;
  border:1px solid var(--color-border); border-radius:999px;
  background:var(--color-surface); color:var(--color-text-dim);
  font-size:11px; font-weight:700; cursor:pointer;
  box-shadow:0 10px 28px rgba(0,0,0,0.22);
  transition:border-color .2s, color .2s, background .2s, transform .2s, box-shadow .2s;
  font-family:inherit; flex-direction:column;
  -webkit-tap-highlight-color: transparent;
}
.post-action-btn:hover { border-color:var(--color-primary); color:var(--color-primary); transform:translateY(-1px); }
.post-action-btn:active { transform:scale(0.96); }
.post-action-btn:disabled { opacity:0.5; cursor:not-allowed; pointer-events:none; }
.post-action-btn img { width:16px; height:16px; object-fit:contain; filter:var(--detail-icon-filter, invert(1)); opacity:0.88; transition:opacity .2s, transform .35s cubic-bezier(.25,.8,.25,1), filter .2s; }
.post-action-btn:hover img { opacity:1; animation:favoritesPop .5s ease; }
.post-action-btn.liked { background:rgba(255,255,255,0.9); border-color:var(--color-primary); color:var(--color-primary-ink); }
.post-action-btn.liked img { filter:invert(0); opacity:1; }
.post-comment-jump { cursor:pointer; }
.post-delete-icon { font-size:19px; line-height:14px; font-weight:800; }
.post-edit-icon { font-size:18px; line-height:14px; font-weight:800; }
.post-report-icon { font-size:18px; line-height:14px; font-weight:900; }

.post-comment-section {
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid rgba(255,255,255,.08);
}
.post-comment-title {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  font-weight:900;
  margin:0 0 18px;
  letter-spacing:.02em;
}
.post-comment-title::before {
  content:'';
  width:4px;
  height:18px;
  border-radius:999px;
  background:var(--color-primary);
}
.post-comment-input {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  margin-bottom:24px;
  align-items:end;
  padding:10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:#202022;
}
.post-comment-input:focus,
.post-comment-input:focus-within {
  outline:none;
  border-color:rgba(255,255,255,.22);
}
.post-comment-editor {
  position:relative; overflow:visible !important;
  min-height:118px; background:#222224; color:var(--color-text);
  border-radius:14px; box-sizing:border-box;
}
.post-comment-editor.ql-container {
  border:1px solid rgba(255,255,255,.1) !important;
  font-family:inherit;
  transition:border-color .2s, background .2s;
  outline:none !important;
}
.post-comment-editor.ql-container:focus-within {
  border-color:rgba(255,255,255,.26) !important;
  box-shadow:none !important;
  outline:none !important;
  background:#222224;
}
.post-comment-editor .ql-editor { min-height:82px; padding:14px 15px 46px; font-size:14px; line-height:1.7; color:var(--color-text); outline:none !important; box-shadow:none !important; }
.post-comment-editor .ql-editor:focus,
.post-comment-editor .ql-editor:focus-visible {
  outline:none !important;
  box-shadow:none !important;
}
.post-comment-editor .ql-editor.ql-blank::before { color:rgba(255,255,255,.45); font-style:normal; left:15px; right:15px; }
.post-comment-editor .ql-toolbar.ql-snow {
  position:absolute; left:0; right:0; bottom:0; z-index:2;
  display:flex; align-items:center; gap:2px; border:none !important;
  border-top:1px solid rgba(255,255,255,.1) !important;
  background:#29292b !important; padding:7px 10px; border-radius:0 0 14px 14px;
}
.post-comment-editor .ql-toolbar.ql-snow button {
  border-radius:8px;
  transition:background .2s;
  box-shadow:none !important;
  filter:none !important;
  text-shadow:none !important;
}
.post-comment-editor .ql-toolbar.ql-snow button svg,
.post-comment-editor .ql-toolbar.ql-snow button .ql-stroke,
.post-comment-editor .ql-toolbar.ql-snow button .ql-fill {
  filter:none !important;
  text-shadow:none !important;
  box-shadow:none !important;
}
.post-comment-editor .ql-toolbar.ql-snow button:hover { background:rgba(255,255,255,.09); }
.post-comment-editor .ql-snow .ql-stroke { stroke:var(--color-text-dim); }
.post-comment-editor .ql-snow .ql-fill { fill:var(--color-text-dim); }
.post-comment-editor .ql-snow.ql-toolbar button:hover .ql-stroke,
.post-comment-editor .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke:var(--color-primary); }
.post-comment-editor .ql-snow.ql-toolbar button:hover .ql-fill,
.post-comment-editor .ql-snow.ql-toolbar button.ql-active .ql-fill { fill:var(--color-primary); }
.post-comment-text p,
.post-comment-text ol,
.post-comment-text ul,
.post-comment-text blockquote { margin:0 0 6px; }
.post-comment-text blockquote {
  border-left:3px solid var(--color-primary);
  padding-left:10px;
  color:var(--color-text-dim);
}
.post-comment-input button {
  align-self:end;
  height:42px; padding:0 20px; background:var(--color-primary); color:var(--color-primary-ink);
  border:1px solid rgba(255,255,255,.18); border-radius:12px; font-size:14px; font-weight:800; cursor:pointer;
  flex-shrink:0; transition:background .2s, border-color .2s, color .2s;
  box-shadow:none;
}
.post-comment-input button:hover { background:#e8e8e8; border-color:#fff; }
.post-comment-input button:focus-visible { outline:2px solid var(--color-text); outline-offset:2px; }
.post-comment-input button:active { background:#d6d6d6; }
.post-comment-input button:disabled { opacity:.55; cursor:not-allowed; box-shadow:none; }

.post-comment-list { display:flex; flex-direction:column; gap:12px; }

.post-comment-item {
  display:flex;
  gap:12px;
  padding:14px;
  border:1px solid transparent;
  border-radius:16px;
  background:var(--post-comment-card-bg);
  box-shadow:0 10px 28px rgba(0,0,0,.14);
  transition:border-color .2s, background .2s, transform .2s;
}
.post-comment-item:hover {
  border-color:transparent;
  background:var(--post-comment-card-bg);
}
.post-comment-avatar {
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  flex-shrink:0;
  cursor:pointer;
  border:1px solid rgba(255,255,255,.12);
}
.post-comment-body { flex:1; min-width:0; }
.post-comment-head { display:flex; align-items:center; gap:8px; margin-bottom:7px; min-height:24px; }
.post-comment-author {
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-width:0;
}
.post-comment-name { font-size:14px; font-weight:800; color:var(--color-text); cursor:pointer; }
.post-comment-name:hover { color:var(--color-accent); }
.post-comment-author .level-badge {
  margin-left:0;
  transform:none;
}
.post-comment-time { font-size:12px; color:rgba(255,255,255,.42); }
.post-comment-spacer { flex:1; min-width:8px; }
.post-comment-text { font-size:14px; line-height:1.75; color:rgba(255,255,255,.88); word-break:break-word; }
.post-comment-text img { max-width:100%; border-radius:10px; }
.post-comment-row { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-top:10px; }
.post-comment-like-btn {
  display:inline-flex; align-items:center; gap:5px; height:28px; min-width:48px;
  padding:0 10px; border:1px solid rgba(255,255,255,.1); border-radius:999px;
  background:rgba(255,255,255,.025); color:var(--color-text-dim); cursor:pointer; transition:all .2s;
}
.post-comment-like-btn:hover { color:var(--color-text); border-color:rgba(255,255,255,.24); background:rgba(255,255,255,.055); }
.post-comment-like-btn img { width:13px; height:13px; filter:invert(1); opacity:.72; }
.post-comment-like-btn.liked { color:var(--color-primary-ink); border-color:var(--color-primary); background:rgba(255,255,255,.9); }
.post-comment-like-btn.liked img { filter:invert(0); opacity:1; }
.post-comment-reply-btn {
  height:28px; padding:0 12px; border:1px solid rgba(255,255,255,.1); border-radius:999px;
  background:rgba(255,255,255,.025); color:var(--color-text-dim); cursor:pointer; transition:all .2s;
  font-size:12px; font-weight:600;
}
.post-comment-reply-btn:hover { color:var(--color-text); border-color:rgba(255,255,255,.24); background:rgba(255,255,255,.055); }
.post-comment-reply-to {
  font-size:12px;
  color:#ff7b87;
  cursor:pointer;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
}
.post-comment-replies {
  margin-top:12px;
  padding-left:14px;
  border-left:1px solid rgba(255,255,255,.35);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.post-comment-replies .post-comment-item {
  padding:12px;
  border-radius:14px;
  background:var(--post-comment-card-bg);
  box-shadow:none;
}
.post-comment-level-2 { border-bottom:none; }
.post-comment-action-btn {
  font-size:10px; width:25px; height:25px; padding:0; margin-left:8px;
  border:1px solid rgba(255,255,255,.11); background:rgba(255,255,255,.02);
  color:var(--color-text-dim, #aaa); border-radius:50%; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; transition:all .25s ease;
}
.post-comment-action-btn:hover { color:var(--color-text, #fff); border-color:rgba(255,255,255,.28); background:rgba(255,255,255,.06); }
.post-comment-action-btn:active { transform:none; }
.post-comment-action-btn.reported { color:#f0ad4e; border-color:#f0ad4e; cursor:default; opacity:0.6; }
.post-comment-action-btn:disabled { cursor:default; pointer-events:none; }
.post-comment-empty {
  text-align:center; color:var(--color-text-dim); padding:34px 18px;
  border:1px dashed rgba(255,255,255,.12); border-radius:16px;
  background:rgba(255,255,255,.025);
}
.post-comment-error { color:var(--color-error, #e74c3c); }
.post-comment-error a { color:var(--color-primary); text-decoration:underline; }
.post-reply-hint {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom:12px; padding:10px 14px; border:1px solid rgba(255,255,255,.35);
  border-radius:14px; background:rgba(255,255,255,.09); color:var(--color-text-dim);
  font-size:13px;
}
.post-reply-hint button {
  border:0; background:transparent; color:var(--color-primary); cursor:pointer; font-weight:700;
}



.post-detail-content figure { margin: 18px 0; text-align: center; }
.post-detail-content figure img { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto; }
.post-detail-content figure figcaption { margin-top: 8px; font-size: 13px; color: var(--color-text-dim); text-align: center; }
.post-detail-content figure figcaption:empty { display: none; }

@media (max-width: 640px) {
  .post-detail-page { padding: 28px 16px 70px; }
  .post-detail-actions {
    right: 14px;
    top: auto;
    bottom: 76px;
    gap: 8px;
  }
  .post-action-btn,
  .post-comment-jump { width:44px; height:44px; }
  .post-comment-section { margin-top:18px; }
  .post-comment-title { font-size:17px; }
  .post-comment-input { grid-template-columns:1fr; padding:10px; border-radius:16px; }
  .post-comment-editor { width:100%; }
  .post-comment-input button { width: 100%; }
  .post-comment-item { padding:12px; gap:10px; border-radius:14px; }
  .post-comment-avatar { width:32px; height:32px; }
  .post-comment-head { flex-wrap:wrap; gap:6px; }
  .post-comment-row { justify-content:flex-start; }
  .post-comment-replies { padding-left:10px; }
}


/* ====== 图片大图 ====== */
.image-lightbox {
  display:none; position:fixed; inset:0; z-index:3000;
  background:rgba(0,0,0,0.92); cursor:pointer;
  align-items:center; justify-content:center;
}
.image-lightbox.active { display:flex; }
.image-lightbox img {
  max-width:90vw; max-height:90vh;
  object-fit:contain; border-radius:4px;
  box-shadow:0 4px 40px rgba(0,0,0,0.5);
}
