/* 弹窗基础样式（必须加，否则不显示） */
.tool-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 997;
  display: none;
  overflow-y: auto;
}

.tool-overlay.active {
  display: block;
}

.tool-container {
  max-width: 800px;
  margin: 80px auto;
  padding: 30px 20px;
  color: #fff;
  font-family: sans-serif;
}

.tool-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
}

.tool-title {
  text-align: center;
  margin-bottom: 24px;
  font-size: 26px;
  color: #fff;
}

/* 弹幕区域 */
.danmaku-box {
  width: 100%;
  height: 360px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* 单个弹幕：无缝循环瀑布流 */
.danmaku-item {
  position: absolute;
  color: #fff;
  font-size: 16px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;

  left: 0;
  animation: danmaku-smooth 8s linear forwards;
  z-index: 10;
}

/* 悬浮暂停 */
.danmaku-item:hover {
  animation-play-state: paused !important;
  background: rgba(255,255,255,0.3);
}

/* 无缝左→右动画 */
@keyframes danmaku-smooth {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(calc(100vw + 100%));
  }
}

/* 点赞样式 */
.danmaku-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: 14px;
  color: #ffd740;
}
.danmaku-like button {
  background: transparent;
  border: none;
  color: #ffd740;
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
}

/* 输入框区域 */
.message-publish-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
}

.message-publish-box input,
.message-publish-box textarea {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 15px;
  outline: none;
  resize: none;
}

.message-publish-box textarea {
  min-height: 50px;
}

.message-publish-box button {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 215, 64, 0.2);
  border: 1px solid #ffd740;
  color: #ffd740;
  font-size: 16px;
  cursor: pointer;
}

.message-publish-box button:hover {
  background: rgba(255, 215, 64, 0.3);
}

/* 轻提示 */
.toast {
  position: fixed !important;
  top: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-10px) !important;
  width: auto !important;
  min-width: unset !important;
  max-width: 90% !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  z-index: 10000 !important;
  transition: all 0.3s ease !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.toast-success {
  background: #10b981 !important;
  color: #fff !important;
}

.toast-error {
  background: #f56565 !important;
  color: #fff !important;
}

.toast.show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* ==============================
🔥 统一所有弹窗：从上往下毛玻璃动画 + 最高层级 永远盖住导航栏
============================== */
.glass-overlay,
.tool-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999 !important; /* 保证盖住导航栏 */
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease !important;
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow-y: auto;
}

.glass-overlay.active,
.tool-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}