:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --subtext: #4d4d4d;
  --border: #e5e5e5;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-heavy: 0 20px 48px rgba(0, 0, 0, 0.16);
  --overlay: rgba(0, 0, 0, 0.4);
  --accent: #0078d4;
  /* Windows 蓝 */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #dfe7f0 100%);
  color: var(--text);
  /* font-family: "MahooFont", Segoe UI, system-ui, -apple-system, Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; */
  font-family: "MahooFont";
  overflow: hidden;
}

#popup-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* 允许下层点击通过（初始 modal 期间被遮罩覆盖） */
}

/* 入场弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.modal {
  width: min(92vw, 520px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-heavy);
  text-align: left;
  overflow: hidden;
  animation: modal-appear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #f3f3f3;
  border-bottom: 1px solid var(--border);
}

.modal .titlebar .icon {
  font-size: 18px;
}

.modal .titlebar .title {
  font-weight: 700;
}

.modal .content {
  padding: 16px 16px 8px;
  color: var(--subtext);
}

.modal .actions {
  padding: 0 16px 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .2px;
  background: #f7f7f7;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: #0a6ecf;
}

.btn:hover {
  filter: brightness(0.98);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
}

.popup {
  position: absolute;
  width: fit-content;
  min-width: 80px;
  color: var(--text);
  background: #ffffff;
  border-radius: 7px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.08);
  font-size: 16px;
  line-height: 1.4;
  pointer-events: none;
  user-select: none;
  transform-origin: center;
  overflow: hidden;
}

.popup .header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f3f3f3;
  border-bottom: 1px solid var(--border);
}

.popup .header .icon {
  font-size: 12px;
}

.popup .header .title {
  font-weight: 800;
  font-size: 12px;
}

.popup .content {
  padding: 8px 32px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  opacity: 0.8;
}

.popup .content.center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12vh;
  /* width: min(200px, 80vw); */
  font-size: 30px;
}

/* 不同颜色主题的弹窗背景 */
.popup.theme-blue .header {
  background: #e3f2fd;
  border-bottom-color: #bbdefb;
}

.popup.theme-blue .content {
  background: #f1f8ff;
}

.popup.theme-green .header {
  background: #e8f5e9;
  border-bottom-color: #c8e6c9;
}

.popup.theme-green .content {
  background: #f1f8f4;
}

.popup.theme-orange .header {
  background: #fff3e0;
  border-bottom-color: #ffe0b2;
}

.popup.theme-orange .content {
  background: #fffaf3;
}

.popup.theme-purple .header {
  background: #f3e5f5;
  border-bottom-color: #e1bee7;
}

.popup.theme-purple .content {
  background: #faf5fc;
}

.popup.theme-pink .header {
  background: #fce4ec;
  border-bottom-color: #f8bbd0;
}

.popup.theme-pink .content {
  background: #fff0f5;
}

.popup.theme-yellow .header {
  background: #fffde7;
  border-bottom-color: #fff9c4;
}

.popup.theme-yellow .content {
  background: #fffef7;
}

.popup.theme-cyan .header {
  background: #e0f7fa;
  border-bottom-color: #b2ebf2;
}

.popup.theme-cyan .content {
  background: #f0fcff;
}

.popup.theme-lime .header {
  background: #f9fbe7;
  border-bottom-color: #f0f4c3;
}

.popup.theme-lime .content {
  background: #fdfef8;
}

.popup.theme-red .header {
  background: #ffebee;
  border-bottom-color: #ffcdd2;
}

.popup.theme-red .content {
  background: #fff5f5;
}

.popup.theme-teal .header {
  background: #e0f2f1;
  border-bottom-color: #b2dfdb;
}

.popup.theme-teal .content {
  background: #f0faf9;
}

.popup.theme-indigo .header {
  background: #e8eaf6;
  border-bottom-color: #c5cae9;
}

.popup.theme-indigo .content {
  background: #f3f4fb;
}

.popup.theme-amber .header {
  background: #fff8e1;
  border-bottom-color: #ffecb3;
}

.popup.theme-amber .content {
  background: #fffef5;
}

.popup.theme-rose .header {
  background: #fce4ec;
  border-bottom-color: #f8bbd0;
}

.popup.theme-rose .content {
  background: #fef5f8;
}

.popup.theme-mint .header {
  background: #e8f8f5;
  border-bottom-color: #c8ebe3;
}

.popup.theme-mint .content {
  background: #f5fcfa;
}

.popup.theme-peach .header {
  background: #fff0e5;
  border-bottom-color: #ffe0c7;
}

.popup.theme-peach .content {
  background: #fffaf5;
}

.popup.theme-lavender .header {
  background: #f0ebf8;
  border-bottom-color: #ddd0f0;
}

.popup.theme-lavender .content {
  background: #f9f6fc;
}

.popup.theme-coral .header {
  background: #ffe4e1;
  border-bottom-color: #ffc4bd;
}

.popup.theme-coral .content {
  background: #fff7f6;
}

.popup.theme-sky .header {
  background: #e1f5fe;
  border-bottom-color: #b3e5fc;
}

.popup.theme-sky .content {
  background: #f0fbff;
}

.popup.theme-lemon .header {
  background: #fffef0;
  border-bottom-color: #fff9c8;
}

.popup.theme-lemon .content {
  background: #fffffa;
}

@media (max-width: 640px) {
  .popup {
    max-width: 85vw;
    font-size: 13px;
  }

  .popup .content {
    font-size: 13px;
  }
}

/* 动画效果 */
@keyframes modal-appear {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 从上方弹出 */
@keyframes popup-from-top {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-60px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translateY(0);
  }

  80% {
    transform: scale(0.95) translateY(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 从下方弹出 */
@keyframes popup-from-bottom {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(60px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translateY(0);
  }

  80% {
    transform: scale(0.95) translateY(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 从左边弹出 */
@keyframes popup-from-left {
  0% {
    opacity: 0;
    transform: scale(0.3) translateX(-60px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translateX(0);
  }

  80% {
    transform: scale(0.95) translateX(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

/* 从右边弹出 */
@keyframes popup-from-right {
  0% {
    opacity: 0;
    transform: scale(0.3) translateX(60px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translateX(0);
  }

  80% {
    transform: scale(0.95) translateX(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

/* 从左上角弹出 */
@keyframes popup-from-topleft {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50px, -50px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translate(0, 0);
  }

  80% {
    transform: scale(0.95) translate(0, 0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
}

/* 从右上角弹出 */
@keyframes popup-from-topright {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(50px, -50px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translate(0, 0);
  }

  80% {
    transform: scale(0.95) translate(0, 0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
}

/* 从左下角弹出 */
@keyframes popup-from-bottomleft {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(-50px, 50px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translate(0, 0);
  }

  80% {
    transform: scale(0.95) translate(0, 0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
}

/* 从右下角弹出 */
@keyframes popup-from-bottomright {
  0% {
    opacity: 0;
    transform: scale(0.3) translate(50px, 50px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translate(0, 0);
  }

  80% {
    transform: scale(0.95) translate(0, 0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
}

/* 动画类 */
.anim-top {
  animation: popup-from-top 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-bottom {
  animation: popup-from-bottom 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-left {
  animation: popup-from-left 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-right {
  animation: popup-from-right 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-topleft {
  animation: popup-from-topleft 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-topright {
  animation: popup-from-topright 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-bottomleft {
  animation: popup-from-bottomleft 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.anim-bottomright {
  animation: popup-from-bottomright 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 右下角透明小球 */
#float-balls {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 10000;
}

.float-ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.float-ball span {
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.float-ball:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

.float-ball:active {
  transform: scale(0.95);
}

/* 小球出现动画 */
@keyframes ball-appear {
  0% {
    opacity: 0;
    transform: scale(0) translateX(100px);
  }

  60% {
    opacity: 1;
    transform: scale(1.15) translateX(0);
  }

  80% {
    transform: scale(0.9) translateX(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

#float-balls.show .float-ball {
  animation: ball-appear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#float-balls.show .float-ball:nth-child(2) {
  animation-delay: 0.15s;
}

@media (max-width: 640px) {
  #float-balls {
    right: 20px;
    bottom: 20px;
    gap: 10px;
  }

  .float-ball {
    width: 40px;
    height: 40px;
  }

  .float-ball span {
    font-size: 11px;
  }
}


/* 弹窗基础样式 */

.heart-icon {
  margin-right: 6px;
}

.popup-title {
  margin: 0;
  font-size: 15px;
  display: inline-block;
}

.popup-content {
  margin-top: 5px;
  font-size: 13px;
}

/* 主题样式示例 */
.theme-blue {
  background: #e6f4ff;
  color: #165DFF;
}

.theme-orange {
  background: #fff7e6;
  color: #FF7D00;
}

.theme-green {
  background: #f6ffed;
  color: #52C41A;
}

.theme-purple {
  background: #f9f0ff;
  color: #722ED1;
}

.theme-pink {
  background: #fff0f6;
  color: #EB2F96;
}

.theme-yellow {
  background: #fffbe6;
  color: #FAAD14;
}

.theme-cyan {
  background: #e6fffb;
  color: #13C2C2;
}

.theme-lime {
  background: #fcffe6;
  color: #A0D911;
}

.theme-red {
  background: #fff1f0;
  color: #F5222D;
}

.theme-teal {
  background: #e6f7f7;
  color: #14A8A8;
}

.theme-indigo {
  background: #f0f5ff;
  color: #2F54EB;
}

.theme-amber {
  background: #fffbe6;
  color: #FAAD14;
}

.theme-violet {
  background: #f9f0ff;
  color: #722ED1;
}

.theme-fuchsia {
  background: #fff0f6;
  color: #EB2F96;
}

.theme-rose {
  background: #fff1f0;
  color: #F5222D;
}

.theme-emerald {
  background: #f6ffed;
  color: #52C41A;
}

.theme-slate {
  background: #f0f2f5;
  color: #595959;
}

.theme-sky {
  background: #f0faff;
  color: #1890FF;
}

.theme-lemon {
  background: #fcffe6;
  color: #A0D911;
}

/* 动画样式示例 */
.anim-fade {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


element.style {
  left: 65px;
  top: 249px;
  transform: rotate(3deg);
  z-index: 519;
}

.anim-bottomright {
  animation: popup-from-bottomright 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@media (max-width: 640px) {
  .popup {
    min-width: min(80px, 85vw);
    font-size: 13px;
  }
}

/* 弹窗基础样式 */
.popup {
  position: fixed;
  /*padding: 12px 16px;*/
  border-radius: 8px;
  /*box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);*/
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  /*width: auto;*/
  /*max-width: 200px;*/
}

/* 头部样式（与内容区分颜色） */
.popup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-weight: 600;
  /* 头部颜色：主题色加深10% */
}

.popup-icon {
  font-size: 16px;
}

.popup-title {
  font-size: 15px;
}

/* 内容样式（比头部浅淡） */
.popup-content {
  font-size: 14px;
  /* 内容颜色：主题色减淡20%，增加透明度 */
  opacity: 0.9;
}

/* 马卡龙色系主题（头部+内容颜色区分） */
/* 蓝色系 */
.theme-blue {
  background: #e8f3ff;
}

.theme-blue .popup-header {
  color: #1048c9;
}

/* 头部：深蓝色 */
.theme-blue .popup-content {
  color: #165DFF;
}

/* 内容：标准蓝 */

/* 橙色系 */
.theme-orange {
  background: #fff4e5;
}

.theme-orange .popup-header {
  color: #e06c00;
}

/* 头部：深橙色 */
.theme-orange .popup-content {
  color: #FF7D00;
}

/* 内容：标准橙 */

/* 紫色系 */
.theme-purple {
  background: #f9f0ff;
}

.theme-purple .popup-header {
  color: #6020b0;
}

/* 头部：深紫色 */
.theme-purple .popup-content {
  color: #722ED1;
}

/* 内容：标准紫 */

/* 黄色系 */
.theme-yellow {
  background: #fffbe6;
}

.theme-yellow .popup-header {
  color: #d49a00;
}

/* 头部：深黄色 */
.theme-yellow .popup-content {
  color: #FAAD14;
}

/* 内容：标准黄 */

/* 天蓝色系 */
.theme-sky {
  background: #e6fffb;
}

.theme-sky .popup-header {
  color: #009688;
}

/* 头部：深天蓝 */
.theme-sky .popup-content {
  color: #00B42A;
}

/* 内容：标准天蓝 */

/* 柠檬绿系 */
.theme-lemon {
  background: #f0fff4;
}

.theme-lemon .popup-header {
  color: #2da690;
}

/* 头部：深柠檬绿 */
.theme-lemon .popup-content {
  color: #36CFC9;
}

/* 内容：标准柠檬绿 */

/* 粉色系 */
.theme-pink {
  background: #fce4ec;
}

.theme-pink .popup-header {
  color: #d81b60;
}

/* 头部：深粉色 */
.theme-pink .popup-content {
  color: #ec407a;
}

/* 内容：标准粉 */

/* 靛蓝色系 */
.theme-indigo {
  background: #e8eaf6;
}

.theme-indigo .popup-header {
  color: #4a57b0;
}

/* 头部：深靛蓝 */
.theme-indigo .popup-content {
  color: #5c6bc0;
}

/* 内容：标准靛蓝 */

/* 青绿色系 */
.theme-teal {
  background: #e0f2f1;
}

.theme-teal .popup-header {
  color: #1b8c79;
}

/* 头部：深青绿 */
.theme-teal .popup-content {
  color: #26a69a;
}

/* 内容：标准青绿 */

/* cyan色系 */
.theme-cyan {
  background: #e0f7fa;
}

.theme-cyan .popup-header {
  color: #008ba3;
}

/* 头部：深cyan */
.theme-cyan .popup-content {
  color: #00bcd4;
}

/* 内容：标准cyan */

/* 酸橙绿系 */
.theme-lime {
  background: #f7fbe7;
}

.theme-lime .popup-header {
  color: #75a439;
}

/* 头部：深酸橙绿 */
.theme-lime .popup-content {
  color: #8bc34a;
}

/* 内容：标准酸橙绿 */

/* 琥珀色系 */
.theme-amber {
  background: #fff8e1;
}

.theme-amber .popup-header {
  color: #e69138;
}

/* 头部：深琥珀色 */
.theme-amber .popup-content {
  color: #ffb74d;
}

/* 内容：标准琥珀色 */

/* 紫罗兰色系 */
.theme-violet {
  background: #f3e5f5;
}

.theme-violet .popup-header {
  color: #880e4f;
}

/* 头部：深紫罗兰 */
.theme-violet .popup-content {
  color: #9c27b0;
}

/* 内容：标准紫罗兰 */

/* 紫红色系 */
.theme-fuchsia {
  background: #faf0f5;
}

.theme-fuchsia .popup-header {
  color: #b71c1c;
}

/* 头部：深紫红 */
.theme-fuchsia .popup-content {
  color: #d81b60;
}

/* 内容：标准紫红 */

/* 玫瑰色系 */
.theme-rose {
  background: #ffebee;
}

.theme-rose .popup-header {
  color: #c62828;
}

/* 头部：深玫瑰 */
.theme-rose .popup-content {
  color: #e53935;
}

/* 内容：标准玫瑰 */

/* 祖母绿色系 */
.theme-emerald {
  background: #e8f5e9;
}

.theme-emerald .popup-header {
  color: #2e7d32;
}

/* 头部：深祖母绿 */
.theme-emerald .popup-content {
  color: #43a047;
}

/* 内容：标准祖母绿 */

/* 石灰色系 */
.theme-slate {
  background: #f5f5f5;
}

.theme-slate .popup-header {
  color: #4b636e;
}

/* 头部：深石灰 */
.theme-slate .popup-content {
  color: #607d8b;
}

/* 内容：标准石灰 */

/* 动画样式 */
.anim-fade {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.anim-scale {
  animation: scaleIn 0.4s ease forwards;
  transform: scale(0.8);
  opacity: 0;
}

.anim-slide {
  animation: slideUp 0.5s ease forwards;
  transform: translateY(20px);
  opacity: 0;
}

.anim-bounce {
  animation: bounceIn 0.6s ease forwards;
  transform: scale(0.7);
  opacity: 0;
}

/* 动画关键帧 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  70% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  70% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}