* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #ffd24a; --gold-deep: #f0a92b; --gold-soft: #fff2c2;
  --bg1: #0e0a24; --bg2: #1a1140;
}
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 800px at 50% 0%, #241656 0%, var(--bg1) 60%);
  color: #fff;
  position: relative;
}
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* 背景光斑 */
.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.stars span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .3; animation: drift 16s ease-in-out infinite; }
.stars span:nth-child(1) { width: 360px; height: 360px; background: #6a30e0; top: -100px; left: -80px; }
.stars span:nth-child(2) { width: 300px; height: 300px; background: var(--gold-deep); bottom: -80px; right: -60px; animation-delay: -5s; }
.stars span:nth-child(3) { width: 220px; height: 220px; background: #ff4d8d; top: 30%; right: 10%; animation-delay: -9s; opacity: .18; }
.stars span:nth-child(4) { width: 260px; height: 260px; background: #30c8e0; bottom: 10%; left: 15%; animation-delay: -12s; opacity: .15; }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-40px) scale(1.12); } }

/* 顶栏 */
.screen-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 2.2vh 3vw 0; }
.title { font-size: 4.2vh; font-weight: 800; letter-spacing: .5vw; background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(255,210,74,.25); }
.live-dot { display: flex; align-items: center; gap: 8px; font-size: 1.8vh; color: #9be8a8; letter-spacing: 2px; }
.live-dot span { width: 12px; height: 12px; border-radius: 50%; background: #3ddc75; box-shadow: 0 0 14px #3ddc75; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* 舞台 */
.stage { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 3vw 16vh; }
.prize-banner { text-align: center; margin-bottom: 4vh; }
.prize-label { font-size: 1.8vh; letter-spacing: 8px; color: var(--gold); opacity: .85; margin-bottom: 1vh; }
.prize-name { font-size: 7vh; font-weight: 900; letter-spacing: .4vw; color: var(--gold-soft); text-shadow: 0 4px 30px rgba(240,169,43,.5); }
.prize-gift { font-size: 2.6vh; color: #e7e0ff; margin-top: 1vh; letter-spacing: 2px; }

/* 滚动区 */
.roll-area { position: relative; width: 100%; flex: 1; min-height: 34vh; display: flex; align-items: center; justify-content: center; }
.mode-stage { position: relative; width: 100%; height: 100%; max-height: 54vh; display: flex; align-items: center; justify-content: center; }
.mode-canvas { width: 100%; height: 100%; display: block; }

.hint { position: absolute; bottom: -6vh; left: 50%; transform: translateX(-50%); font-size: 2vh; color: #9a93bd; letter-spacing: 3px; white-space: nowrap; }

/* 中奖揭晓浮层（所有模式共用） */
.winner-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 5; pointer-events: none; }
.winner-overlay.show { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.winner-cards { display: flex; flex-wrap: wrap; gap: 2vw; justify-content: center; align-items: center; }
.win-card {
  min-width: 16vw; padding: 2.5vh 1.8vw 2vh; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(255,210,74,.2), rgba(240,169,43,.06));
  border: 2px solid var(--gold); box-shadow: 0 0 70px rgba(255,210,74,.5), inset 0 1px 0 rgba(255,255,255,.25);
  backdrop-filter: blur(8px); transform: scale(.4); opacity: 0;
}
.win-card.show { animation: winPop .6s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes winPop { 0% { transform: scale(.4) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.win-avatar { width: 9vh; height: 9vh; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 0 30px rgba(255,210,74,.6); display: block; margin: 0 auto 1.4vh; background: #fff; }
.win-card .wname { font-size: 4.4vh; font-weight: 900; letter-spacing: .2vw; background: linear-gradient(180deg, #fff7d6, var(--gold) 60%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.win-card .wmeta { font-size: 1.9vh; color: var(--gold-soft); margin-top: .8vh; letter-spacing: 2px; }

/* 老虎机模式 */
.reels { display: flex; gap: 1.8vw; justify-content: center; align-items: center; }
.reel { position: relative; width: 15vw; max-width: 220px; height: 30vh; min-height: 220px; overflow: hidden; border-radius: 18px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 0 40px rgba(0,0,0,.5); }
.reel::before, .reel::after { content: ''; position: absolute; left: 0; right: 0; height: 30%; z-index: 2; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(180deg, rgba(14,10,36,.95), transparent); }
.reel::after { bottom: 0; background: linear-gradient(0deg, rgba(14,10,36,.95), transparent); }
.reel.strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.reel-tile { height: 10vh; min-height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4vh; }
.reel-tile img { width: 6.5vh; height: 6.5vh; min-width: 48px; min-height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4); background: #fff; }
.reel-tile .rn { font-size: 1.6vh; color: #d8d2f0; letter-spacing: 1px; }
.reel.locked .reel-tile.center img { border-color: var(--gold); box-shadow: 0 0 24px rgba(255,210,74,.7); }
.reel.locked .reel-tile.center .rn { color: var(--gold); font-weight: 800; }
.slot-placeholder { color: #8a84a3; font-size: 2.2vh; letter-spacing: 3px; }

/* 大屏控制条 */
.screen-controls { position: fixed; bottom: 8vh; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 10px; }
.ctrl-toggle { border: 1px solid rgba(255,255,255,.25); background: rgba(20,14,50,.7); backdrop-filter: blur(10px); color: #fff; padding: 8px 16px; border-radius: 24px; font-size: 1.8vh; cursor: pointer; letter-spacing: 1px; }
.ctrl-toggle:hover { background: rgba(40,28,90,.85); }
.ctrl-panel { display: none; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 30px; background: rgba(20,14,50,.75); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.15); box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.screen-controls.open .ctrl-panel { display: flex; animation: fadeIn .25s ease; }
.ctrl-panel select { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; padding: 8px 12px; font-size: 1.8vh; }
.ctrl-panel select option { color: #222; }
.ctrl-panel button { border: none; border-radius: 20px; padding: 9px 20px; font-size: 1.9vh; font-weight: 800; letter-spacing: 2px; cursor: pointer; }
.ctrl-panel .btn-roll { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #3a2600; }
.ctrl-panel .btn-stop { background: #ff4d6d; color: #fff; }
.ctrl-panel button:disabled { opacity: .4; cursor: not-allowed; }
.ctrl-mode { font-size: 1.5vh; color: var(--gold); letter-spacing: 1px; padding: 0 6px; }

.pool-stat { position: absolute; bottom: 14vh; font-size: 2vh; color: #c7c0e8; letter-spacing: 2px; }
.pool-stat b { color: var(--gold); font-size: 2.6vh; margin: 0 4px; }

/* 底部跑马灯 */
.marquee-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); border-top: 1px solid rgba(255,210,74,.25); padding: 1.6vh 0; }
.marquee-label { flex-shrink: 0; padding: 0 2vw; font-size: 2vh; color: var(--gold); font-weight: 700; letter-spacing: 3px; border-right: 1px solid rgba(255,255,255,.12); }
.marquee { flex: 1; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-block; padding-left: 100%; animation: scroll 30s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-block; margin-right: 3vw; font-size: 2.1vh; color: #e7e0ff; }
.marquee-track span b { color: var(--gold); margin-right: 6px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.marquee-track:empty::after { content: '暂无中奖记录，等待开奖…'; color: #8a84a3; font-size: 2vh; }

.admin-entry { position: fixed; top: 2vh; right: 2vw; z-index: 10; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; opacity: .4; transition: opacity .2s; }
.admin-entry:hover { opacity: 1; }
