/* ============ 签到墙（火互动模式）：满屏头像漂浮 + 中央 LOGO ============ */

.stage-logo {
  position: relative;
  overflow: hidden;
}

/* ---------- 背景主题（后台可切换） ---------- */
/* 公共：所有装饰默认隐藏，按主题启用 */
.fx, .fx-lantern, .fx-particles, .fx-sheep {
  position: absolute;
  pointer-events: none;
}
.fx, .fx-lantern, .fx-particles, .fx-sheep { display: none; }

/* 喜庆年味（默认）：中国红底 + 金辉 + 灯笼 + 飘金粒子 + 羊 */
.stage-logo[data-theme="festive"] {
  background: radial-gradient(ellipse 70% 55% at 50% 38%, #7a0d12 0%, #5c0a0e 45%, #3d0608 100%);
}
.stage-logo[data-theme="festive"] .fx-bg,
.stage-logo[data-theme="festive"] .fx-glow,
.stage-logo[data-theme="festive"] .fx-particles,
.stage-logo[data-theme="festive"] .fx-lantern,
.stage-logo[data-theme="festive"] .fx-sheep { display: block; }

/* 深邃星空：深蓝紫渐变 + 星点 + 中央白金 LOGO */
.stage-logo[data-theme="starry"] {
  background: radial-gradient(ellipse 75% 60% at 50% 35%, #1b2a52 0%, #101a38 50%, #060a1a 100%);
}
.stage-logo[data-theme="starry"] .fx-bg,
.stage-logo[data-theme="starry"] .fx-glow,
.stage-logo[data-theme="starry"] .fx-particles { display: block; }
.stage-logo[data-theme="starry"] .fx-bg { background: radial-gradient(ellipse 50% 40% at 50% 38%, rgba(150,190,255,.20), transparent 70%); }
.stage-logo[data-theme="starry"] .fx-glow { background: radial-gradient(ellipse 42% 30% at 50% 42%, rgba(200,220,255,.25), transparent 72%); }
.stage-logo[data-theme="starry"] .fx-particles::before {
  background:
    radial-gradient(circle, #ffffff 0 2px, transparent 3px) 0 0 / 120px 160px,
    radial-gradient(circle, #bcd4ff 0 1.5px, transparent 3px) 50px 70px / 160px 200px,
    radial-gradient(circle, #e8f0ff 0 1px, transparent 3px) 90px 40px / 130px 180px;
  opacity: .85;
}
.stage-logo[data-theme="starry"] .center-logo-text {
  color: #ffffff; -webkit-text-fill-color: #ffffff; background: none;
  filter: drop-shadow(0 0 16px rgba(120,170,255,.7)) drop-shadow(0 4px 10px rgba(0,0,0,.7));
}

/* 典雅黑金：纯黑底 + 稀疏金点 + 中央金 LOGO */
.stage-logo[data-theme="elegant"] {
  background: radial-gradient(ellipse 70% 55% at 50% 40%, #1a1a1d 0%, #101012 45%, #050506 100%);
}
.stage-logo[data-theme="elegant"] .fx-bg,
.stage-logo[data-theme="elegant"] .fx-glow,
.stage-logo[data-theme="elegant"] .fx-particles { display: block; }
.stage-logo[data-theme="elegant"] .fx-bg { background: radial-gradient(ellipse 45% 35% at 50% 40%, rgba(255,215,130,.14), transparent 70%); }
.stage-logo[data-theme="elegant"] .fx-particles::before {
  background:
    radial-gradient(circle, #ffe9a8 0 1.5px, transparent 3px) 0 0 / 160px 200px,
    radial-gradient(circle, #ffcf5e 0 1px, transparent 3px) 70px 90px / 200px 240px;
  opacity: .5;
}

/* 自定义图片：所有装饰隐藏，背景图由 JS 内联设置（cover 填充） */
.stage-logo[data-theme="custom"] { background: #000; }
.stage-logo[data-theme="custom"] .center-logo-text {
  -webkit-text-stroke: 2px rgba(0,0,0,.55);
  filter: drop-shadow(0 0 14px rgba(0,0,0,.6)) drop-shadow(0 4px 10px rgba(0,0,0,.6));
}
.fx-bg {
  inset: 0;
  background:
    radial-gradient(ellipse 48% 38% at 50% 40%, rgba(255, 210, 120, .22), transparent 70%),
    radial-gradient(circle at 50% 118%, rgba(255, 130, 40, .35), transparent 60%);
}

/* 中央金辉：衬托 LOGO */
.fx-glow {
  inset: 0;
  background: radial-gradient(ellipse 42% 30% at 50% 42%, rgba(255, 220, 130, .30), transparent 72%);
  animation: glow-pulse 4.5s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
  from { opacity: .75; }
  to   { opacity: 1; }
}

/* 灯笼（左右各一，顶部垂挂、轻微摇摆） */
.fx-lantern {
  top: -10px;
  width: 78px;
  height: 150px;
  transform-origin: top center;
  animation: lantern-sway 4s ease-in-out infinite alternate;
}
.lantern-left  { left: 5%;  animation-delay: 0s; }
.lantern-right { right: 5%; animation-delay: -2s; }
@keyframes lantern-sway {
  from { transform: rotate(-4deg); }
  to   { transform: rotate(4deg); }
}
.lantern-rope {
  position: absolute; top: 0; left: 50%; width: 3px; height: 26px;
  transform: translateX(-50%);
  background: linear-gradient(#f4c430, #b8860b);
}
.lantern-body {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 84px;
  border-radius: 50% / 42%;
  background:
    radial-gradient(circle at 50% 38%, #ff5a4d 0%, #e21f1f 55%, #a30d0d 100%);
  border: 2px solid #ffd86b;
  box-shadow:
    0 0 22px rgba(255, 90, 50, .6),
    inset 0 0 14px rgba(0, 0, 0, .35);
}
/* 灯笼上下金盖 + 竖向金骨 */
.lantern-body::before {
  content: '';
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  border-radius: 50% / 42%;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255, 216, 107, .8) 48%, rgba(255, 216, 107, .8) 52%, transparent 54%),
    linear-gradient(0deg, transparent 8%, rgba(255, 216, 107, .55) 10%, transparent 12%),
    linear-gradient(0deg, transparent 88%, rgba(255, 216, 107, .55) 90%, transparent 92%);
}
.lantern-body::after {
  content: '';
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
  width: 26px; height: 10px; border-radius: 3px;
  background: linear-gradient(#ffd86b, #c9961f);
  box-shadow: 0 96px 0 -2px #ffd86b; /* 底盖 */
}
.lantern-tassel {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: 6px; height: 34px;
  background: linear-gradient(#ffd86b, #e23b2b);
  border-radius: 3px;
  box-shadow: -7px 0 0 -1px rgba(255, 216, 107, .7), 7px 0 0 -1px rgba(255, 216, 107, .7);
}

/* 飘落金色粒子（喜庆火花） */
.fx-particles {
  inset: 0;
  overflow: hidden;
  z-index: 2;
}
.fx-particles::before {
  content: '';
  position: absolute; inset: -30% 0 0 0;
  background:
    radial-gradient(circle, #ffe9a8 0 2px, transparent 3px) 0 0 / 90px 140px,
    radial-gradient(circle, #ffcf5e 0 1.5px, transparent 3px) 40px 60px / 130px 170px,
    radial-gradient(circle, #fff3c8 0 1.5px, transparent 3px) 80px 30px / 110px 150px;
  opacity: .55;
  animation: spark-fall 11s linear infinite;
}
@keyframes spark-fall {
  from { transform: translateY(-12%); }
  to   { transform: translateY(12%); }
}

/* ---------- 羊年卡通绵羊（底部两角） ---------- */
.fx-sheep {
  position: absolute;
  bottom: 2.5%;
  width: 158px;
  height: 150px;
  z-index: 3;
  opacity: .96;
  pointer-events: none;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .45));
  animation: sheep-bob 3.6s ease-in-out infinite alternate;
}
.sheep-left  { left: 2.5%;  animation-delay: 0s; }
.sheep-right { right: 2.5%; transform: scaleX(-1); animation-delay: -1.8s; }
@keyframes sheep-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}

/* 羊毛云朵身体 */
.fx-sheep .wool {
  position: absolute;
  left: 16px; bottom: 20px;
  width: 104px; height: 104px;
  border-radius: 50%;
  background: #fdfdfd;
  box-shadow:
    34px 14px 0 -11px #fdfdfd, 7px 40px 0 -13px #fdfdfd,
    52px 50px 0 -15px #fdfdfd, 16px 62px 0 -13px #fdfdfd,
    74px 16px 0 -13px #fdfdfd, 72px 56px 0 -17px #fdfdfd,
    inset 0 0 12px rgba(0, 0, 0, .06);
}

/* 脸（深色椭圆，朝右侧） */
.fx-sheep .face {
  position: absolute;
  right: 8px; bottom: 48px;
  width: 50px; height: 45px;
  border-radius: 52% 52% 46% 46%;
  background: linear-gradient(160deg, #5a463c, #2c201a);
}
/* 金羊角 */
.fx-sheep .horn {
  position: absolute;
  top: -12px;
  width: 14px; height: 30px;
  border: 5px solid #f2c031;
  border-bottom: none; border-right: none;
  border-radius: 100% 0 0 0;
  background: transparent;
  box-shadow: 0 0 6px rgba(242, 192, 49, .5);
}
.fx-sheep .horn.l { left: 5px;  transform: rotate(-18deg); }
.fx-sheep .horn.r { left: 30px; transform: rotate(18deg) scaleX(-1); }
/* 耳朵 */
.fx-sheep .ear {
  position: absolute;
  top: 7px;
  width: 18px; height: 25px;
  border-radius: 50%;
  background: #3a2c25;
}
.fx-sheep .ear.l { left: -5px;  transform: rotate(-34deg); }
.fx-sheep .ear.r { left: 12px;  transform: rotate(28deg); }
/* 眼睛 */
.fx-sheep .eye {
  position: absolute;
  top: 15px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
}
.fx-sheep .eye.l { left: 10px; }
.fx-sheep .eye.r { left: 31px; }
/* 鼻 */
.fx-sheep .nose {
  position: absolute;
  bottom: 8px; left: 17px;
  width: 16px; height: 10px;
  border-radius: 50%;
  background: #ef8d8d;
}
/* 喜庆红脸颊 */
.fx-sheep .cheek {
  position: absolute;
  bottom: 11px;
  width: 9px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 120, 110, .75);
}
.fx-sheep .cheek.l { left: 7px; }
.fx-sheep .cheek.r { left: 35px; }
/* 腿 */
.fx-sheep .leg {
  position: absolute;
  bottom: 0;
  width: 10px; height: 22px;
  border-radius: 4px;
  background: #2c201a;
}
.fx-sheep .leg.l { left: 46px; }
.fx-sheep .leg.r { left: 80px; }
/* 尾巴 */
.fx-sheep .tail {
  position: absolute;
  left: 6px; bottom: 52px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fdfdfd;
}

/* ---------- 中央 LOGO（常驻，永远清晰） ---------- */
.center-logo {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
}
.center-logo-text {
  font-size: clamp(64px, 11vw, 190px);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.05;
  color: #ffe9b8;
  background: linear-gradient(180deg, #fff7e0 8%, #ffd977 45%, #d99a2b 88%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 0 18px rgba(255, 200, 100, .55))
    drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
}
.center-logo-sub {
  margin-top: 10px;
  font-size: clamp(16px, 1.6vw, 26px);
  letter-spacing: .5em;
  text-indent: .5em;
  color: rgba(255, 224, 168, .85);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

/* ---------- 头像气泡层 ---------- */
.bubble-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.bubble {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
  /* 泡泡漂移：沿各自随机轨道缓慢游走（--dx/--dy 振幅、--drift 周期、--driftd 相位） */
  animation: drift var(--drift, 16s) ease-in-out infinite;
  animation-delay: var(--driftd, 0s);
  transition: left .8s cubic-bezier(.22, .8, .3, 1), top .8s cubic-bezier(.22, .8, .3, 1);
  will-change: transform, left, top;
}
@keyframes drift {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0) rotate(0deg); }
  33%      { transform: translate(calc(-50% + var(--dx, 18px)), calc(-50% + var(--dy, -12px))) rotate(2.5deg); }
  66%      { transform: translate(calc(-50% - var(--dx, 18px) * 0.6), calc(-50% - var(--dy, -12px) * 0.6)) rotate(-2.5deg); }
}
.bubble .ava {
  width: var(--sz, 84px);
  height: var(--sz, 84px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 214, 120, .95);
  box-shadow:
    0 0 0 2px rgba(120, 40, 20, .55),
    0 0 18px rgba(255, 200, 100, .55),
    0 0 42px rgba(255, 170, 60, .28),
    inset 0 0 10px rgba(0, 0, 0, .35);
  background: #2a1512;
  animation: bob var(--bob, 4.5s) ease-in-out infinite alternate;
  animation-delay: var(--bobd, 0s);
}
.bubble .ava img,
.bubble .ava .initial {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--sz, 84px) * .42);
  font-weight: 800;
  color: #fff;
}
.bubble .name {
  max-width: calc(var(--sz, 84px) * 2.2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(var(--sz, 84px) * .21);
  font-weight: 700;
  color: #ffeccd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .6);
  line-height: 1.1;
}

/* 新签到：从底部飞入 */
.bubble.fly-in .ava {
  animation: fly-in .9s cubic-bezier(.2, .9, .3, 1.15) both,
             bob var(--bob, 4.5s) ease-in-out .9s infinite alternate;
}
@keyframes fly-in {
  from { transform: translateY(120vh) scale(.4); opacity: 0; }
  60%  { opacity: 1; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes bob {
  from { transform: translateY(-7px) scale(1); }
  to   { transform: translateY(7px) scale(1.05); }
}

/* ---------- 新签到：头像突然闯入 → 闪光环炸开 → 停留 → 消失 ---------- */
.pop-layer {
  position: absolute;
  inset: 0;
  z-index: 6;            /* 高于漂浮层与中央 LOGO，保证闯入醒目 */
  pointer-events: none;
  overflow: hidden;
}
.pop {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  will-change: transform, opacity;
}
.pop .pop-ava {
  position: relative;
  width: var(--sz, 180px);
  height: var(--sz, 180px);
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(255, 214, 120, .98);
  box-shadow:
    0 0 0 3px rgba(120, 40, 20, .6),
    0 0 30px rgba(255, 200, 100, .85),
    0 0 72px rgba(255, 170, 60, .45),
    inset 0 0 14px rgba(0, 0, 0, .35);
  background: #2a1512;
  /* 闯入：从屏外(--)猛冲入，带回弹过冲 */
  animation: pop-burst var(--in, .8s) cubic-bezier(.18, 1.5, .32, 1) both;
}
.pop.out .pop-ava {
  /* 消失：放大 + 模糊 + 淡出 */
  animation: pop-fade .62s ease-in forwards;
}
.pop .pop-ava img,
.pop .pop-ava .initial {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--sz, 180px) * .42);
  font-weight: 800;
  color: #fff;
}
/* 闪光环：砸入瞬间炸开 */
.pop .pop-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--sz, 180px);
  height: var(--sz, 180px);
  margin: calc(var(--sz, 180px) / -2) 0 0 calc(var(--sz, 180px) / -2);
  border-radius: 50%;
  border: 5px solid rgba(255, 222, 132, .95);
  box-shadow: 0 0 24px rgba(255, 210, 110, .9);
  animation: pop-ring .85s ease-out forwards;
  pointer-events: none;
  z-index: -1;
}
.pop .pop-name {
  font-size: calc(var(--sz, 180px) * .17);
  font-weight: 800;
  color: #ffeccd;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .9), 0 0 10px rgba(0, 0, 0, .6);
  line-height: 1.1;
}
.pop .pop-tag {
  margin-top: 1px;
  font-size: calc(var(--sz, 180px) * .12);
  font-weight: 800;
  letter-spacing: .12em;
  color: #fff;
  background: linear-gradient(180deg, #ff5a4d, #c01a1a);
  padding: 3px 15px;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
@keyframes pop-burst {
  0%   { transform: translate(var(--fx, 0), var(--fy, 0)) scale(.08) rotate(var(--rot, 0deg)); opacity: 0; }
  45%  { opacity: 1; }
  68%  { transform: translate(0, 0) scale(1.2) rotate(0deg); }   /* 过冲 */
  100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes pop-fade {
  0%   { transform: scale(1); opacity: 1; filter: blur(0); }
  100% { transform: scale(1.55); opacity: 0; filter: blur(7px); }
}
@keyframes pop-ring {
  0%   { transform: scale(.55); opacity: .95; }
  100% { transform: scale(1.85); opacity: 0; }
}

/* 右上角二维码常驻后，隐藏顶栏的二维码按钮（避免重叠） */
.topbar #qrBtn { display: none; }

/* ---------- 爱心墙切换按钮 ---------- */
.heart-btn { transition: background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease; }
.heart-btn.active {
  background: linear-gradient(180deg, #ff5a4d, #c01a1a);
  color: #fff;
  border-color: #ff8a7a;
  box-shadow: 0 0 14px rgba(255, 90, 70, .6);
}

/* ---------- 全屏模式：隐藏顶部栏与底部状态栏，舞台满屏 ---------- */
:fullscreen .topbar,
:fullscreen .logo-bar,
:-webkit-full-screen .topbar,
:-webkit-full-screen .logo-bar { display: none !important; }

/* ---------- 右上角常驻签到二维码 ---------- */
.corner-qr {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  background: rgba(255, 255, 255, .95);
  border-radius: 14px;
  padding: 9px 9px 6px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, .4),
    0 0 0 2px rgba(255, 214, 120, .8);
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease;
}
.corner-qr:hover { transform: scale(1.05); }
.corner-qr img {
  width: 96px;
  height: 96px;
  display: block;
  border-radius: 6px;
  background: #fff;
}
.corner-qr-tip {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .22em;
  text-indent: .22em;
  color: #c01a1a;
}

/* ---------- 全屏提示 ---------- */
.fs-hint {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 21;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: rgba(255, 236, 190, .95);
  font-size: 15px;
  letter-spacing: .08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  pointer-events: none;
  animation: fs-hint-fade 3s ease-in-out infinite alternate;
}
.fs-hint.hidden { display: none; }
@keyframes fs-hint-fade {
  from { opacity: .55; }
  to   { opacity: 1; }
}

/* ---------- 0 人预览/提示 ---------- */
.logo-preview { display: none; }
.logo-hint {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 6;
  color: rgba(255, 226, 170, .75);
  font-size: 18px;
  letter-spacing: .1em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
  white-space: nowrap;
}
