/* FLOOR FILLER: a nightclub seen from the dance floor. Everything that moves
   moves with transform/opacity only; the club itself is one static SVG. */
.dance { background: #0b0714; }
.dn-scene { position: absolute; inset: 0; overflow: hidden; --c1: #7c5cff; --c2: #38c6ff; --c3: #2ee6a6; }
.dn-bg { position: absolute; inset: 0; }
.dn-bg svg, .dn-floor svg, .dn-crowd svg { position: absolute; left: 0; top: 0; display: block; }

/* LED wall pulse (over the static, out-of-focus LED wall) */
.dn-ledpulse { position: absolute; width: 600px; height: 230px; border-radius: 8px; pointer-events: none; opacity: .07;
  background: radial-gradient(60% 70% at 50% 55%, var(--c1), transparent 75%), linear-gradient(90deg, var(--c2), var(--c1), var(--c3)); }
.dn-ledpulse.pulse { animation: dn-led .45s ease-out; }
@keyframes dn-led { 0% { opacity: .24; } 100% { opacity: .07; } }

/* moving heads: soft-edged beams sweeping through the haze */
.dn-beams { position: absolute; inset: 0; pointer-events: none; }
.dn-beam { position: absolute; top: 74px; width: 300px; height: 860px; margin-left: -150px; transform-origin: 50% 0; opacity: .3;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--bc, var(--c1)) 85%, white) 0%, var(--bc, var(--c1)) 18%, transparent 92%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 44%, #000 56%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 44%, #000 56%, transparent 100%);
  clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%); animation: dn-sweep 7s ease-in-out infinite alternate; }
.dn-beam.b0 { --bc: var(--c1); animation-duration: 6.2s; }
.dn-beam.b1 { --bc: var(--c2); animation-duration: 7.4s; animation-delay: -2s; animation-direction: alternate-reverse; }
.dn-beam.b2 { --bc: var(--c3); animation-duration: 6.8s; animation-delay: -4s; }
.dn-beam.b3 { --bc: var(--c1); animation-duration: 8s; animation-delay: -1s; animation-direction: alternate-reverse; }
@keyframes dn-sweep { from { transform: rotate(-26deg); } to { transform: rotate(24deg); } }
.building .dn-beam { animation-duration: .5s !important; opacity: .42; }
.drop .dn-beam { animation-duration: 1.1s !important; opacity: .5; }

/* mirror ball and the light flecks it throws around the room */
.dn-ball { position: absolute; width: 92px; height: 92px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 16px rgba(255,255,255,.35)); }
.dn-ball svg { display: block; }
.dn-flecks { position: absolute; width: 0; height: 0; pointer-events: none; opacity: .55; }
.dn-flecks i { position: absolute; left: -1100px; top: -1100px; width: 2200px; height: 2200px; border-radius: 50%;
  background-image: radial-gradient(circle, rgba(255,255,255,.95) 0 1.8px, transparent 2.8px), radial-gradient(circle, rgba(200,230,255,.8) 0 1.3px, transparent 2.2px),
    radial-gradient(circle, rgba(255,220,240,.75) 0 1.1px, transparent 2px);
  background-size: 97px 83px, 61px 71px, 43px 109px; background-position: 0 0, 17px 31px, 29px 7px;
  -webkit-mask-image: radial-gradient(circle, transparent 0 60px, #000 140px, #000 55%, transparent 70%); mask-image: radial-gradient(circle, transparent 0 60px, #000 140px, #000 55%, transparent 70%);
  animation: dn-spin 30s linear infinite; }
@keyframes dn-spin { to { transform: rotate(360deg); } }
.drop .dn-flecks i { animation-duration: 7s; }
.drop .dn-flecks { opacity: .8; }

/* LED floor: tiles flash in a pattern on every beat */
.dn-floor { position: absolute; inset: 0; pointer-events: none; }
.dn-floor .lt { opacity: .04; transition: opacity .3s ease-out; fill: var(--c1); }
.dn-floor .lt.w3 { --far: .7; } .dn-floor .lt.w4 { --far: .5; } .dn-floor .lt.w5 { --far: .35; }
.dn-floor .lt.c1 { fill: var(--c2); } .dn-floor .lt.c2 { fill: var(--c3); }
.dn-floor[data-b="0"] .p0, .dn-floor[data-b="1"] .p1, .dn-floor[data-b="2"] .p2, .dn-floor[data-b="3"] .p3 { opacity: calc(.3 * var(--far, 1)); transition: none; }
/* the floor is glossy: a dark falloff toward the back and a soft specular band, over the lit tiles */
.dn-floorfx { position: absolute; left: 0; right: 0; top: 372px; bottom: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,5,16,.7) 0%, rgba(8,5,16,.2) 30%, rgba(8,5,16,0) 55%, rgba(8,5,16,.35) 100%),
    linear-gradient(100deg, transparent 30%, rgba(255,255,255,.035) 42%, transparent 54%); }
.drop .dn-floor .lt { opacity: calc(.1 * var(--far, 1)); }
.drop .dn-floor[data-b="0"] .p0, .drop .dn-floor[data-b="1"] .p1, .drop .dn-floor[data-b="2"] .p2, .drop .dn-floor[data-b="3"] .p3 { opacity: calc(.4 * var(--far, 1)); }

/* crowd: back rows bob on the beat */
.dn-crowd { position: absolute; inset: 0; pointer-events: none; }
.dn-crowd.back.bob { animation: dn-bob .3s ease-out; }
.drop .dn-crowd.back.bob { animation: dn-jumpc .3s ease-out; }
@keyframes dn-bob { 0% { transform: translateY(5px); } 100% { transform: none; } }
@keyframes dn-jumpc { 0% { transform: translateY(-14px); } 100% { transform: none; } }

/* the DJ (behind the booth lip) and the decks */
.dn-dj { position: absolute; width: 0; height: 264px; }
.dn-dj::before { content: ""; position: absolute; left: -320px; width: 640px; top: 0; height: 264px; }
.dn-djbody, .dn-djhead { position: absolute; left: 0; will-change: transform; }
.dn-djbody { top: 126px; clip-path: inset(0 0 12px 0); }
.dn-djhead { top: 50px; }
.dn-djbody svg, .dn-djhead svg { display: block; }
.dn-platter { position: absolute; width: 120px; height: 120px; transform: translate(-50%, -50%) scaleY(.28); }
.dn-plat-in { width: 120px; height: 120px; animation: dn-spin 1.8s linear infinite; }
.dn-plat-in svg { display: block; }
.drop .dn-plat-in { animation-duration: .6s; }

/* the booth's LED display: BPM and HYPE */
.dn-display { position: absolute; height: 72px; display: flex; align-items: center; gap: 18px; padding: 0 18px; border-radius: 9px;
  background: linear-gradient(180deg, #08060e, #110c1a); border: 2px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 6px 14px rgba(0,0,0,.85), 0 0 22px color-mix(in oklab, var(--c1) 30%, transparent); }
.dn-display.up { animation: dn-dispup .5s ease-out; }
.dn-display.down { animation: dn-dispdown .5s ease-out; }
@keyframes dn-dispup { 30% { box-shadow: inset 0 6px 14px rgba(0,0,0,.85), 0 0 50px var(--c1); } }
@keyframes dn-dispdown { 30% { filter: brightness(.5); } }
.dn-bpm { display: flex; align-items: baseline; gap: 6px; min-width: 132px; font-family: var(--font-term); color: var(--c1); text-shadow: 0 0 10px var(--c1); }
.dn-bpm b { font-weight: 400; font-size: 64px; line-height: 1; color: #fff; text-shadow: 0 0 8px var(--c1), 0 0 22px var(--c1); font-variant-numeric: tabular-nums; }
.dn-bpm small { font-size: 22px; letter-spacing: .1em; }
.dn-hype { flex: 1; }
.dn-hypehead { display: flex; justify-content: space-between; font-family: var(--font-term); font-size: 22px; line-height: 1; letter-spacing: .12em; color: rgba(255,243,220,.75); margin-bottom: 6px; }
.dn-hypelbl { color: #fff; }
.dn-tiername { color: var(--c2); text-shadow: 0 0 8px var(--c2); }
.dn-segs { display: flex; gap: 4px; }
.dn-segs i { flex: 1; height: 22px; border-radius: 3px; background: #1d1828; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: background .12s, box-shadow .12s; }
.dn-segs i.on { background: var(--c2); box-shadow: 0 0 8px var(--c2), inset 0 1px 0 rgba(255,255,255,.4); }
.dn-segs i.warm.on { background: #ffd23f; box-shadow: 0 0 8px #ffd23f, inset 0 1px 0 rgba(255,255,255,.5); }
.dn-segs i.hot.on { background: #ff3d7f; box-shadow: 0 0 10px #ff3d7f, inset 0 1px 0 rgba(255,255,255,.5); }
.building .dn-segs i.on { animation: dn-blink .25s steps(1) infinite; }
.drop .dn-segs i.on { background: #fff; box-shadow: 0 0 10px #fff, 0 0 18px #ff3d7f; }
@keyframes dn-blink { 50% { opacity: .3; } }

/* dancers */
.dn-opps { position: absolute; inset: 0; pointer-events: none; }
.dn-rig { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; pointer-events: none; }
.dn-j { position: absolute; width: 0; height: 0; transform-origin: 0 0; }
.dn-rig.me .dn-j { will-change: transform; }
.dn-part { position: absolute; display: block; pointer-events: none; }
.dn-shadow { position: absolute; left: -100px; width: 200px; height: 34px; margin-top: -17px; border-radius: 50%; transform-origin: 50% 50%;
  background: radial-gradient(closest-side, rgba(4,2,8,.8), rgba(4,2,8,.35) 60%, transparent); }
.dn-rig.me .dn-shadow { will-change: transform, opacity; }
.dn-tag { position: absolute; transform: translateX(-50%); font-size: 13px; font-weight: 700; color: rgba(255,243,220,.55); white-space: nowrap; text-shadow: 0 1px 3px #000; }

/* spotlight on whoever is winning */
.dn-spot { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; transition: transform .7s cubic-bezier(.3,.9,.3,1); }
.dn-spot::before { content: ""; position: absolute; left: -190px; bottom: 0; width: 380px; height: 980px;
  background: linear-gradient(to bottom, rgba(255,244,214,0) 0%, rgba(255,244,214,.05) 40%, rgba(255,244,214,.17) 100%); clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%); }
.dn-spot::after { content: ""; position: absolute; left: -170px; top: -34px; width: 340px; height: 68px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,244,214,.38), rgba(255,244,214,.12) 60%, transparent); }

/* blackout (a rival's signature move): lights cut, the runway barely lit */
.dn-black { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: radial-gradient(420px 300px at 300px 640px, rgba(2,1,5,.6), rgba(2,1,5,.93) 100%); }
.blackout .dn-black { opacity: 1; }
.blackout .dn-beams, .blackout .dn-flecks, .blackout .dn-floor, .blackout .dn-ledpulse { opacity: 0; }
.blackout .dn-word .dn-txt { color: rgba(255,243,220,.3) !important; text-shadow: none !important; }
.blackout .dn-word .dn-plate { box-shadow: none !important; background: #07050c !important; }
.blackout .dn-strip { filter: brightness(.3); }

/* the runway */
.dn-lane { position: absolute; left: 470px; right: -20px; height: 104px; transform: translateY(-50%); pointer-events: none; }
.dn-strip { position: absolute; inset: 0; overflow: hidden; border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #19122a 0%, #0c0914 55%, #060409 100%);
  box-shadow: 0 0 0 2px #000, inset 0 1px 0 rgba(255,255,255,.14), inset 0 -2px 0 rgba(0,0,0,.6), 0 14px 30px rgba(0,0,0,.6), 0 -2px 26px color-mix(in oklab, var(--c1) 26%, transparent); }
.dn-strip::before, .dn-strip::after { content: ""; position: absolute; left: 0; width: 200%; height: 5px; opacity: .9;
  background: repeating-linear-gradient(90deg, var(--c1) 0 10px, transparent 10px 22px, var(--c2) 22px 32px, transparent 32px 44px); animation: dn-chase 1.2s linear infinite; }
.dn-strip::before { top: 6px; } .dn-strip::after { bottom: 6px; animation-direction: reverse; }
@keyframes dn-chase { to { transform: translateX(-44px); } }
.dn-words { position: absolute; left: -470px; top: 0; bottom: 0; width: 0; }
.dn-word { position: absolute; left: 0; top: 50%; white-space: nowrap; will-change: transform; }
.dn-in { position: relative; padding: 9px 18px 11px; transform-origin: 0 50%; transition: transform .2s ease-out; }
.dn-word:not(.cur):not(.landed):not(.missed) .dn-in { transform: scale(.68); }
.dn-plate { position: absolute; inset: 0; border-radius: 12px; border: 2px solid #000;
  background: linear-gradient(180deg, #2a2142 0%, #150f22 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 0 2px color-mix(in oklab, var(--c1) 45%, transparent), 0 8px 16px rgba(0,0,0,.6); }
.dn-txt { position: relative; font-family: var(--font-display); font-size: 48px; line-height: 1; letter-spacing: .03em; color: rgba(255,243,220,.6); white-space: pre; }
.dn-word.cur { z-index: 2; }
.dn-word.cur .dn-txt { color: #fff6e2; text-shadow: 0 2px 0 #000, 0 0 16px color-mix(in oklab, var(--c1) 55%, transparent); --ok-c: #ffd23f; --caret-c: #ff3d7f; --bad-c: #ff4b3e; }
.dn-word.cur .dn-plate { background: linear-gradient(180deg, #3b2c5f 0%, #1b1230 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 3px var(--c1), 0 0 28px color-mix(in oklab, var(--c1) 65%, transparent), 0 10px 20px rgba(0,0,0,.65); }
.dn-word.cur .tline .ch.ok { text-shadow: 0 2px 0 #000, 0 0 12px rgba(255,210,63,.75); }
.dn-word.sig .dn-plate { background: linear-gradient(180deg, #5a4210 0%, #2a1d05 100%); box-shadow: inset 0 1px 0 rgba(255,240,180,.4), 0 0 0 3px #ffd23f, 0 0 24px rgba(255,210,63,.55), 0 8px 16px rgba(0,0,0,.6); }
.dn-word.sig .dn-txt { color: #ffe9a6; }
.dn-sigtag { position: absolute; left: 14px; top: -14px; padding: 2px 8px 3px; border-radius: 5px; background: linear-gradient(#ffe27a, #e0a900); color: #3d2e00;
  font-size: 11px; font-weight: 900; letter-spacing: .14em; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.dn-word.shout .dn-plate { background: linear-gradient(180deg, #ff3d7f 0%, #8f0d42 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 3px #fff, 0 0 30px rgba(255,61,127,.7); }
.dn-word.shout .dn-txt { color: #fff; }
.dn-word.cur.shout .dn-txt { --ok-c: #d7ff3c; }
.dn-word.landed .dn-in { animation: dn-landed .55s ease-out forwards; }
.dn-word.missed .dn-in { animation: dn-missed .6s ease-in forwards; }
@keyframes dn-landed { 0% { transform: scale(1); } 25% { transform: scale(1.18); opacity: 1; } 100% { transform: translateY(-70px) scale(.9); opacity: 0; } }
@keyframes dn-missed { 0% { transform: none; } 30% { transform: translateY(-10px) rotate(-3deg); } 100% { transform: translateY(90px) rotate(14deg); opacity: 0; } }

/* the hit gate and the on-beat ring that closes onto it every beat */
.dn-gatewrap { position: absolute; width: 0; height: 0; }
.dn-gate { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; filter: drop-shadow(0 0 14px rgba(255,61,127,.55)); }
.dn-gate svg { display: block; }
.dn-gatewrap.beat .dn-gate { animation: dn-gatebeat .2s ease-out; }
.dn-gatewrap.perfect .dn-gate { animation: dn-perfect .45s ease-out; }
@keyframes dn-gatebeat { 0% { transform: scale(1.14); } 100% { transform: none; } }
@keyframes dn-perfect { 0% { transform: scale(1.35); filter: drop-shadow(0 0 30px #ffd23f) brightness(1.6); } 100% { transform: none; } }
.dn-ring { position: absolute; left: 0; top: 0; width: 84px; height: 84px; border-radius: 50%; border: 2px solid rgba(255,244,214,.32); will-change: transform; }
.dn-ring.hot { border: 3px solid #ffd23f; box-shadow: 0 0 16px rgba(255,210,63,.8), inset 0 0 10px rgba(255,210,63,.5); }

/* moments */
.dn-strobe { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.dn-strobe.on { animation: dn-strobe .14s ease-out; }
@keyframes dn-strobe { 0% { opacity: .1; } 100% { opacity: 0; } }
/* reduced motion: no strobe, calmer lights */
body.calm .dn-strobe { display: none; }
body.calm .dn-beam, body.calm .dn-flecks i, body.calm .dn-strip::before, body.calm .dn-strip::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .dn-strobe { display: none; } .dn-flecks i { animation: none; } }
.dn-banner { position: absolute; left: 50%; top: 150px; transform: translate(-50%, 0) scale(0); opacity: 0; pointer-events: none; text-align: center; }
.dn-banner b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 130px; line-height: .9; color: #fff;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 #ff3d7f, 0 8px 0 #8f0d42, 0 12px 0 var(--ink), 0 0 60px rgba(255,61,127,.8); }
.dn-banner span { display: inline-block; margin-top: 10px; padding: 6px 16px; border-radius: 8px; background: #d7ff3c; color: var(--ink); font-weight: 900; letter-spacing: .14em; font-size: 22px; text-transform: uppercase; }
.dn-banner.show { animation: dn-banner 1.8s cubic-bezier(.2,.9,.3,1.2) forwards; }
@keyframes dn-banner { 0% { transform: translate(-50%, 0) scale(3) rotate(-8deg); opacity: 0; } 14% { transform: translate(-50%, 0) scale(1) rotate(-3deg); opacity: 1; }
  80% { transform: translate(-50%, 0) scale(1.04) rotate(-3deg); opacity: 1; } 100% { transform: translate(-50%, -40px) scale(.9) rotate(-3deg); opacity: 0; } }
.dn-callout { position: absolute; left: 520px; top: 590px; transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; font-family: var(--font-display); font-size: 34px; color: #fff;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.dn-callout.gold { color: #ffd23f; }
.dn-callout.count { font-size: 90px; color: #d7ff3c; top: 560px; }
.dn-callout.show { animation: dn-callout .7s ease-out forwards; }
@keyframes dn-callout { 0% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(.95); opacity: 0; } }
