/* 消息中心 · 共用样式
   三个前台页面（创作台 / 手机首页 / 会员中心）共用，
   全部 .sdn- 前缀，避免和页面自身的 .top / .btn 之类撞车。 */

.sdn-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035);
  color: #a1a2ab; cursor: pointer; transition: .16s;
}
.sdn-bell:hover { color: #f4f4f6; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07); }
.sdn-bell svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sdn-bell.has-unread { color: #fbbf24; border-color: rgba(251,191,36,.34); background: rgba(251,191,36,.1); }
.sdn-bell.sdn-ring { animation: sdn-ring .6s ease; }
@keyframes sdn-ring {
  0%,100% { transform: rotate(0); }
  20% { transform: rotate(-14deg); }
  45% { transform: rotate(11deg); }
  70% { transform: rotate(-6deg); }
}
.sdn-dot {
  position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px;
  display: none; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 600; line-height: 1; color: #1a1206;
  background: #fbbf24; border-radius: 8px; border: 1.5px solid #0a0a0c;
}
.sdn-dot.on { display: flex; }

/* 遮罩 + 抽屉 */
.sdn-mask {
  position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sdn-mask.on { opacity: 1; pointer-events: auto; }
.sdn-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9999;
  width: min(400px, 100vw); display: flex; flex-direction: column;
  background: #0c0c10; border-left: 1px solid rgba(255,255,255,.08);
  box-shadow: -18px 0 48px rgba(0,0,0,.45);
  transform: translateX(102%); transition: transform .24s cubic-bezier(.32,.72,.32,1);
  color: #f4f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.sdn-panel.on { transform: none; }
.sdn-head {
  flex: 0 0 auto; padding: 15px 16px 0; display: flex; align-items: center; gap: 10px;
}
.sdn-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.sdn-head .sdn-count {
  font-size: 11px; color: #fbbf24; background: rgba(251,191,36,.13);
  border: 1px solid rgba(251,191,36,.24); border-radius: 20px; padding: 1px 7px;
}
.sdn-head .sdn-sp { flex: 1; }
.sdn-act {
  font-size: 12px; color: #a1a2ab; padding: 5px 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent; background: none; transition: .15s;
}
.sdn-act:hover { color: #f4f4f6; background: rgba(255,255,255,.06); }
.sdn-close { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #8b8c96; }
.sdn-close:hover { background: rgba(255,255,255,.07); color: #fff; }
.sdn-close svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.8; fill: none; }

.sdn-tabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 12px 14px 10px; overflow-x: auto; }
.sdn-tabs::-webkit-scrollbar { display: none; }
.sdn-tab {
  flex: 0 0 auto; font-size: 12.5px; padding: 5px 11px; border-radius: 8px; cursor: pointer;
  color: #93949e; background: rgba(255,255,255,.04); border: 1px solid transparent; transition: .15s;
}
.sdn-tab:hover { color: #e6e6ea; }
.sdn-tab.on { color: #fbbf24; background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.26); }
.sdn-tab b { font-weight: 600; margin-left: 4px; font-size: 11px; opacity: .75; }

.sdn-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.sdn-list::-webkit-scrollbar { width: 6px; }
.sdn-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sdn-item {
  position: relative; display: flex; gap: 11px; padding: 12px 10px; border-radius: 10px;
  cursor: pointer; transition: background .14s;
}
.sdn-item:hover { background: rgba(255,255,255,.045); }
.sdn-item + .sdn-item { margin-top: 2px; }
.sdn-ico {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
}
.sdn-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sdn-body { min-width: 0; flex: 1; }
.sdn-title {
  font-size: 13px; font-weight: 500; line-height: 1.45; color: #ececf1;
  display: flex; align-items: center; gap: 6px;
}
.sdn-item.unread .sdn-title { color: #fff; }
.sdn-title span.sdn-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdn-tag {
  flex: 0 0 auto; font-size: 9.5px; padding: 0 4px; border-radius: 4px; line-height: 15px;
  color: #fbbf24; background: rgba(251,191,36,.13); border: 1px solid rgba(251,191,36,.22);
}
.sdn-text {
  margin-top: 3px; font-size: 12px; line-height: 1.6; color: #8e8f99;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.sdn-meta { margin-top: 5px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: #5f606a; }
.sdn-meta .sdn-k { color: #6b6c76; }
.sdn-unread-dot {
  position: absolute; top: 15px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #fbbf24;
}
.sdn-empty { padding: 64px 20px; text-align: center; color: #5f606a; }
.sdn-empty svg { width: 34px; height: 34px; stroke: #3a3b44; stroke-width: 1.4; fill: none; margin-bottom: 10px; }
.sdn-empty p { margin: 0; font-size: 12.5px; }
.sdn-foot {
  flex: 0 0 auto; padding: 10px 16px 14px; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 11.5px; color: #5f606a;
}
.sdn-foot a { color: #8b8c96; text-decoration: none; }
.sdn-foot a:hover { color: #fbbf24; }

/* 右下角浮出提示 */
.sdn-toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none;
}
.sdn-toast {
  pointer-events: auto; width: 306px; max-width: calc(100vw - 36px);
  display: flex; gap: 10px; padding: 11px 12px; cursor: pointer;
  background: rgba(20,20,25,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px; box-shadow: 0 12px 34px rgba(0,0,0,.5);
  transform: translateY(10px); opacity: 0; transition: .22s;
  color: #ececf1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.sdn-toast.on { transform: none; opacity: 1; }
.sdn-toast .sdn-ico { width: 28px; height: 28px; border-radius: 8px; }
.sdn-toast .sdn-t { font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.sdn-toast .sdn-d { font-size: 11.5px; color: #8e8f99; margin-top: 2px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 640px) {
  .sdn-panel { width: 100%; border-left: none; }
  .sdn-toasts { right: 10px; left: 10px; bottom: 82px; align-items: stretch; }
  .sdn-toast { width: auto; max-width: none; }
}

/* ── 消息详情弹窗（1.9.20）──
   列表正文只显示两行，公告这类长文案必须能看全文；有跳转目标的再给一个按钮 */
.sdn-dmodal { position: fixed; inset: 0; z-index: 10001; display: none; }
.sdn-dmodal.on { display: block; }
.sdn-dmask {
  position: absolute; inset: 0; background: rgba(0,0,0,.62);
  opacity: 0; transition: opacity .18s;
}
.sdn-dmodal.on .sdn-dmask { opacity: 1; }
.sdn-dcard {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98);
  width: min(520px, calc(100vw - 32px)); max-height: min(76vh, 640px);
  display: flex; flex-direction: column;
  background: #101014; border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .18s, transform .18s cubic-bezier(.32,.72,.32,1);
  color: #f4f4f6; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.sdn-dmodal.on .sdn-dcard { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.sdn-dhead {
  flex: 0 0 auto; display: flex; align-items: flex-start; gap: 11px;
  padding: 16px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.sdn-dico {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
}
.sdn-dico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sdn-dht { flex: 1; min-width: 0; }
.sdn-dht h4 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; word-break: break-word; }
.sdn-dsub {
  margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: #6b6c76;
}
.sdn-dbody {
  flex: 1; overflow-y: auto; padding: 14px 16px; font-size: 13px; line-height: 1.75; color: #c9cad2;
  white-space: normal; word-break: break-word;
}
.sdn-dbody::-webkit-scrollbar { width: 6px; }
.sdn-dbody::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.sdn-dbody p { margin: 0 0 10px; }
.sdn-dbody p:last-child { margin-bottom: 0; }
.sdn-dbody .sdn-dph { color: #5f606a; }
.sdn-dfoot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 9px;
  padding: 12px 16px 14px; border-top: 1px solid rgba(255,255,255,.07);
}
.sdn-dgo, .sdn-dok {
  font-size: 12.5px; padding: 8px 15px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #d5d6dd;
  transition: .15s; font-family: inherit;
}
.sdn-dok:hover { background: rgba(255,255,255,.09); color: #fff; }
.sdn-dgo {
  border-color: rgba(251,191,36,.32); background: rgba(251,191,36,.14); color: #fbbf24; font-weight: 500;
}
.sdn-dgo:hover { background: rgba(251,191,36,.22); color: #ffd166; }
@media (max-width: 640px) {
  .sdn-dcard { width: calc(100vw - 20px); max-height: 82vh; }
  .sdn-dfoot { padding: 10px 12px 12px; }
  .sdn-dgo, .sdn-dok { flex: 1; text-align: center; }
}

/* 条目右下角的「查看」箭头：告诉用户这一条点得动（1.9.20） */
.sdn-meta .sdn-chev {
  margin-left: auto; color: #494a53; font-size: 14px; line-height: 1;
  transition: color .15s, transform .15s;
}
.sdn-item:hover .sdn-meta .sdn-chev { color: #8b8c96; transform: translateX(2px); }
.sdn-item:focus-visible { outline: 2px solid rgba(251,191,36,.5); outline-offset: -2px; }
