/* 亮哥小窝 · 主站适配层
   把 ZL-FeiJi 频道的深色外观拉齐到 vip.92lg.cn 主站：
   同一套配色（#0a0e14 底 / #0f151d 面板 / #3ee0ff 青）、同一套圆角与描边。 */

html[data-theme="dark"] {
  --blue: #3ee0ff;
  --blue-soft: rgba(62, 224, 255, .10);
  --ink: #e9f1f9;
  --muted: #8496a9;
  --line: rgba(255, 255, 255, .07);
  --surface: #0f151d;
  --wall: #0a0e14;
  --radius: 18px;
}

html[data-theme="dark"] body {
  background: #080b11;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] .channel-shell {
  --wall: #0a0e14 !important;
  background-color: #0a0e14;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05);
  background-image: radial-gradient(rgba(120, 170, 210, .12) .75px, transparent .75px);
  background-size: 22px 22px;
}

html[data-theme="dark"] .wallpaper-custom::before { display: none; }
/* 去掉主题自带的纸飞机/星星壁纸，换成主站那种极淡点阵 */
html[data-theme="dark"] .channel-shell::before { background-image: none !important; display: none !important; }
html[data-theme="dark"] .message { max-width: 100%; padding: 16px 18px 12px; }
html[data-theme="dark"] .message-stream { padding: 22px 30px 26px; }

html[data-theme="dark"] .topbar {
  background: rgba(10, 14, 20, .86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] .identity-text strong { letter-spacing: -.2px; font-size: 17px; }
html[data-theme="dark"] .channel-status { color: var(--muted); }
html[data-theme="dark"] .icon-button { color: var(--muted); }
html[data-theme="dark"] .icon-button:hover { color: var(--blue); }

.theme-toggle { display: none !important; }

html[data-theme="dark"] .message {
  background: #0f151d;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .32);
}
html[data-theme="dark"] .message-title a { color: #e9f1f9; letter-spacing: -.3px; }
html[data-theme="dark"] .message-title a:hover { color: var(--blue); }
html[data-theme="dark"] .message-content { color: #ccd7e2; line-height: 1.95; font-size: 15px; }
html[data-theme="dark"] .message-content img { border-radius: 16px; }
html[data-theme="dark"] .message-content a { color: var(--blue); }
html[data-theme="dark"] .message-meta { color: #5d6e80; }
html[data-theme="dark"] .message-time, html[data-theme="dark"] .message-meta time { color: #5d6e80; }

html[data-theme="dark"] .date-marker span {
  background: rgba(62, 224, 255, .09);
  color: #7fe6ff;
  box-shadow: inset 0 0 0 1px rgba(62, 224, 255, .2);
}
html[data-theme="dark"] .reaction-chip { background: rgba(255, 255, 255, .03); color: #8ea6b8; box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="dark"] .reaction-chip.selected { background: rgba(62, 224, 255, .13); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(62, 224, 255, .3); }

html[data-theme="dark"] .comment-bubble {
  background: rgba(255, 255, 255, .035);
  border-radius: 14px 14px 14px 5px;
  box-shadow: inset 0 0 0 1px var(--line);
}
html[data-theme="dark"] .comment-heading { color: #7fe6ff; }
html[data-theme="dark"] .comment-text { color: #ccd7e2; }
html[data-theme="dark"] .comment-foot { color: #5d6e80; }
html[data-theme="dark"] .comment-reply a { color: #6d9fbd; }
html[data-theme="dark"] .comment-reply a:hover { color: var(--blue); }

html[data-theme="dark"] .composer,
html[data-theme="dark"] .respond,
html[data-theme="dark"] .guest-bar,
html[data-theme="dark"] .comment-dock {
  background: rgba(12, 17, 24, .94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] .composer-row textarea,
html[data-theme="dark"] .comment-input-row textarea,
html[data-theme="dark"] .guest-fields input {
  background: #0b1017;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .send-button { background: #3ee0ff; color: #04202a; }
html[data-theme="dark"] .send-button:disabled { opacity: .35; }

html[data-theme="dark"] .page-navigator a {
  background: #0f151d;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .page-navigator a:hover { color: var(--blue); box-shadow: inset 0 0 0 1px rgba(62, 224, 255, .3); }

html[data-theme="dark"] .modal { background: #121a23; color: var(--ink); border-radius: 20px; }
html[data-theme="dark"] .menu-popover { background: #121a23; border-radius: 16px; }
html[data-theme="dark"] .pinned-bar { background: rgba(12, 17, 24, .94); border-bottom-color: var(--line); }
html[data-theme="dark"] .history-nav a { background: rgba(255, 255, 255, .04); color: #8ab4d0; }
html[data-theme="dark"] .jump-latest { background: #121a23; color: #8ea6b8; }

/* ---- 主站导航条（插在频道顶栏上方） ---- */
.site-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 30px 4px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e9f1f9 !important;
  font-weight: 800;
  letter-spacing: .01em;
  flex: 0 0 auto;
}
.site-brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.site-brand b { font-size: 15px; }
.site-brand span {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9px;
  letter-spacing: .18em;
  color: #5d6e80;
  margin-left: 2px;
}
.site-nav { margin-left: auto; display: flex; gap: 6px; }
.site-nav a {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #8496a9;
  transition: color .18s, background .18s;
}
.site-nav a:hover { color: #3ee0ff; background: rgba(62, 224, 255, .07); }
.site-nav a.on { color: #3ee0ff; background: rgba(62, 224, 255, .1); }

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 30px 26px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  margin-top: 8px;
  color: #5d6e80;
  font-size: 12px;
  flex-wrap: wrap;
}
.site-foot nav { display: flex; gap: 14px; }
.site-foot a { color: #8496a9; }
.site-foot a:hover { color: #3ee0ff; }

@media (max-width: 640px) {
  .site-bar { padding: 12px 16px 2px; }
  .site-brand span { display: none; }
  .site-nav { gap: 2px; }
  .site-nav a { padding: 6px 9px; font-size: 12.5px; }
  .site-foot { padding: 16px 16px 24px; font-size: 11.5px; }
}

/* ---- 整页滚动：去掉 App 式内嵌滚动窗，改成跟主站一样的页面滚动 ---- */
html[data-theme="dark"] .channel-shell {
  height: auto !important;
  min-height: calc(100dvh - 32px) !important;
  top: 0 !important;
  overflow: visible !important;
  border-radius: 20px;
}
html[data-theme="dark"] .message-stream {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
html[data-theme="dark"] .jump-latest { display: none !important; }

@media (max-width: 720px) {
  html[data-theme="dark"] .channel-shell {
    margin: 8px auto 18px;
    min-height: 0 !important;
    border-radius: 16px;
  }
  html[data-theme="dark"] .message-stream { padding: 14px 12px 22px; }
  html[data-theme="dark"] .message { padding: 14px 14px 10px; }
}

/* ---- 评论区（文章页）在大屏下更像主站 ---- */
html[data-theme="dark"] .comment-list { display: block; margin: 4px auto 0; max-width: 840px; padding: 0 6px; }
html[data-theme="dark"] .comment-row { margin: 14px 0; gap: 10px; }
html[data-theme="dark"] .comment-row > .avatar { width: 34px; height: 34px; font-size: 12px; }
html[data-theme="dark"] .comment-bubble { max-width: min(86%, 620px); padding: 11px 14px 8px; }
html[data-theme="dark"] .comment-heading { font-size: 12px; }
html[data-theme="dark"] .comment-heading time { color: #5d6e80; }
html[data-theme="dark"] .comment-text img { max-height: 300px; width: auto; max-width: 100%; border-radius: 12px; }
html[data-theme="dark"] .comment-foot { font-size: 10px; color: #5d6e80; }

/* 文章页正文卡与评论区之间的呼吸感 */
html[data-theme="dark"] .comment-section,
html[data-theme="dark"] section#comments { margin-top: 26px; }

/* 评论区整体收进一张卡片，避免左窄气泡悬空 */
html[data-theme="dark"] .comment-list {
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 18px;
  padding: 16px 20px 10px;
}
html[data-theme="dark"] .site-foot { margin-top: 22px; }

@media (max-width: 560px) {
  html[data-theme="dark"] .guest-fields label { min-width: 100%; }
  html[data-theme="dark"] .comment-list { padding: 12px 12px 6px; border-radius: 16px; }
  html[data-theme="dark"] .comment-bubble { max-width: calc(100% - 40px); }
}

/* 气泡改成整行回复条，更接近论坛/主站的阅读感 */
html[data-theme="dark"] .comment-row { align-items: flex-start; }
html[data-theme="dark"] .comment-bubble {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 44px);
  border-radius: 14px;
}
