/* ============================================================================
 * 大屏趣味抽奖画面样式（转盘/刮刮乐/翻牌/抽签/盲盒）
 * 各玩法主题色由 --flc 注入；亮色系，摒弃暗红，大气炫酷喜庆
 * ========================================================================== */
.fl-screen { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center;
  padding:5vh 6vw 15vh; overflow:hidden; color:#4A2E10; isolation:isolate; }
/* ============================================================================
 * 五个玩法各自独立的全屏背景图：整屏一张图、一次绘制、无接缝、无留白。
 * 背景只画在最底层 .stage-bg（铺满整个舞台）；内容区自带的 .fl-bg 直接隐藏，
 * 避免两层各画一遍同一张图（尺寸/定位不同）在交界处形成上下分层接缝。
 * ========================================================================== */
.fl-bg { display:none !important; }

/* ============================================================================
 * 全屏背景铺到大屏最底层 .stage-bg（inset:-3% + cover）：
 * 盖住整个舞台含顶部条/底部菜单后面，彻底杜绝上下左右留白。
 * ========================================================================== */
.stage.is-funlottery .stage-bg { background-size:cover !important; background-position:center center !important; }
.stage.is-funlottery .stage-bg::after { background:transparent !important; }
.stage[data-section="flwheel"]  .stage-bg { background-image:url(../../assets/funlottery/wheel.png) !important; }
.stage[data-section="flscratch"].stage-bg, .stage[data-section="flscratch"] .stage-bg { background-image:url(../../assets/funlottery/scratch.png) !important; }
.stage[data-section="flmatch"]  .stage-bg { background-image:url(../../assets/funlottery/match.png) !important; }
.stage[data-section="fltube"]   .stage-bg { background-image:url(../../assets/funlottery/tube.png) !important; }
.stage[data-section="flblind"]  .stage-bg { background-image:url(../../assets/funlottery/blind.png) !important; }

.fls-head { position:relative; text-align:center; margin-top:2vh; }
.fls-badge { display:inline-block; font-size:clamp(12px,1.5vw,20px); font-weight:900; letter-spacing:.3em;
  color:#fff; background:var(--flc); padding:.5em 1.4em; border-radius:100px;
  box-shadow:0 8px 24px rgba(0,0,0,.18); }
.fls-title { margin:.35em 0 .1em; font-size:clamp(40px,7vw,110px); font-weight:900; letter-spacing:.06em;
  color:#fff; text-shadow:0 3px 0 rgba(90,50,10,.45),0 6px 18px rgba(0,0,0,.55),0 0 34px var(--flc),0 0 60px var(--flc); }
.fls-tip { margin:0; font-size:clamp(15px,2vw,30px); font-weight:700; color:#FFF6E2; text-shadow:0 2px 10px rgba(0,0,0,.7),0 0 16px rgba(0,0,0,.5); }
.fls-scan { position:relative; display:flex; align-items:center; gap:18px; margin:3vh 0 2vh;
  padding:1.2vh 3vw; border-radius:100px; background:rgba(255,255,255,.92);
  border:2px solid var(--flc); box-shadow:0 10px 30px rgba(0,0,0,.16); }
.fls-scan-ico { font-size:clamp(26px,3vw,44px); }
.fls-scan b { display:block; font-size:clamp(18px,2.4vw,34px); color:var(--flc); font-weight:900; }
.fls-scan small { display:block; font-size:clamp(11px,1.3vw,18px); color:#9A7440; font-weight:600; }
.fls-board { position:relative; width:min(1100px,86vw); flex:1; max-height:46vh; overflow:hidden;
  border-radius:24px; padding:2vh 2.4vw; background:rgba(255,255,255,.94);
  border:2px solid rgba(201,162,78,.4); box-shadow:0 16px 44px rgba(0,0,0,.18);
  display:flex; flex-direction:column; }
.fls-board-h { display:flex; justify-content:space-between; align-items:center; padding-bottom:1vh;
  border-bottom:2px solid rgba(201,162,78,.24); font-size:clamp(16px,2vw,30px); font-weight:900; color:#4A2E10; }
.fls-board-h small { font-size:clamp(11px,1.3vw,18px); color:#9A7440; font-weight:700; }
.fls-list { flex:1; overflow:hidden; padding-top:1vh; }
.fls-row { display:flex; align-items:center; gap:1.4vw; padding:.8vh 0;
  border-bottom:1px solid rgba(201,162,78,.15); font-size:clamp(14px,1.7vw,26px); }
.fls-rank { width:2.4vw; min-width:36px; text-align:center; font-weight:900; color:#9A7440; }
.fls-rank.r1 { color:#E8A200; } .fls-rank.r2 { color:#94A3B8; } .fls-rank.r3 { color:#C58B5A; }
.fls-avatar { width:clamp(32px,3.4vw,52px); height:clamp(32px,3.4vw,52px); border-radius:50%; overflow:hidden;
  display:flex; align-items:center; justify-content:center; background:var(--flc); font-size:1.2vw; flex-shrink:0; }
.fls-avatar img { width:100%; height:100%; object-fit:cover; }
.fls-name { flex:1; font-weight:800; color:#4A2E10; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fls-prize { color:var(--flc); font-weight:900; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fls-empty { text-align:center; padding:6vh 0; font-size:clamp(14px,1.8vw,26px); color:#B08A50; font-weight:600; }

/* ============================================================================
 * 文字对比：标题深色字 + 白色描边，避免与浅色背景靠色；所有玩法通用
 * ========================================================================== */
.fls-title { color:#3A2410 !important;
  -webkit-text-stroke:2px rgba(255,255,255,.95);
  text-shadow:0 3px 0 rgba(255,255,255,.9),0 8px 22px rgba(60,30,0,.28) !important; }
.fls-tip { color:#4A2E10 !important; text-shadow:0 2px 0 rgba(255,255,255,.9),0 4px 12px rgba(60,30,0,.3) !important; }
.fls-badge { box-shadow:0 6px 20px rgba(0,0,0,.25); }

/* ============================================================================
 * 每个玩法专属的主题动画演示 + 不同布局
 * ========================================================================== */
.fl-demo { position:relative; display:flex; align-items:center; justify-content:center; z-index:1; }

/* ① 转盘：持续旋转模拟抽奖，顶部指针跳动 */
.fl-screen[data-flkey=flwheel] .fls-head { align-self:flex-start; text-align:left; margin-left:2vw; }
.fl-screen[data-flkey=flwheel] .fl-demo--wheel { position:absolute; right:8vw; top:20vh; width:34vw; height:34vw;
  max-width:520px; max-height:520px; }
.fl-wheel { position:absolute; inset:0; border-radius:50%;
  box-shadow:0 0 0 12px rgba(255,255,255,.85),0 0 0 18px var(--flc),0 20px 60px rgba(0,0,0,.3),0 0 70px rgba(var(--flrgb),.5); }
.fl-wheel-face { position:absolute; inset:0; border-radius:50%;
  background:conic-gradient(from 0deg,#FFE9A8 0 30deg,#FFB020 30deg 60deg,#FFF6E2 60deg 90deg,#FF8A3D 90deg 120deg,
    #FFE9A8 120deg 150deg,#FFB020 150deg 180deg,#FFF6E2 180deg 210deg,#FF8A3D 210deg 240deg,
    #FFE9A8 240deg 270deg,#FFB020 270deg 300deg,#FFF6E2 300deg 330deg,#FF8A3D 330deg 360deg);
  -webkit-mask:radial-gradient(circle,#000 0 92%,transparent 93%); mask:radial-gradient(circle,#000 0 92%,transparent 93%);
  animation:flWheelSpin 5s cubic-bezier(.2,.8,.2,1) infinite; }
.fl-wheel-pin { position:absolute; inset:14%; border-radius:50%; border:2px dashed rgba(180,110,20,.5); }
.fl-wheel-hub { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:22%; height:22%; border-radius:50%;
  background:radial-gradient(circle,#FFF6D8,#E39A20); display:grid; place-items:center; font-size:2.4vw; color:#8A4E08;
  box-shadow:0 0 24px rgba(255,200,80,.9); z-index:2; }
.fl-wheel-pointer { position:absolute; left:50%; top:-14px; transform:translateX(-50%); width:0; height:0;
  border-left:16px solid transparent; border-right:16px solid transparent; border-top:34px solid #D92E26; z-index:3;
  filter:drop-shadow(0 3px 4px rgba(0,0,0,.35)); animation:flPointer 5s ease-in-out infinite; }
@keyframes flWheelSpin { 0%{transform:rotate(0)} 78%{transform:rotate(1540deg)} 100%{transform:rotate(1580deg)} }
@keyframes flPointer { 0%,70%{transform:translateX(-50%) rotate(0)} 80%,100%{transform:translateX(-50%) rotate(-14deg)} }

/* ② 刮刮乐：卡片排列 + 涂层扫光 + 奖闪光 */
.fl-screen[data-flkey=flscratch] .fl-demo--scratch { gap:2vw; margin:1vh 0; height:22vh; }
.fl-scratch-card { position:relative; width:15vw; height:20vh; max-width:220px; max-height:230px; border-radius:16px;
  background:linear-gradient(150deg,#fff,#E8FFF0); border:3px solid var(--flc);
  box-shadow:0 14px 34px rgba(0,0,0,.25); overflow:hidden; animation:flCardFloat 3.4s ease-in-out infinite alternate; }
.fl-scratch-card.s2 { animation-delay:.6s; } .fl-scratch-card.s3 { animation-delay:1.2s; }
.fl-scratch-foil { position:absolute; inset:0; background:repeating-linear-gradient(120deg,#C9D4CE 0 12px,#E8EFEA 12px 24px);
  animation:flFoilScratch 3.6s ease-in-out infinite; }
.fl-scratch-prize { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:4vw; color:#111; gap:4px; }
.fl-scratch-prize span { font-size:1.6vw; font-weight:900; color:#0A7A3A; }
.fl-scratch-shine { position:absolute; top:0; left:-60%; width:50%; height:100%;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.85),transparent); animation:flShine 3s ease-in-out infinite; }
@keyframes flCardFloat { from{transform:translateY(0) rotate(-2deg)} to{transform:translateY(-12px) rotate(2deg)} }
@keyframes flFoilScratch { 0%,40%{transform:translateX(0);opacity:1} 60%,100%{transform:translateX(105%);opacity:.15} }
@keyframes flShine { 0%,100%{left:-60%} 50%{left:120%} }

/* ③ 翻牌：牌阵依次翻面 */
.fl-screen[data-flkey=flmatch] .fl-demo--match { flex-wrap:wrap; width:min(760px,70vw); gap:1.2vw; margin:1vh 0; perspective:1200px; }
.fl-card { width:10vw; height:13vw; max-width:150px; max-height:195px; perspective:800px; }
.fl-card-in { position:relative; width:100%; height:100%; transform-style:preserve-3d;
  animation:flFlip 4s ease-in-out infinite; animation-delay:calc(var(--n,0) * .25s); }
.fl-card:nth-child(1) .fl-card-in{animation-delay:0s} .fl-card:nth-child(2) .fl-card-in{animation-delay:.3s}
.fl-card:nth-child(3) .fl-card-in{animation-delay:.6s} .fl-card:nth-child(4) .fl-card-in{animation-delay:.9s}
.fl-card:nth-child(5) .fl-card-in{animation-delay:1.2s} .fl-card:nth-child(6) .fl-card-in{animation-delay:1.5s}
.fl-card-back,.fl-card-front { position:absolute; inset:0; border-radius:14px; display:grid; place-items:center;
  backface-visibility:hidden; font-size:3.6vw; border:3px solid #fff; box-shadow:0 10px 26px rgba(0,0,0,.28); }
.fl-card-back { background:linear-gradient(150deg,#7DD3FC,#2563EB); color:#fff; font-weight:900; }
.fl-card-front { background:linear-gradient(150deg,#fff,#DBEAFE); transform:rotateY(180deg); }
@keyframes flFlip { 0%,35%{transform:rotateY(0)} 55%,80%{transform:rotateY(180deg)} 100%{transform:rotateY(0)} }

/* ④ 抽签：紫晶签筒（金口+高光） + 红头竹签摇摆 */
.fl-screen[data-flkey=fltube] .fl-demo--tube { position:absolute; width:30vw; height:44vh; }
.fl-tube-jar { position:absolute; left:50%; bottom:0; transform:translateX(-50%); width:11vw; height:17vh; max-width:210px;
  background:linear-gradient(165deg,#E9D8FD 0%,#A78BFA 28%,#7C3AED 65%,#4C1D95 100%);
  border-radius:16px 16px 40px 40px / 12px 12px 70px 70px;
  border:3px solid rgba(255,255,255,.95);
  box-shadow:0 18px 44px rgba(60,20,140,.5),inset 8px 0 18px rgba(255,255,255,.35),inset -10px -6px 24px rgba(60,20,120,.45); }
/* 筒口金箍 */
.fl-tube-jar::before { content:''; position:absolute; left:-5%; right:-5%; top:-3%; height:13%;
  background:linear-gradient(180deg,#FFE9A8,#D9A53F); border-radius:100px; border:2px solid #fff;
  box-shadow:0 4px 14px rgba(120,70,10,.4); }
/* 筒身高光 */
.fl-tube-jar::after { content:''; position:absolute; left:14%; top:12%; width:9%; height:68%;
  background:linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,255,255,0)); border-radius:100px; }
.fl-sticks { position:absolute; left:50%; bottom:14vh; transform:translateX(-50%); width:26vw; height:24vh; }
.fl-sticks i { position:absolute; left:50%; bottom:0; width:2.2vw; height:20vh; max-width:32px;
  margin-left:-1.1vw; background:linear-gradient(180deg,#E34D4D 0 9%,#FFF3D0 9% 30%,#E8C27C 100%);
  border-radius:6px 6px 2px 2px; border:1px solid #B8863B;
  color:#8A4E08; font-style:normal; font-size:1.2vw; font-weight:900; text-align:center; line-height:2.1;
  text-shadow:0 1px 0 rgba(255,255,255,.6);
  transform-origin:bottom center; transform:rotate(var(--r)); animation:flStick 3s ease-in-out infinite; animation-delay:calc(var(--i) * .18s); }
@keyframes flStick { 0%,100%{transform:rotate(var(--r)) translateY(0)} 50%{transform:rotate(var(--r)) translateY(-26px)} }

/* ⑤ 盲盒：礼盒依次开启闪光 */
.fl-screen[data-flkey=flblind] .fl-demo--blind { flex-wrap:wrap; width:min(720px,64vw); gap:1.4vw; margin:1vh 0; }
.fl-box { position:relative; width:12vw; height:11vw; max-width:170px; max-height:160px; }
.fl-box-body { position:absolute; left:0; right:0; bottom:0; height:72%; border-radius:8px;
  background:linear-gradient(150deg,#FDA4AF,#DB2777); border:3px solid #fff; box-shadow:0 10px 26px rgba(0,0,0,.25); }
.fl-box-lid { position:absolute; left:-6%; right:-6%; top:18%; height:28%; border-radius:8px;
  background:linear-gradient(150deg,#FFD1DC,#F472B6); border:3px solid #fff; z-index:2;
  transform-origin:bottom center; animation:flBoxLid 4.5s ease-in-out infinite; }
.fl-box.is-open .fl-box-body { color:#fff; font-size:3.4vw; text-align:center; line-height:5.5vw;
  animation:flBoxGlow 4.5s ease-in-out infinite; }
@keyframes flBoxLid { 0%,30%{transform:rotate(0)} 42%,72%{transform:rotate(-115deg) translateY(-8%)} 100%{transform:rotate(0)} }
@keyframes flBoxGlow { 0%,30%{box-shadow:0 10px 26px rgba(0,0,0,.25)} 45%,70%{box-shadow:0 0 50px 14px rgba(255,255,255,.9),0 0 80px var(--flc)} 100%{box-shadow:0 10px 26px rgba(0,0,0,.25)} }

/* ============================================================================
 * 视觉升级布局 v4：标题居中 + 二维码居中 + 五个玩法差异化构图
 *   标题=顶部居中(发光描边/装饰线)  二维码=画面正中(主题光晕卡片)
 *   中奖榜=右上/右下随玩法变化  主题动画=左/右/底部随玩法变化
 *   背景由 .fl-bg 全屏 cover 铺满，无留白、无遮罩。
 *   弹幕在本类页面只隐藏显示、不销毁实例，切回其它版块继续飘屏。
 * ========================================================================== */
.fl-screen { position:absolute; inset:0; display:block; padding:0; overflow:hidden; }

/* 标题：顶部水平居中，更大气的描边/发光/装饰线（高度收紧给中间二维码让位） */
.fls-head { position:absolute; left:50%; top:1.5vh; transform:translateX(-50%);
  width:min(78vw,1120px); text-align:center; margin:0; z-index:5; }
.fls-head::before, .fls-head::after { content:''; position:absolute; top:36%;
  width:min(15vw,220px); height:2px; background:linear-gradient(90deg,transparent,var(--flc)); opacity:.85; }
.fls-head::before { left:-3vw; } .fls-head::after { right:-3vw; transform:scaleX(-1); }
.fls-badge { display:inline-block; font-size:clamp(11px,1.1vw,16px); font-weight:900; letter-spacing:.3em;
  color:#fff; background:linear-gradient(120deg,var(--flc),#FFD76A); padding:.4em 1.5em;
  border-radius:100px; box-shadow:0 8px 28px rgba(var(--flrgb),.45); text-shadow:0 2px 6px rgba(0,0,0,.25); }
.fls-title { margin:.1em 0 .06em; font-size:clamp(38px,4.8vw,78px); font-weight:900; letter-spacing:.08em; line-height:1.05;
  color:#3A2410; -webkit-text-stroke:2px rgba(255,255,255,.98);
  text-shadow:0 3px 0 #fff,0 10px 30px rgba(60,30,0,.4),0 0 50px rgba(var(--flrgb),.55); }
.fls-tip { margin:0; font-size:clamp(12px,1.3vw,19px); font-weight:700; color:#4A2E10; line-height:1.3;
  text-shadow:0 2px 0 rgba(255,255,255,.95),0 4px 14px rgba(60,30,0,.35); }

/* 动画基础框：左侧中部 */
.fl-demo { position:absolute; left:5vw; top:38%; width:30vw; height:48%;
  display:flex; align-items:center; justify-content:center; margin:0; z-index:2; }

/* 二维码：水平居中、垂直正中，主题色光晕卡片 + 轻微浮动 */
.fls-qrslot { position:absolute; left:50%; top:58%; transform:translate(-50%,-50%);
  margin:0; min-height:0; z-index:6; }
.stage.is-funlottery .stage-qr { position:relative; right:auto; top:auto;
  width:clamp(150px,13vw,200px); padding:10px; border-radius:18px;
  background:linear-gradient(160deg,#fff,#FFF6E2); border:3px solid #fff;
  box-shadow:0 0 0 4px var(--flc),0 20px 50px rgba(0,0,0,.32),0 0 60px rgba(var(--flrgb),.55);
  animation:flQrFloat 3.6s ease-in-out infinite; }
@keyframes flQrFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.stage.is-funlottery .stage-qr svg { width:100%; height:auto; }
.stage.is-funlottery .stage-qr b, .stage.is-funlottery .stage-qr small { color:#3A2410; text-shadow:none; }

/* 中奖榜：默认右上轻量卡片 */
.fls-board { position:absolute; right:2.5vw; top:6%; width:clamp(240px,21vw,380px); max-height:44%;
  margin:0; padding:1.2vh 1vw; border-radius:16px; background:rgba(255,255,255,.86);
  border:1.5px solid rgba(var(--flrgb),.45); box-shadow:0 12px 30px rgba(0,0,0,.16);
  backdrop-filter:blur(8px); z-index:5; overflow:hidden; }
.fls-board-h { font-size:clamp(13px,1.35vw,21px); }
.fls-row { padding:.5vh 0; font-size:clamp(11px,1.15vw,18px); gap:.7vw; }
.fls-avatar { width:clamp(24px,2.2vw,36px); height:clamp(24px,2.2vw,36px); font-size:.9vw; }
.fls-empty { padding:2.5vh 0; font-size:clamp(11px,1.15vw,18px); }

/* 飘屏弹幕在本类页面会压住标题/二维码/中奖榜：只隐藏可见性，不用 display:none。
   display:none 会暂停 CSS 动画，切回其它模块时弹幕从 0 重播；visibility:hidden
   保持动画继续跑，切回来位置连续，视觉上本页依旧看不到弹幕。 */
.stage.is-funlottery .stage-bubbles { visibility:hidden !important; }

/* ① 转盘：左侧大转盘 + 榜单右上 */
.fl-screen[data-flkey=flwheel] .fl-demo--wheel { left:7vw; right:auto; top:40%; bottom:auto; transform:none;
  width:min(25vw,36vh); height:min(25vw,36vh); }
/* ② 刮刮乐：左侧横排三卡（中奖榜与其他页统一在右上，不放底部） */
.fl-screen[data-flkey=flscratch] .fl-demo--scratch { left:4vw; right:auto; top:40%; bottom:auto; transform:none;
  width:auto; height:auto; gap:1.3vw; }
.fl-scratch-card { width:min(11vw,22vh); height:min(24vh,12vw); }
/* ③ 翻牌：左侧 2×3 牌阵 + 榜单右上 */
.fl-screen[data-flkey=flmatch] .fl-demo--match { left:5vw; right:auto; top:38%; bottom:auto; transform:none;
  width:min(460px,32vw); height:auto; gap:.9vw; }
.fl-card { width:min(9vw,13vh); height:min(12vw,18vh); }
/* ④ 抽签：左侧大签筒（填左半空白）+ 榜单右上 */
.fl-screen[data-flkey=fltube] .fl-demo--tube { left:9vw; right:auto; top:31%; bottom:auto; transform:none;
  width:min(28vw,42vh); height:min(44vh,34vw); }
.fl-tube-jar { width:min(12vw,19vh); height:min(21vh,17vw); }
.fl-sticks { width:min(24vw,34vh); height:min(24vh,22vw); bottom:min(19vh,15vw); }
.fl-sticks i { height:min(19vh,14vw); }
/* ⑤ 盲盒：左侧 2×3 盒阵（中奖榜与其他页统一在右上，不放底部） */
.fl-screen[data-flkey=flblind] .fl-demo--blind { left:5vw; right:auto; top:38%; bottom:auto; transform:none;
  width:min(460px,32vw); height:auto; gap:.9vw; margin:0; }
.fl-box { width:min(9vw,13vh); height:min(9vw,13vh); }

/* 清掉早期布局遗留的 margin / 对齐（旧规则带 data-flkey，特异性更高，需同权重覆盖） */
.fl-screen[data-flkey=flwheel] .fls-head,
.fl-screen[data-flkey=fltube] .fls-head { margin:0; align-self:auto; text-align:center; }
.fl-screen[data-flkey=flscratch] .fl-demo--scratch,
.fl-screen[data-flkey=flmatch] .fl-demo--match,
.fl-screen[data-flkey=flblind] .fl-demo--blind { margin:0; }
