/* ================== 浮动状态栏容器 ================== */
.rel-panel {
  position: fixed;
  right: 20px;
  top: 40%;
  transform: translateY(-50%);
  z-index: 9999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
}

/* 隐藏原始复选框，仅用于控制显示/隐藏 */
.rel-panel-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ================== 右侧中侧小悬浮窗（折叠状态） ================== */
.rel-panel-fab {
  background-color: #ffffff;
  color: #333333;
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #e3e3e3;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

/* 悬浮窗 hover 效果 */
.rel-panel-fab:hover {
  transform: translateX(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  background-color: #f9f9f9;
}

/* 让整个区域可点：用兄弟选择器关联 checkbox 与 fab */
.rel-panel-toggle + .rel-panel-fab {
  user-select: none;
}

/* 勾选时小悬浮窗高亮 */
.rel-panel-toggle:checked + .rel-panel-fab {
  background-color: #ffffff;
  color: #111111;
  box-shadow: 0 0 0 1px #d0d0d0, 0 10px 28px rgba(0, 0, 0, 0.18);
}

/* ================== 中央放大面板（展开状态） ================== */
.rel-panel-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

/* 选中时显示模态层 */
.rel-panel-toggle:checked ~ .rel-panel-modal {
  display: flex;
}

/* 半透明背景层 */
.rel-panel-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(2px);
}

/* 中间白色内容卡片 */
.rel-panel-content {
  position: relative;
  background-color: #ffffff;
  color: #222222;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  padding: 20px 24px;
  border-radius: 18px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow-y: auto;
  box-sizing: border-box;
}

/* 标题样式 */
.rel-panel-content h3 {
  margin: 10px 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #222222;
}

/* 文本行样式 */
.rel-panel-content p {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-all;
}

/* 滚动条美化 */
.rel-panel-content::-webkit-scrollbar {
  width: 8px;
}

.rel-panel-content::-webkit-scrollbar-track {
  background: #f4f4f4;
  border-radius: 999px;
}

.rel-panel-content::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 999px;
}

.rel-panel-content::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* ================== 响应式：小屏优化 ================== */
@media (max-width: 768px) {
  .rel-panel {
    right: 12px;
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .rel-panel-fab {
    padding: 8px 14px;
    font-size: 13px;
  }

  .rel-panel-content {
    max-width: 100%;
    max-height: 85vh;
    padding: 16px 16px 18px;
    border-radius: 14px;
  }

  .rel-panel-content h3 {
    font-size: 15px;
  }

  .rel-panel-content p {
    font-size: 13px;
  }
}