/* ============================================================
 * 南宫导航 · 发现页「朋友圈」样式
 * 紫色系毛玻璃；亮色默认，html[data-theme="dark"] 暗色；响应式
 * ============================================================ */

body.ng-skin #discoverView {
  --dc-card: rgba(255, 255, 255, .86);
  --dc-card-strong: #ffffff;
  --dc-border: rgba(15, 23, 42, .1);
  --dc-text: rgba(15, 23, 42, .92);
  --dc-sub: rgba(15, 23, 42, .6);
  --dc-faint: rgba(15, 23, 42, .42);
  --dc-input: rgba(15, 23, 42, .04);
  --dc-input-border: rgba(15, 23, 42, .14);
  --dc-primary: #8257c4;
  --dc-grad: linear-gradient(135deg, #9a6fe0, #6a3fb0);
}
html[data-theme="dark"] body.ng-skin #discoverView {
  --dc-card: rgba(255, 255, 255, .07);
  --dc-card-strong: rgba(255, 255, 255, .12);
  --dc-border: rgba(255, 255, 255, .12);
  --dc-text: rgba(255, 255, 255, .94);
  --dc-sub: rgba(255, 255, 255, .6);
  --dc-faint: rgba(255, 255, 255, .42);
  --dc-input: rgba(255, 255, 255, .08);
  --dc-input-border: rgba(255, 255, 255, .16);
}

/* 发布入口 */
.dc-composer {
  width: 100%; max-width: 720px; margin: 0 auto 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; box-sizing: border-box;
  border: 1px solid var(--dc-border); border-radius: 18px;
  background: var(--dc-card); color: var(--dc-text);
  backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 10px 26px rgba(20, 14, 38, .1);
  cursor: pointer; text-align: left; transition: transform .16s ease, box-shadow .16s ease;
}
.dc-composer:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(20, 14, 38, .16); }
.dc-composer__avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  color: #fff; font-size: 16px; font-weight: 800;
  background: var(--dc-grad); box-shadow: 0 6px 14px rgba(113, 73, 172, .32);
}
.dc-composer__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc-composer__avatar--fb { background: var(--dc-input); color: var(--dc-faint); box-shadow: none; }
.dc-composer__ph { flex: 1 1 auto; font-size: 14px; color: var(--dc-faint); }
.dc-composer__send {
  flex: 0 0 auto; padding: 8px 18px; border-radius: 999px;
  color: #fff; font-size: 13.5px; font-weight: 700;
  background: var(--dc-grad); box-shadow: 0 6px 14px rgba(113, 73, 172, .3);
}

/* feed */
.dc-feed { width: 100%; max-width: 720px; margin: 0 auto; display: block; }
.dc-state {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 46px 16px; color: var(--dc-sub); font-size: 13.5px;
}
.dc-state[hidden] { display: none; }
.dc-state__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.dc-state__empty strong { font-size: 15px; color: var(--dc-text); }
.dc-state__empty span { font-size: 12.5px; color: var(--dc-faint); }
.dc-state__empty .dc-loadmore__btn { margin-top: 12px; }
.dc-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--dc-border); border-top-color: var(--dc-primary);
  animation: dcSpin .8s linear infinite;
}
@keyframes dcSpin { to { transform: rotate(360deg); } }

/* 卡片 */
.dc-card {
  margin-bottom: 14px; padding: 18px 18px 12px;
  border: 1px solid var(--dc-border); border-radius: 20px;
  background: var(--dc-card); color: var(--dc-text);
  backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 10px 26px rgba(20, 14, 38, .08);
}
.dc-card__head { display: flex; align-items: center; gap: 11px; }
.dc-avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  font-size: 17px; font-weight: 800; color: #fff;
  background: var(--dc-grad);
}
.dc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc-avatar--fb { background: var(--dc-input); color: #b48cec; }
.dc-avatar--off { background: linear-gradient(135deg, #fff5e8, #ffe4cf); box-shadow: 0 4px 12px rgba(224, 123, 44, .28); }
.dc-avatar--off img { width: 72%; height: 72%; object-fit: contain; }
.dc-avatar--off svg { width: 22px; height: 22px; }
.dc-cmt__ava--off { background: linear-gradient(135deg, #f0a94b, #e07b2c); color: #fff; }
.dc-card__who { flex: 1 1 auto; min-width: 0; }
.dc-card__name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--dc-text); }
.dc-card__time { font-size: 11.5px; color: var(--dc-faint); margin-top: 2px; }
.dc-badge {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 1.6;
}
.dc-badge--off { color: #fff; background: linear-gradient(135deg, #f0a94b, #e07b2c); box-shadow: 0 3px 8px rgba(224, 123, 44, .3); }
.dc-badge--top { color: #fff; background: linear-gradient(135deg, #9a6fe0, #6a3fb0); box-shadow: 0 3px 8px rgba(106, 63, 176, .32); }
.dc-card--top { border-color: rgba(130, 87, 196, .42); box-shadow: 0 10px 28px rgba(106, 63, 176, .12); }
.dc-card__del {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  font-size: 11.5px; color: var(--dc-faint); padding: 3px 6px;
}
.dc-card__del:hover { color: #e06060; }
.dc-card__content {
  margin: 12px 0 4px; font-size: 15px; line-height: 1.7; color: var(--dc-text);
  white-space: pre-wrap; word-break: break-word;
}

/* 图片九宫格 */
.dc-imgs { display: grid; gap: 6px; margin: 12px 0 4px; }
.dc-imgs--1 { grid-template-columns: minmax(0, 1fr); max-width: 62%; }
.dc-imgs--2 { grid-template-columns: repeat(2, 1fr); max-width: 70%; }
.dc-imgs--4 { grid-template-columns: repeat(2, 1fr); max-width: 80%; }
.dc-imgs--n { grid-template-columns: repeat(3, 1fr); }
.dc-img {
  position: relative; display: block; width: 100%; margin: 0; padding: 0;
  border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  aspect-ratio: 1 / 1; background: var(--dc-input);
}
.dc-imgs--1 .dc-img { aspect-ratio: 4 / 3; max-height: 320px; }
.dc-imgs--2 .dc-img { aspect-ratio: 1 / 1; }
.dc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.dc-img:hover img { transform: scale(1.04); }

/* 操作栏 */
.dc-card__actions { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
.dc-act {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; cursor: pointer; padding: 5px 4px;
  color: var(--dc-faint); font-size: 13px; transition: color .16s ease, transform .12s ease;
}
.dc-act:active { transform: scale(.92); }
.dc-act__num { font-size: 12.5px; }
.dc-act.is-liked { color: #ec5b7c; }
.dc-act.is-active { color: var(--dc-primary); }

/* 评论区 */
.dc-comments { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--dc-border); }
.dc-cmtlist { display: flex; flex-direction: column; gap: 12px; }
.dc-cmtlist__empty { font-size: 12.5px; color: var(--dc-faint); padding: 2px 0 6px; }
.dc-cmt { display: flex; gap: 9px; }
.dc-cmt__ava {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 700;
  color: #fff; background: var(--dc-grad);
}
.dc-cmt__ava img { width: 100%; height: 100%; object-fit: cover; }
.dc-cmt__body { flex: 1 1 auto; min-width: 0; background: var(--dc-input); border-radius: 12px; padding: 8px 11px; }
.dc-cmt__name { font-size: 12.5px; font-weight: 700; color: var(--dc-primary); margin-right: 8px; }
.dc-cmt__text { font-size: 13.5px; line-height: 1.55; color: var(--dc-text); word-break: break-word; }
.dc-cmt__time { display: block; margin-top: 3px; font-size: 10.5px; color: var(--dc-faint); }
.dc-cmtinput { display: flex; gap: 8px; margin-top: 12px; }
.dc-cmtinput__field {
  flex: 1 1 auto; min-width: 0; padding: 10px 14px; box-sizing: border-box;
  border-radius: 999px; border: 1px solid var(--dc-input-border);
  background: var(--dc-input); color: var(--dc-text); font-size: 13.5px; outline: none;
}
.dc-cmtinput__field:focus { border-color: rgba(154, 111, 224, .7); box-shadow: 0 0 0 3px rgba(154, 111, 224, .16); }
.dc-cmtinput__send {
  flex: 0 0 auto; padding: 9px 18px; border: 0; border-radius: 999px;
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--dc-grad);
}

/* 加载更多 */
.dc-loadmore { width: 100%; max-width: 720px; margin: 4px auto 18px; text-align: center; }
.dc-loadmore[hidden] { display: none; }
.dc-loadmore__btn {
  padding: 10px 28px; border: 1px solid var(--dc-border); border-radius: 999px;
  background: var(--dc-card); color: var(--dc-sub); font-size: 13px; font-weight: 600; cursor: pointer;
}
.dc-loadmore__btn:hover { color: var(--dc-primary); border-color: rgba(154, 111, 224, .5); }

/* toast */
body.ng-skin .dc-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(16px);
  z-index: 420; max-width: min(88vw, 420px);
  padding: 11px 18px; border-radius: 14px;
  background: rgba(28, 22, 40, .92); color: #fff; font-size: 13.5px;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
  text-align: center; backdrop-filter: blur(10px);
}
.dc-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dc-toast.is-error { background: rgba(120, 30, 30, .94); }
.dc-toast.is-ok { background: rgba(20, 90, 60, .94); }

/* 发布弹窗（浅白毛玻璃） */
body.ng-skin .dc-modal { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 20px 14px; }
body.ng-skin .dc-modal.is-open { display: flex; }
.dc-modal__backdrop { position: absolute; inset: 0; background: rgba(20, 16, 32, .42); backdrop-filter: blur(7px); }
.dc-modal__panel {
  position: relative; z-index: 1; width: min(480px, 100%);
  max-height: min(72vh, 680px); display: flex; flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .88); border-radius: 22px;
  background: rgba(255, 255, 255, .86); color: #17131d;
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 26px 70px rgba(35, 25, 54, .22);
  animation: dcModalIn .24s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes dcModalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.dc-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(160, 145, 180, .24);
}
.dc-modal__head h3 { margin: 0; font-size: 16.5px; color: #17131d; }
.dc-modal__close {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e7e3ea;
  background: #f8f7f9; color: #5a4e65; font-size: 18px; cursor: pointer; line-height: 1;
}
.dc-modal__body { padding: 16px 18px 18px; overflow: auto; }
.dc-pub__textarea {
  width: 100%; box-sizing: border-box; min-height: 130px; resize: vertical;
  padding: 13px 14px; border-radius: 14px; border: 1px solid rgba(20, 16, 32, .14);
  background: rgba(20, 16, 32, .04); color: #17131d;
  font-size: 14.5px; font-family: inherit; line-height: 1.65; outline: none;
}
.dc-pub__textarea:focus { border-color: rgba(154, 111, 224, .7); box-shadow: 0 0 0 3px rgba(154, 111, 224, .18); }
.dc-pub__imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.dc-pub__img { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; }
.dc-pub__img img { width: 100%; height: 100%; object-fit: cover; }
.dc-pub__img button {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
}
.dc-pub__bar { display: flex; align-items: center; gap: 10px; }
.dc-pub__pick {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border: 1px solid rgba(20, 16, 32, .14); border-radius: 12px;
  background: rgba(20, 16, 32, .04); color: #4a4352; font-size: 13px; cursor: pointer;
}
.dc-pub__tip { font-size: 12px; color: rgba(23, 19, 29, .45); }
.dc-pub__submit {
  margin-left: auto; padding: 10px 26px; border: 0; border-radius: 12px;
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--dc-grad); box-shadow: 0 8px 18px rgba(113, 73, 172, .32);
}
.dc-pub__submit:disabled { opacity: .6; pointer-events: none; }
.dc-pub__note { margin: 10px 0 0; font-size: 11.5px; color: rgba(23, 19, 29, .45); }

/* 图片预览 */
body.ng-skin .dc-lightbox {
  position: fixed; inset: 0; z-index: 430;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10, 8, 18, .9); backdrop-filter: blur(6px); cursor: zoom-out;
  animation: dcFade .18s ease both;
}
@keyframes dcFade { from { opacity: 0; } to { opacity: 1; } }
.dc-lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.dc-lightbox__close {
  position: absolute; top: 18px; right: 20px; width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 22px; cursor: pointer;
}
body.ng-skin.dc-lock, body.ng-skin.dc-modal-open { overflow: hidden; }

/* 暗色：发布弹窗微调 */
html[data-theme="dark"] body.ng-skin .dc-modal__panel {
  background: rgba(38, 30, 52, .9); color: rgba(255, 255, 255, .94);
  border-color: rgba(255, 255, 255, .16);
}
html[data-theme="dark"] .dc-modal__head { border-bottom-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .dc-modal__head h3 { color: rgba(255, 255, 255, .94); }
html[data-theme="dark"] .dc-modal__close { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); }
html[data-theme="dark"] .dc-pub__textarea { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .94); }
html[data-theme="dark"] .dc-pub__pick { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .85); }
html[data-theme="dark"] .dc-pub__tip, html[data-theme="dark"] .dc-pub__note { color: rgba(255, 255, 255, .45); }

/* ---------------- 响应式：移动端更紧凑 ---------------- */
@media (max-width: 600px) {
  .dc-composer { padding: 10px 13px; border-radius: 16px; gap: 10px; }
  .dc-composer__avatar { flex-basis: 36px; width: 36px; height: 36px; }
  .dc-composer__ph { font-size: 13.5px; }
  .dc-composer__send { padding: 7px 15px; font-size: 12.5px; }
  .dc-card { padding: 14px 14px 10px; border-radius: 17px; }
  .dc-avatar { flex-basis: 40px; width: 40px; height: 40px; font-size: 15px; }
  .dc-card__name { font-size: 14px; }
  .dc-card__content { font-size: 14.5px; line-height: 1.65; }
  .dc-imgs--1 { max-width: 78%; }
  .dc-imgs--2 { max-width: 86%; }
  .dc-imgs--4 { max-width: 100%; }
  .dc-pub__imgs { grid-template-columns: repeat(3, 1fr); }
  .dc-modal__panel { width: calc(100vw - 28px); }
}
@media (prefers-reduced-motion: reduce) {
  .dc-modal__panel, .dc-lightbox { animation: none; }
  .dc-spinner { animation-duration: 1.4s; }
}
