/* ============================================================
 * 爱心弹窗 —— 样式表
 * ============================================================ */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
  cursor: default;
  -webkit-user-select: none;
          user-select: none;
  touch-action: none;
}

/* ---------- 舞台 ----------
 * 所有视觉内容都放在 #stage 内。
 * 竖屏时整体旋转 90° 强制横屏显示。
 */
#stage {
  position: fixed;
  top: var(--site-header-height, 64px);
  left: 0;
  width: 100vw;
  height: calc(100vh - var(--site-header-height, 64px) - var(--site-footer-height, 56px));
  overflow: hidden;

  /* 浪漫渐变背景层（缓慢流动） */
  background: linear-gradient(135deg,
    #2b1055 0%,
    #6a1b9a 20%,
    #c2185b 45%,
    #ff6f91 70%,
    #ffb6b9 100%);
  background-size: 400% 400%;
  animation: bgShift 18s ease-in-out infinite;
}

/* 竖屏 → 旋转 90°，在视觉上变为横屏 */
@media (orientation: portrait) {
  #stage {
    width: calc(100vh - var(--site-header-height, 64px) - var(--site-footer-height, 88px));
    height: 100vw;
    transform-origin: 0 0;
    transform: translateX(100vw) rotate(90deg);
  }
}

@keyframes bgShift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* ---------- 背景画布（飘动的爱心粒子 / 星点） ---------- */
#bgCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 朦胧光晕 ---------- */
#stage::before, #stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
#stage::before {
  width: 420px; height: 420px;
  background: #ff5e8a;
  top: -120px; left: -120px;
}
#stage::after {
  width: 520px; height: 520px;
  background: #7d4bff;
  bottom: -160px; right: -160px;
  animation-delay: -7s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0)       scale(1);    }
  50%      { transform: translate(60px, 40px) scale(1.15); }
}

/* ---------- 模拟弹窗 ---------- */
.popup {
  position: absolute;
  width: 150px;
  height: 60px;
  box-sizing: border-box;
  background: #f1f1f1;
  border: 1px solid #5a5a5a;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .18s ease-out, transform .18s ease-out;
  z-index: 10;
}
.popup.show {
  opacity: 1;
  transform: scale(1);
}
.popup .bar {
  height: 18px;
  background: linear-gradient(to bottom, #4a90e2, #2a6fbf);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  padding: 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.popup .bar .btns {
  font-family: "Segoe UI", Tahoma, sans-serif;
  letter-spacing: 2px;
}
.popup .body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  color: #222;
  padding: 0 4px;
}

.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  #stage,
  #stage::before,
  #stage::after {
    animation: none;
  }

  .popup {
    transition: none;
  }
}
