/* 站点通知悬浮按钮 — 与前台蓝白主题统一 */
.notice-float-wrap {
  position: fixed;
  right: 24px;
  top: calc(var(--header-height, 81px) + 16px);
  z-index: 1005;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.notice-float-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(145deg, #69b1ff 0%, var(--primary, #1890ff) 55%, var(--accent-dark, #0958d9) 100%);
  box-shadow:
    0 8px 24px rgba(24, 144, 255, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.25) inset,
    0 -3px 8px rgba(0, 0, 0, 0.12) inset;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
}

.notice-float-btn:hover,
.notice-float-btn:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 12px 32px rgba(24, 144, 255, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.3) inset,
    0 -3px 8px rgba(0, 0, 0, 0.12) inset;
  outline: none;
}

.notice-float-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.notice-bell-icon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.notice-float-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--danger, #ff4d4f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.45);
}

.notice-float-badge.hidden {
  display: none;
}

.notice-float-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(440px, calc(100vw - 48px));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(24, 144, 255, 0.12);
  overflow: hidden;
  transform-origin: top right;
  animation: noticePanelIn 0.22s ease-out;
}

.notice-float-panel.hidden {
  display: none;
}

@keyframes noticePanelIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notice-float-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(24, 144, 255, 0.12);
  background: linear-gradient(180deg, var(--primary-light, #e6f7ff) 0%, transparent 100%);
}

.notice-float-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary, #1890ff);
  letter-spacing: 0.02em;
}

.notice-float-panel-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
}

.notice-float-panel-close:hover {
  color: var(--primary, #1890ff);
  background: var(--accent-soft, rgba(24, 144, 255, 0.08));
}

.notice-float-panel-body {
  max-height: 420px;
  overflow-y: auto;
  padding: 10px 0;
  min-height: 200px;
}

.notice-float-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.notice-float-item:last-child {
  border-bottom: none;
}

.notice-float-item:hover {
  background: var(--accent-soft, rgba(24, 144, 255, 0.08));
}

.notice-float-item.is-unread .notice-float-item-title {
  font-weight: 600;
  color: var(--text, #333);
}

.notice-float-item.is-unread::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger, #ff4d4f);
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.22);
}

.notice-float-item-title {
  font-size: 15px;
  color: #334155;
  line-height: 1.5;
  display: inline;
}

.notice-float-item-time {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.notice-float-empty {
  padding: 48px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 15px;
}

.notice-float-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: #f8fafc;
}

.notice-float-page-btn {
  border: 1px solid var(--accent-border, rgba(24, 144, 255, 0.35));
  background: #fff;
  color: var(--primary, #1890ff);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.notice-float-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notice-float-page-btn:not(:disabled):hover {
  background: var(--accent-soft, rgba(24, 144, 255, 0.08));
  border-color: var(--primary, #1890ff);
}

.notice-float-page-info {
  font-size: 13px;
  color: #64748b;
}

.notice-content-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.notice-content-modal.hidden {
  display: none;
}

.notice-content-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.notice-content-modal-box {
  position: relative;
  width: min(640px, 100%);
  max-height: min(82vh, 680px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: noticeModalIn 0.25s ease-out;
}

@keyframes noticeModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notice-content-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 10px;
  background: linear-gradient(180deg, var(--primary-light, #e6f7ff) 0%, transparent 100%);
}

.notice-content-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary, #1890ff);
  line-height: 1.4;
}

.notice-content-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
  flex-shrink: 0;
}

.notice-content-modal-close:hover {
  color: var(--primary, #1890ff);
  background: var(--accent-soft, rgba(24, 144, 255, 0.08));
}

.notice-content-modal-time {
  padding: 0 24px 14px;
  font-size: 13px;
  color: #94a3b8;
}

.notice-content-modal-body {
  padding: 0 24px 28px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 768px) {
  .notice-float-wrap {
    right: 16px;
    top: calc(var(--header-height, 81px) + 10px);
    bottom: auto;
  }
  .notice-float-panel {
    right: -8px;
    width: min(360px, calc(100vw - 32px));
  }
  .notice-float-panel-body {
    max-height: 360px;
    min-height: 160px;
  }
  .notice-content-modal-box {
    width: min(100%, 100%);
    max-height: min(85vh, 640px);
  }
}
