/* ===== 留言页：弹幕 + 留言板 ===== */
.message-hero {
  position: relative;
  width: 100%;
  height: calc(100vh + 60px);
  min-height: 640px;
  max-height: 980px;
  overflow: hidden;
  background: #121420;
}
.message-hero-bg,
.message-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.message-hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 22, .25), rgba(8, 12, 24, .38) 55%, rgba(10, 12, 22, .78)),
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.05), transparent 50%);
}
.message-danmaku-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 90px;
  bottom: 120px;
  width: 100%;
  height: auto;
  z-index: 2;
}
.message-danmaku-head {
  position: absolute;
  top: -42px;
  left: 6%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.message-danmaku-head i { color: #f4b23d; font-size: 22px; }
.message-danmaku-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 2px; }
.message-danmaku-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.message-danmaku-item {
  position: absolute;
  left: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 460px;
  padding: 8px 14px 8px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.93);
  color: #202638;
  box-shadow: 0 4px 18px rgba(0,0,0,.24);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  animation-name: messageDanmakuMove;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.message-danmaku-item:hover { background: #fff; transform: translateY(-1px); }
.message-danmaku-item img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 26px; }
.message-danmaku-item span { overflow: hidden; text-overflow: ellipsis; }
@keyframes messageDanmakuMove {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 100%)); }
}
.message-danmaku-empty {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,.78);
  font-size: 14px;
}
.message-danmaku-form {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(440px, 92%);
  display: flex;
  gap: 9px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 26px rgba(0,0,0,.24);
  z-index: 4;
}
.message-danmaku-form input {
  flex: 1; min-width: 0;
  height: 38px; padding: 0 16px;
  border: 0; outline: none; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #222;
  font-size: 14px;
}
.message-danmaku-form button {
  flex: 0 0 auto;
  height: 38px; padding: 0 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #ff7a59, #ff4f79);
  font-size: 14px; font-weight: 700;
}
.message-danmaku-form button:disabled { opacity: .55; cursor: default; }

.message-page {
  --message-comment-bg: #f7f9fe;
  min-height: 60vh;
  padding: 40px 0 76px;
  background: var(--pz-bg);
  color: var(--pz-font);
}
.message-container {
  width: min(800px, 92%);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.message-container *,
.message-reply-dialog * { box-sizing: border-box; }
.message-composer-card,
.message-list-card {
  width: 100%; max-width: 760px;
  margin: 0 auto;
  overflow: visible;
  border: 0; border-radius: 0;
  background: transparent; box-shadow: none;
}
.message-composer-card { margin-bottom: 40px; }
.message-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 20px 0; color: #ffa500;
  font-size: 20px; font-weight: 700; line-height: 1.2;
}
.message-section-title i { font-size: 22px; }
.message-composer { display: flex; align-items: flex-start; justify-content: center; }
.message-user-avatar { display: none; }
.message-composer-main { position: relative; flex: 0 1 760px; min-width: 0; max-width: 760px; }
.message-composer textarea {
  display: block;
  width: 100%; height: 180px; min-height: 180px; resize: none;
  margin: 0 0 10px;
  padding: 15px; border: 1px solid #ddd; outline: none;
  border-radius: 4px;
  background-color: #fff;
  background-image: url('/static/assets/commentURL.png');
  background-repeat: no-repeat;
  background-position: 100% 50%;
  background-size: contain;
  color: #000; font-family: monospace; font-size: 14px; line-height: normal;
  transition: border-color .2s;
}
.message-reply-composer textarea {
  width: 100%; min-height: 150px; resize: none;
  padding: 14px 15px; border: 1px solid var(--pz-border2); outline: none;
  border-radius: 10px; background: color-mix(in srgb, var(--pz-card2) 92%, var(--pz-bg2));
  color: var(--pz-font); font-family: inherit; font-size: 14px; line-height: 1.75;
  transition: border-color .2s, box-shadow .2s;
}
.message-composer textarea:focus { border-color: #bbb; box-shadow: none; }
.message-reply-composer textarea:focus {
  border-color: var(--pz-theme);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pz-theme) 15%, transparent);
}
.message-editor-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 38px; margin: 0;
}
.message-editor-tools { display: flex; align-items: center; gap: 10px; }
.message-editor-tools button {
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px;
  background: transparent; color: var(--pz-grey); cursor: pointer; font-size: 20px;
  line-height: 24px;
}
.message-editor-tools button:hover { color: var(--pz-theme); }
.message-submit-btn {
  min-width: 60px; height: 38px; padding: 0 14px;
  border: 0; border-radius: 4px; cursor: pointer;
  background: #837bc7; color: #fff;
  font-size: 14px; font-weight: 400;
}
.message-submit-btn:disabled { opacity: .55; cursor: default; }
.message-emoji-panel {
  position: absolute; left: 0; bottom: 48px; z-index: 20;
  width: min(390px, 90vw);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  padding: 10px; border-radius: 10px;
  background: var(--pz-card2); border: 1px solid var(--pz-border2);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.message-emoji-panel button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 20px; padding: 3px; border-radius: 5px;
}
.message-emoji-panel button:hover { background: var(--pz-bg2); }
.message-image-preview { position: relative; display: inline-block; margin-top: 12px; }
.message-image-preview img {
  width: 118px; height: 86px; display: block; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--pz-border);
}
.message-image-preview button {
  position: absolute; right: -8px; top: -8px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; cursor: pointer;
}
.message-list-card { margin-top: 0; }
.message-list-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 20px; padding: 0;
  color: #797979; font-size: 16px;
}
.message-list-en { color: #ffa500; font-size: 1.15rem; font-weight: 400; letter-spacing: 0; }
.message-list-divider { padding: 0 5px; color: #b8b8b8; }
.message-list-head strong { color: #797979; font-size: 16px; font-weight: 700; }
.message-list { min-height: 180px; padding: 0; }
.message-item {
  display: flex; gap: 0;
  width: 100%; margin: 0 0 15px; padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.message-item:last-child { border-bottom: 0; }
.message-item-avatar {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 5px; object-fit: cover;
}
.message-item-main { min-width: 0; flex: 1; padding-left: 12px; }
.message-item-head,
.message-reply-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  min-height: 35px;
}
.message-user-meta { margin-top: -2px; }
.message-user-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.message-item-name,
.message-reply-name { color: #ef794f; font-weight: 600; }
.message-item-name { font-size: 16px; }
.message-reply-name { font-size: 14px; }
.message-level {
  padding: 1px 4px; border: 1px solid #67c23a; border-radius: 3.2px;
  background: transparent; color: #67c23a;
  font-size: 12px; line-height: normal; font-weight: 400; white-space: nowrap;
  vertical-align: 1px;
}
.message-level.admin { border-color: #67c23a; color: #67c23a; }
.message-level.small { font-size: 10px; }
.message-item-time,
.message-reply-time {
  margin-top: 2px; color: #797979; font-size: 12px; line-height: normal;
}
.message-reply-time { font-size: 10px; }
.message-reply-badge {
  flex: 0 0 auto; min-width: 36px; height: 22px; margin-left: 12px; padding: 0 6px;
  border: 0; border-radius: 3.2px; cursor: pointer;
  background: #ffa500; color: #fff; font-size: 12px; line-height: 22px;
}
.message-reply-badge:hover { background: #f09600; }
.message-content-box {
  margin: 10px 0 15px; padding: 15px;
  border-radius: 10px; background: var(--message-comment-bg);
  color: #000; font-size: 16px; line-height: normal;
  word-break: break-word;
}
.message-item-content,
.message-reply-content { color: inherit; font-size: inherit; line-height: inherit; }
.message-mention { color: #5b8def; font-weight: 400; }
.message-content-image {
  display: block; max-width: 360px; max-height: 260px; margin-top: 10px;
  border-radius: 9px; object-fit: cover; cursor: zoom-in;
}
.message-content-image.small { max-width: 260px; max-height: 200px; }
.message-replies { margin: 0; padding: 0; border: 0; background: transparent; }
.message-reply-item {
  display: flex; gap: 0; width: 100%;
  margin: 0; padding: 0; border: 0;
}
.message-reply-item > img {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 5px; object-fit: cover;
}
.message-reply-main { min-width: 0; flex: 1; padding-left: 12px; }
.message-reply-head .message-user-meta { margin-top: -4px; }
.message-reply-content { font-size: 16px; }
.message-reply-to { color: #797979; }
.reply-box { margin-top: 10px; }
.message-more-replies {
  display: block; margin: 0 0 12px; padding: 0;
  border: 0; background: transparent; color: #5b8def;
  cursor: pointer; font-size: 12px;
}
.message-empty { padding: 58px 0; text-align: center; color: var(--pz-grey2); }
.message-empty i { margin-right: 7px; font-size: 20px; vertical-align: -2px; }
.message-pagination { display: flex; justify-content: center; margin-bottom: 10px; padding: 4px 0 0; }
.message-file-input,
.message-csrf { display: none; }
.message-reply-dialog { border-radius: 14px !important; }
.message-reply-dialog .el-dialog__header { padding: 18px 22px 15px; border-bottom: 1px solid var(--pz-border); }
.message-reply-dialog .el-dialog__body { padding: 18px 22px; }
.message-reply-dialog .el-dialog__footer { padding: 0 22px 18px; }
.message-reply-composer { position: relative; }
.message-reply-dialog .message-emoji-panel { bottom: 48px; }
html.dark .message-page { --message-comment-bg: #d4d4d4; }
html.dark .message-section-title { color: #ffa500; }
html.dark .message-composer textarea {
  background-color: #1e1e1e;
  border-color: #4f4f4f;
  color: #e4e4e4;
}

@media (max-width: 768px) {
  .message-hero { height: 640px; min-height: 640px; }
  .message-danmaku-wrap { top: 82px; bottom: 104px; width: 100%; height: auto; }
  .message-danmaku-head { left: 3%; top: -40px; }
  .message-danmaku-stage { inset: 0; }
  .message-danmaku-item { max-width: 310px; padding: 6px 10px 6px 7px; font-size: 12px; }
  .message-danmaku-item img { width: 22px; height: 22px; flex-basis: 22px; }
  .message-danmaku-form { width: 94%; }
  .message-page { padding: 22px 0 55px; }
  .message-container { width: 94%; padding: 0; }
  .message-section-title { margin: 0 0 14px; font-size: 18px; }
  .message-composer-card { margin-bottom: 32px; }
  .message-composer { gap: 10px; }
  .message-composer textarea { height: 130px; min-height: 130px; }
  .message-list-head { margin-bottom: 16px; padding: 0; }
  .message-list { min-height: 120px; padding: 0; }
  .message-item { gap: 0; padding: 0; }
  .message-item-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .message-item-head { flex-wrap: nowrap; gap: 0; }
  .message-reply-badge { margin-left: 8px; }
  .message-reply-item > img { width: 30px; height: 30px; flex-basis: 30px; }
  .message-replies { margin-left: 0; padding-right: 0; }
  .message-content-box { padding: 12px; }
  .message-content-image { max-width: 100%; }
  .message-emoji-panel { grid-template-columns: repeat(6, 1fr); }
  .message-reply-dialog { width: 92% !important; }
}
