(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20228,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(19455),r=e.i(37727),l=e.i(75254);let o=(0,l.default)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);var i=e.i(67240),n=e.i(63059);let d=(0,l.default)("pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var h=e.i(25147),c=e.i(55711),u=e.i(63639);let x=(0,l.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var f=e.i(39312),m=e.i(3116),p=e.i(64030);let g=(0,l.default)("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);var b=e.i(62568),y=e.i(83086);let v=(0,l.default)("wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]),M=(0,l.default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]),w=(0,l.default)("feather",[["path",{d:"M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z",key:"18jl4k"}],["path",{d:"M16 8 2 22",key:"vp34q"}],["path",{d:"M17.5 15H9",key:"1oz8nu"}]]),k=(0,l.default)("heart-pulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]),j=(0,l.default)("battery",[["path",{d:"M 22 14 L 22 10",key:"nqc4tb"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]]),S=(0,l.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);var N=e.i(58377);let P=(0,l.default)("split",[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]]),C=(0,l.default)("magnet",[["path",{d:"m6 15-4-4 6.75-6.77a7.79 7.79 0 0 1 11 11L13 22l-4-4 6.39-6.36a2.14 2.14 0 0 0-3-3L6 15",key:"1i3lhw"}],["path",{d:"m5 8 4 4",key:"j6kj7e"}],["path",{d:"m12 15 4 4",key:"lnac28"}]]),B=(0,l.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),T=(0,l.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),I=(0,l.default)("shield-half",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 22V2",key:"zs6s6o"}]]);var R=e.i(43553),L=e.i(70273);let $=(0,l.default)("shield-plus",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9 12h6",key:"1c52cq"}],["path",{d:"M12 9v6",key:"199k2o"}]]),E=(0,l.default)("battery-charging",[["path",{d:"m11 7-3 5h4l-3 5",key:"b4a64w"}],["path",{d:"M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935",key:"lre1cr"}],["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936",key:"13q5k0"}]]),H=[{id:"speed",title:"速度 +12%",desc:"飞船最大速度提升",color:"#34d399",icon:"Wind"},{id:"accel",title:"加速度 +15%",desc:"更灵活的转向响应",color:"#34d399",icon:"Gauge"},{id:"friction",title:"摩擦优化 +5%",desc:"惯性更小,转向更利落",color:"#34d399",icon:"Feather"},{id:"shield_max",title:"护盾上限 +25",desc:"最高护盾值提升",color:"#34d399",icon:"Shield"},{id:"shield_regen",title:"护盾恢复 +50%",desc:"未受击时护盾回血更快",color:"#34d399",icon:"HeartPulse"},{id:"energy_max",title:"能量上限 +25",desc:"更多射击储备",color:"#fbbf24",icon:"Battery"},{id:"energy_regen",title:"能量恢复 +30%",desc:"能量回充加速",color:"#fbbf24",icon:"Zap"},{id:"firepower",title:"火力 +25%",desc:"每发子弹伤害更高",color:"#fb7185",icon:"Flame"},{id:"fire_rate",title:"射速 +20%",desc:"射击间隔更短",color:"#fb7185",icon:"Timer"},{id:"double_shot",title:"双发",desc:"每次射击发射 2 发(仅一次)",color:"#e879f9",icon:"Split"},{id:"attract_radius",title:"吸引半径 +40%",desc:"更远距离吸取收集物",color:"#e879f9",icon:"Magnet"},{id:"collect_radius",title:"收集半径 +50%",desc:"更易拾取道具与晶体",color:"#e879f9",icon:"Circle"},{id:"invuln_time",title:"无敌时间 +200ms",desc:"受击后更多喘息",color:"#34d399",icon:"ShieldCheck"},{id:"damage_reduce",title:"受击伤害 -20%",desc:"减少承受的伤害",color:"#34d399",icon:"ShieldHalf"},{id:"boss_bonus",title:"BOSS 战金币 +50%",desc:"击败 BOSS 奖励翻倍加成",color:"#fbbf24",icon:"Crown"},{id:"normal_score",title:"普通关卡分数 +30%",desc:"通关得分提升",color:"#fbbf24",icon:"Star"},{id:"start_shield",title:"起始护盾 +20",desc:"每局开局更高护盾",color:"#34d399",icon:"ShieldPlus"},{id:"start_energy",title:"起始能量 +20",desc:"每局开局更多能量",color:"#fbbf24",icon:"BatteryCharging"}];function W(){return{speedMult:1,accelMult:1,frictionBonus:0,shieldMaxBonus:0,shieldRegenMult:1,energyMaxBonus:0,energyRegenMult:1,firepowerMult:1,fireRateMult:1,doubleShot:!1,attractRadiusMult:1,collectRadiusMult:1,invulnBonusMs:0,damageReduceMult:1,bossBonusMult:1,normalScoreMult:1,startShieldBonus:0,startEnergyBonus:0}}function A(e){return 100+e.upgrades.shieldMaxBonus}function _(e){return 100+e.upgrades.energyMaxBonus}function D(e){return 900*e.upgrades.accelMult}function F(e){return 600+e.upgrades.invulnBonusMs}function X(e,t){e.shakeAmount=t??14,e.shakeTimer=280}function z(e,t){for(e.particles.push({id:e.nextEntityId++,type:"particle",...t});e.particles.length>200;)e.particles.shift()}function Y(e,t,a,s,r,l=180,o=.6,i=3){for(let n=0;n=80&&e.bullets.shift(),e.bullets.push({id:e.nextEntityId++,type:"bullet",...t})}function U(e,t,a,s){let r=["shield","energy","rapid","overdrive","magnet"],l=r[Math.floor(Math.random()*r.length)],o="boss"===s?18:10;e.powerups.length>=12&&e.powerups.shift(),e.powerups.push({id:e.nextEntityId++,type:"powerup",...{x:t,y:a,vx:(Math.random()-.5)*30,vy:20+20*Math.random(),powerupType:l,radius:14,rotation:0,rotationSpeed:(Math.random()-.5)*2,pulsePhase:Math.random()*Math.PI*2,life:o,maxLife:o,collected:!1}})}function q(e){let t=e.level,a=e.collectedCrystals*(8+2*t),s=e.collectedInsights*(2+.5*t),r=e.collectedBeacons*(1.5+.3*t),l=1;"won"===e.phase?(l=e.isBossLevel?3:1.5,e.isBossLevel&&(l*=e.upgrades.bossBonusMult)):"lost"===e.phase&&(l=.5);let o={crystals:Math.round(a*l),insights:Math.round(s*l*10)/10,contact:Math.round(r*l*10)/10},i=Math.max(0,1e3-5*e.timeSec),n=Math.round(10*e.ship.shield),d="won"===e.phase?e.isBossLevel?5e3:2e3:0,h=e.score+i+n+d+500*t;return{level:t,phase:e.phase,isBossLevel:e.isBossLevel,durationSec:Math.round(10*e.timeSec)/10,collectedCrystals:e.collectedCrystals,collectedInsights:e.collectedInsights,collectedBeacons:e.collectedBeacons,remainingShield:Math.round(e.ship.shield),score:Math.round(h),rewards:o,timestamp:Date.now()}}let V="echo-nexus-cruise-v1";function K(){return{highScore:0,totalRuns:0,totalWins:0,bestLevel:0,totalCrystals:0,totalInsights:0,totalContact:0,bossKills:0,lastResult:null,recentResults:[]}}function Z(){try{let e=window.localStorage.getItem(V);if(!e)return K();let t=JSON.parse(e);return{...K(),...t,recentResults:Array.isArray(t.recentResults)?t.recentResults.slice(0,20):[]}}catch{return K()}}var J=e.i(18533),Q=e.i(52664);let ee="#34d399",et="#34d399",ea="#d1fae5",es="#e879f9",er="#fbbf24",el="#fb7185",eo={shield:"#34d399",energy:"#fbbf24",rapid:"#e879f9",overdrive:"#fb7185",magnet:"#a7f3d0"},ei={Wind:v,Gauge:M,Feather:w,Shield:x,HeartPulse:k,Battery:j,Zap:f.Zap,Flame:N.Flame,Timer:S,Split:P,Magnet:C,Circle:B,ShieldCheck:T,ShieldHalf:I,Crown:R.Crown,Star:L.Star,ShieldPlus:$,BatteryCharging:E};function en({onClose:e}){let l=(0,a.useRef)(null),v=(0,a.useRef)(null),M=(0,a.useRef)(W()),w=(0,a.useRef)([]),k=(0,a.useRef)(0),j=(0,a.useRef)(0),S=(0,a.useRef)([]),N=(0,a.useRef)(new Set),P=(0,a.useRef)({active:!1,baseX:0,baseY:0,knobX:0,knobY:0,touchId:null}),C=(0,a.useRef)(!1),B=(0,a.useRef)(!1),T=(0,a.useRef)(!1),I=(0,a.useRef)("ready"),R=(0,a.useRef)(null),L=(0,a.useRef)({shield:100,shieldMax:100,energy:100,energyMax:100,score:0,time:0,duration:60,crystals:0,totalCrystals:0,insights:0,totalInsights:0,beacons:0,totalBeacons:0,lowShield:!1,isBossLevel:!1,bossHp:0,bossMaxHp:0,bossPhase:1,buffs:[],appliedUpgrades:[],pickupFlashColor:null}),$=(0,a.useRef)(0),E=(0,a.useRef)({w:0,h:0}),[K,en]=(0,a.useState)("ready"),[ed,eh]=(0,a.useState)(1),[ec,eu]=(0,a.useState)(null),[ex,ef]=(0,a.useState)(()=>Z()),[em,ep]=(0,a.useState)(!1),[eg]=(0,a.useState)(()=>"ontouchstart"in window||navigator.maxTouchPoints>0),[eb,ey]=(0,a.useState)({baseX:0,baseY:0,knobX:0,knobY:0,active:!1}),[ev,eM]=(0,a.useState)([]),[ew,ek]=(0,a.useState)(null),[ej,eS]=(0,a.useState)([]),[eN,eP]=(0,a.useState)({shield:100,shieldMax:100,energy:100,energyMax:100,score:0,time:0,duration:60,crystals:0,totalCrystals:0,insights:0,totalInsights:0,beacons:0,totalBeacons:0,lowShield:!1,isBossLevel:!1,bossHp:0,bossMaxHp:0,bossPhase:1,buffs:[],appliedUpgrades:[],pickupFlashColor:null}),eC=(0,a.useCallback)(e=>{let{w:t,h:a}=E.current;if(0===t||0===a)return;let s=function(e,t=Date.now()){var a=`cruise-l${e}-s${t}`;let s=0x811c9dc5;for(let e=0;e>>0}(e),r=function(e,t,a,s,r=W(),l=[]){let o,i,n=(i=t>>>0,function(){i|=0;let e=i=i+0x6d2b79f5|0;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/0x100000000}),d=1,h=e>0&&e%5==0,c=Math.min(100+r.shieldMaxBonus,100+r.shieldMaxBonus+r.startShieldBonus),u=Math.min(100+r.energyMaxBonus,100+r.energyMaxBonus+r.startEnergyBonus),x={id:d++,type:"ship",x:a/2,y:s-80,vx:0,vy:0,heading:-Math.PI/2,shield:c,energy:u,radius:14,thrust:0},f=[],m=null,p=0,g=0,b=0;if(h){let t=100+20*e;m={id:d++,type:"boss",x:a/2,y:.3*s,vx:0,vy:0,hp:t,maxHp:t,radius:70,rotation:0,rotationSpeed:.3,pulsePhase:0,attackPhase:1,directTimer:1.5,homingTimer:2,summonTimer:4,driftAngle:0,dropStage:0,breathPhase:0,tentaclePhase:0},o=120;for(let t=0;t<4;t++){let t=14+16*n(),r=60+n()*(a-120),l=60+n()*(s-120),o=20+30*n(),i=n()*Math.PI*2,h=7+Math.floor(4*n()),c=[];for(let e=0;eMath.hypot(l-x.x,o-x.y)||100>Math.hypot(l-t.x,o-t.y)))let h=30+60*n()+4*e,c=n()*Math.PI*2,u=7+Math.floor(4*n()),m=[];for(let e=0;eMath.hypot(r-x.x,l-x.y)||150>Math.hypot(r-t.x,l-t.y)))let i=12+18*n(),h=n()*Math.PI*2;f.push({id:d++,type:"storm",x:r,y:l,vx:Math.cos(h)*i,vy:Math.sin(h)*i,radius:e,rotation:n()*Math.PI*2,rotationSpeed:(n()-.5)*.4,lightningTimer:.5*n(),cloudSeed:Math.floor(1e4*n())})}p=5+e;for(let e=0;eMath.hypot(e-x.x,t-x.y))f.push({id:d++,type:"crystal",x:e,y:t,vx:0,vy:0,radius:12,rotation:n()*Math.PI*2,rotationSpeed:(n()-.5)*2,pulsePhase:n()*Math.PI*2,collected:!1})}g=2+Math.floor(e/3);for(let e=0;eMath.hypot(e-x.x,t-x.y))f.push({id:d++,type:"insight",x:e,y:t,vx:0,vy:0,radius:14,pulsePhase:n()*Math.PI*2,swirlAngle:n()*Math.PI*2,collected:!1})}b=1+Math.floor(e/4);for(let e=0;eMath.hypot(e-x.x,t-x.y))f.push({id:d++,type:"beacon",x:e,y:t,vx:0,vy:0,radius:16,rotation:n()*Math.PI*2,rotationSpeed:(n()-.5)*1.5,pulsePhase:n()*Math.PI*2,collected:!1})}o=Math.min(60+(e-1)*3,90)}return{phase:"ready",level:e,seed:t,ship:x,entities:f,particles:[],bullets:[],powerups:[],boss:m,isBossLevel:h,score:0,timeSec:0,durationSec:o,collectedCrystals:0,collectedInsights:0,collectedBeacons:0,totalCrystals:p,totalInsights:g,totalBeacons:b,shakeAmount:0,shakeTimer:0,flashLowShield:!1,pickupFlash:null,worldWidth:a,worldHeight:s,nextEntityId:d,invulnTimer:0,shootCooldown:0,endedAt:null,upgrades:r,appliedUpgrades:l,pendingUpgradeChoice:[],activeBuffs:[],bossDefeated:!1}}(e,s,t,a,M.current,w.current);r.phase="playing",v.current=r,B.current=!1,R.current=null,eu(null),eh(e),en("playing"),I.current="playing",ep(!1),T.current=!1,ek(null),L.current={shield:r.ship.shield,shieldMax:100+r.upgrades.shieldMaxBonus,energy:r.ship.energy,energyMax:100+r.upgrades.energyMaxBonus,score:0,time:0,duration:r.durationSec,crystals:0,totalCrystals:r.totalCrystals,insights:0,totalInsights:r.totalInsights,beacons:0,totalBeacons:r.totalBeacons,lowShield:!1,isBossLevel:r.isBossLevel,bossHp:r.boss?.hp??0,bossMaxHp:r.boss?.maxHp??0,bossPhase:r.boss?.attackPhase??1,buffs:[],appliedUpgrades:r.appliedUpgrades,pickupFlashColor:null},eP({...L.current})},[]);(0,a.useEffect)(()=>{let e=l.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let a=()=>{let a=Math.min(window.devicePixelRatio||1,2),s=window.innerWidth,r=window.innerHeight;e.width=Math.floor(s*a),e.height=Math.floor(r*a),e.style.width=s+"px",e.style.height=r+"px",t.setTransform(a,0,0,a,0,0),E.current={w:s,h:r},S.current=function(e,t){let a=[{stars:[],speed:8,parallax:.1},{stars:[],speed:18,parallax:.25},{stars:[],speed:36,parallax:.5}],s=[100,60,30];for(let r=0;rwindow.removeEventListener("resize",a)},[]),(0,a.useEffect)(()=>{let t=t=>{let a=t.key.toLowerCase();if(["w","a","s","d","arrowup","arrowdown","arrowleft","arrowright"].includes(a))N.current.add(a),t.preventDefault();else if(" "===a||"spacebar"===a)C.current=!0,t.preventDefault();else if("p"===a){if("playing"===I.current){let e=!T.current;T.current=e,ep(e)}}else"escape"===a&&e()},a=e=>{let t=e.key.toLowerCase();["w","a","s","d","arrowup","arrowdown","arrowleft","arrowright"].includes(t)?N.current.delete(t):(" "===t||"spacebar"===t)&&(C.current=!1)};return window.addEventListener("keydown",t),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",a)}},[e]),(0,a.useEffect)(()=>{let e=()=>{C.current=!1,"playing"===I.current&&(T.current=!0,ep(!0))};return window.addEventListener("blur",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("blur",e),document.removeEventListener("visibilitychange",e)}},[]),(0,a.useEffect)(()=>{let e=e=>{if("playing"===I.current&&!T.current)for(let t=0;t.65*window.innerWidth&&a.clientY>.55*window.innerHeight){C.current=!0,e.preventDefault();continue}if(a.clientX<.5*window.innerWidth&&a.clientY>.35*window.innerHeight){if(P.current.active)continue;P.current={active:!0,baseX:a.clientX,baseY:a.clientY,knobX:0,knobY:0,touchId:a.identifier},ey({baseX:a.clientX,baseY:a.clientY,knobX:0,knobY:0,active:!0}),e.preventDefault();return}}},t=e=>{if(P.current.active)for(let t=0;t0?s/l*o:0,n=l>0?r/l*o:0;P.current.knobX=i/55,P.current.knobY=n/55,ey({baseX:P.current.baseX,baseY:P.current.baseY,knobX:i,knobY:n,active:!0}),e.preventDefault();return}},a=e=>{for(let t=0;t.65*window.innerWidth&&a.clientY>.55*window.innerHeight&&(C.current=!1)}e.preventDefault()};return window.addEventListener("touchstart",e,{passive:!1}),window.addEventListener("touchmove",t,{passive:!1}),window.addEventListener("touchend",a,{passive:!1}),window.addEventListener("touchcancel",a,{passive:!1}),()=>{window.removeEventListener("touchstart",e),window.removeEventListener("touchmove",t),window.removeEventListener("touchend",a),window.removeEventListener("touchcancel",a)}},[]),(0,a.useEffect)(()=>{let e=l.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let a=e=>{k.current=requestAnimationFrame(a);let s=0===j.current?16:e-j.current;j.current=e;let r=Math.min(s/1e3,.05),{w:l,h:o}=E.current;if(0===l||0===o)return;let i=v.current;if(i&&"playing"===i.phase&&!T.current&&i){let t=0,a=0,r=N.current;(r.has("w")||r.has("arrowup"))&&(a-=1),(r.has("s")||r.has("arrowdown"))&&(a+=1),(r.has("a")||r.has("arrowleft"))&&(t-=1),(r.has("d")||r.has("arrowright"))&&(t+=1),P.current.active&&(t=P.current.knobX,a=P.current.knobY);let l=function(e,t,a){let s,r;if("playing"!==e.phase)return null;let l=Math.min(t/1e3,.05);e.timeSec+=l,e.shakeTimer>0&&(e.shakeTimer-=t,e.shakeTimer<=0&&(e.shakeTimer=0,e.shakeAmount=0)),e.pickupFlash&&(e.pickupFlash.timer-=t,e.pickupFlash.timer<=0&&(e.pickupFlash=null)),e.invulnTimer>0&&(e.invulnTimer=Math.max(0,e.invulnTimer-t)),e.shootCooldown>0&&(e.shootCooldown=Math.max(0,e.shootCooldown-t));for(let t=e.activeBuffs.length-1;t>=0;t--)e.activeBuffs[t].remaining-=l,e.activeBuffs[t].remaining<=0&&e.activeBuffs.splice(t,1);let o=e.ship;if(a.active&&(0!==a.dx||0!==a.dy)){let t=Math.hypot(a.dx,a.dy),s=a.dx/t,r=a.dy/t;o.vx+=s*D(e)*l,o.vy+=r*D(e)*l,o.heading=Math.atan2(r,s),o.thrust=Math.min(1,o.thrust+4*l),.9>Math.random()&&G(e,o),.5>Math.random()&&G(e,o)}else o.thrust=Math.max(0,o.thrust-3*l);let i=Math.pow(Math.min(.98,.88+e.upgrades.frictionBonus),60*l);o.vx*=i,o.vy*=i;let n=Math.hypot(o.vx,o.vy),d=(s=e.upgrades.speedMult,e.activeBuffs.some(e=>"overdrive"===e.type)&&(s*=1.5),280*s);for(let t of(n>d&&(o.vx=o.vx/n*d,o.vy=o.vy/n*d),o.x+=o.vx*l,o.y+=o.vy*l,o.xe.worldWidth-o.radius&&(o.x=e.worldWidth-o.radius,o.vx=-(.4*Math.abs(o.vx))),o.ye.worldHeight-o.radius&&(o.y=e.worldHeight-o.radius,o.vy=-(.4*Math.abs(o.vy))),a.shoot&&function(e){let t;if("playing"!==e.phase||e.shootCooldown>0)return;let a=e.ship;if(a.energy<5)return;a.energy-=5,t=e.upgrades.fireRateMult,e.activeBuffs.some(e=>"rapid"===e.type)&&(t*=.5),e.shootCooldown=150*t;let s=8*e.upgrades.firepowerMult,r=a.heading,l=a.x+Math.cos(r)*(a.radius+4),o=a.y+Math.sin(r)*(a.radius+4);if(O(e,{x:l,y:o,vx:540*Math.cos(r),vy:540*Math.sin(r),owner:"ship",radius:4,damage:s,life:1.4,homing:!1,homingTime:0,color:"#34d399"}),e.upgrades.doubleShot)for(let t of[.14,-.14]){let l=r+t;O(e,{x:a.x+Math.cos(l)*(a.radius+4),y:a.y+Math.sin(l)*(a.radius+4),vx:540*Math.cos(l),vy:540*Math.sin(l),owner:"ship",radius:4,damage:s,life:1.4,homing:!1,homingTime:0,color:"#34d399"})}Y(e,l,o,"#a7f3d0",4,120,.25,2)}(e),e.invulnTimer<=0&&o.shielde.worldWidth+100||t.y<-100||t.y>e.worldHeight+100){if(t.summoned){t.damage=-999;break}let a=Math.floor(4*Math.random());0===a?(t.x=-t.radius,t.y=Math.random()*e.worldHeight,t.vx=Math.abs(t.vx)):1===a?(t.x=e.worldWidth+t.radius,t.y=Math.random()*e.worldHeight,t.vx=-Math.abs(t.vx)):2===a?(t.x=Math.random()*e.worldWidth,t.y=-t.radius,t.vy=Math.abs(t.vy)):(t.x=Math.random()*e.worldWidth,t.y=e.worldHeight+t.radius,t.vy=-Math.abs(t.vy))}break;case"storm":t.rotation+=t.rotationSpeed*l,t.lightningTimer-=l,t.lightningTimer<=0&&(t.lightningTimer=.3+.5*Math.random()),(t.xe.worldWidth-t.radius)&&(t.vx*=-1),(t.ye.worldHeight-t.radius)&&(t.vy*=-1);break;case"crystal":t.rotation+=t.rotationSpeed*l,t.pulsePhase+=3*l;break;case"insight":t.pulsePhase+=2.5*l,t.swirlAngle+=1.5*l;break;case"beacon":t.rotation+=t.rotationSpeed*l,t.pulsePhase+=2*l;break;case"stargate":{t.rotation+=t.rotationSpeed*l,t.pulsePhase+=2*l;let e=Math.hypot(o.x-t.x,o.y-t.y);t.active=e<200}}e.entities=e.entities.filter(e=>"asteroid"!==e.type||!(e.damage<=-100)),e.boss&&function(e,t){let a=e.boss;if(!a)return;let s=e.ship,r=a.hp/a.maxHp;r>.66?a.attackPhase=1:r>.33?a.attackPhase=2:a.attackPhase=3,a.rotation+=a.rotationSpeed*t,a.pulsePhase+=2*t,a.breathPhase+=1.4*t,a.tentaclePhase+=.8*t,a.driftAngle+=.4*t;let l=e.worldWidth/2+Math.cos(a.driftAngle)*(.25*e.worldWidth),o=.32*e.worldHeight+40*Math.sin(1.3*a.driftAngle),i=l-a.x,n=o-a.y,d=Math.hypot(i,n)||1;if(a.vx=i/d*18,a.vy=n/d*18,a.x+=a.vx*t,a.y+=a.vy*t,a.x=Math.max(a.radius+20,Math.min(e.worldWidth-a.radius-20,a.x)),a.y=Math.max(a.radius+20,Math.min(.55*e.worldHeight,a.y)),a.attackPhase>=1&&(a.directTimer-=t,a.directTimer<=0))if(a.directTimer=1===a.attackPhase?1.5:2.2,1===a.attackPhase){let t=Math.atan2(s.y-a.y,s.x-a.x);O(e,{x:a.x+Math.cos(t)*a.radius,y:a.y+Math.sin(t)*a.radius,vx:260*Math.cos(t),vy:260*Math.sin(t),owner:"boss",radius:6,damage:14,life:4,homing:!1,homingTime:0,color:"#fb7185"})}else{let t=Math.atan2(s.y-a.y,s.x-a.x);for(let s=-2;s<=2;s++){let r=t+.18*s;O(e,{x:a.x+Math.cos(r)*a.radius,y:a.y+Math.sin(r)*a.radius,vx:240*Math.cos(r),vy:240*Math.sin(r),owner:"boss",radius:6,damage:14,life:4,homing:!1,homingTime:0,color:"#fb7185"})}}if(a.attackPhase>=2&&(a.summonTimer-=t,a.summonTimer<=0)){a.summonTimer=4.5;for(let t=0;t<2;t++){let t=Math.random()*Math.PI*2,r=a.radius+10,l=a.x+Math.cos(t)*r,o=a.y+Math.sin(t)*r,i=100+60*Math.random(),n=Math.atan2(s.y-o,s.x-l)+(Math.random()-.5)*.8,d=[];for(let e=0;e<7;e++)d.push(.75+.4*Math.random());e.entities.push({id:e.nextEntityId++,type:"asteroid",x:l,y:o,vx:Math.cos(n)*i,vy:Math.sin(n)*i,radius:14+8*Math.random(),rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*2,vertices:d,damage:18,summoned:!0})}Y(e,a.x,a.y,"#e879f9",12,200,.5,3)}if(a.attackPhase>=3&&(a.homingTimer-=t,a.homingTimer<=0)){a.homingTimer=2;let t=Math.atan2(s.y-a.y,s.x-a.x);O(e,{x:a.x+Math.cos(t)*a.radius,y:a.y+Math.sin(t)*a.radius,vx:200*Math.cos(t),vy:200*Math.sin(t),owner:"boss",radius:7,damage:14,life:5,homing:!0,homingTime:3,color:"#e879f9"})}let h=Math.min(3,Math.floor((1-r)/.25));for(;a.dropStage=0;s--){let r=e.bullets[s];if(r.life-=t,r.life<=0){e.bullets.splice(s,1);continue}if(r.homing&&r.homingTime>0){r.homingTime-=t;let e=Math.atan2(a.y-r.y,a.x-r.x),s=Math.hypot(r.vx,r.vy),l=Math.atan2(r.vy,r.vx),o=e-l;for(;o>Math.PI;)o-=2*Math.PI;for(;o<-Math.PI;)o+=2*Math.PI;let i=l+Math.max(-2*t,Math.min(2*t,o));r.vx=Math.cos(i)*s,r.vy=Math.sin(i)*s}if(r.x+=r.vx*t,r.y+=r.vy*t,r.x<-50||r.x>e.worldWidth+50||r.y<-50||r.y>e.worldHeight+50){e.bullets.splice(s,1);continue}if(.4>Math.random()&&z(e,{x:r.x,y:r.y,vx:-(.05*r.vx),vy:-(.05*r.vy),life:.2,maxLife:.3,size:2,color:r.color,shrink:!0}),"ship"===r.owner){let t=!1;for(let a of e.entities)if("asteroid"===a.type&&Math.hypot(r.x-a.x,r.y-a.y)"overdrive"===e.type)){let t=r.damage*e.upgrades.damageReduceMult;a.shield=Math.max(0,a.shield-t),Y(e,a.x,a.y,"#fb7185",10,200,.4,3),X(e,10),e.invulnTimer=F(e)}e.bullets.splice(s,1);continue}}e.entities=e.entities.filter(e=>"asteroid"!==e.type||!(e.damage<=-100))}(e,l),function(e,t){let a=e.ship;for(let s=e.powerups.length-1;s>=0;s--){let r=e.powerups[s];if(r.collected||(r.life-=t,r.life<=0)){e.powerups.splice(s,1);continue}r.rotation+=r.rotationSpeed*t,r.pulsePhase+=3*t,r.x+=r.vx*t,r.y+=r.vy*t,r.vx*=.96,r.vy*=.96,r.x=Math.max(r.radius,Math.min(e.worldWidth-r.radius,r.x)),r.y=Math.max(r.radius,Math.min(e.worldHeight-r.radius,r.y));let l=Math.hypot(a.x-r.x,a.y-r.y),o=120*(e.activeBuffs.some(e=>"magnet"===e.type)?3:1);if(l=0;t--){let a=e.particles[t];if(a.life-=l,a.life<=0){e.particles.splice(t,1);continue}a.x+=a.vx*l,a.y+=a.vy*l,a.vx*=.96,a.vy*=.96}if(e.invulnTimer<=0){let t=e.activeBuffs.some(e=>"overdrive"===e.type);for(let a of e.entities)if("asteroid"===a.type&&Math.hypot(o.x-a.x,o.y-a.y)"overdrive"===e.type);for(let a of e.entities)if("storm"===a.type&&Math.hypot(o.x-a.x,o.y-a.y)Math.random()&&Y(e,o.x,o.y,"#e879f9",2,100,.4,2)}}if(e.invulnTimer<=0&&e.boss){let t=e.activeBuffs.some(e=>"overdrive"===e.type);if(Math.hypot(o.x-e.boss.x,o.y-e.boss.y)"magnet"===e.type)&&(r*=3),90*r),c=22*e.upgrades.collectRadiusMult;for(let t of e.entities)if("crystal"===t.type||"insight"===t.type||"beacon"===t.type){if(t.collected)continue;let a=Math.hypot(o.x-t.x,o.y-t.y);if(aMath.random()&&(t.powerupDropped=!0,U(e,t.x,t.y,"beacon"))))}if(e.boss&&e.boss.hp<=0&&!e.bossDefeated){e.bossDefeated=!0,e.phase="won",e.endedAt=Date.now();let t=e.boss.x,a=e.boss.y,s=["#fb7185","#fbbf24","#e879f9","#34d399"];for(let r=0;r<8;r++)Y(e,t+(Math.random()-.5)*80,a+(Math.random()-.5)*80,s[r%s.length],28,360,1,4);return X(e,28),q(e)}if(!e.isBossLevel){for(let t of e.entities)if("stargate"===t.type&&Math.hypot(o.x-t.x,o.y-t.y)=e.durationSec?(e.phase="lost",e.endedAt=Date.now(),q(e)):null}(i,s,{dx:t,dy:a,active:Math.abs(t)>.05||Math.abs(a)>.05,shoot:C.current});l&&(R.current=l,eu(l),en(l.phase),I.current=l.phase,B.current||(B.current=!0,J.useGameStore.getState().grantCruiseReward(l.rewards),ef(function(e){let t=Z();t.totalRuns++,"won"===e.phase&&(t.totalWins++,t.bestLevel=Math.max(t.bestLevel,e.level),e.isBossLevel&&t.bossKills++),t.highScore=Math.max(t.highScore,e.score),t.totalCrystals+=e.rewards.crystals,t.totalInsights+=e.rewards.insights,t.totalContact+=e.rewards.contact,t.lastResult=e,t.recentResults=[e,...t.recentResults].slice(0,20);try{window.localStorage.setItem(V,JSON.stringify(t))}catch{}return t}(l)))),L.current={shield:i.ship.shield,shieldMax:100+i.upgrades.shieldMaxBonus,energy:i.ship.energy,energyMax:100+i.upgrades.energyMaxBonus,score:i.score,time:i.timeSec,duration:i.durationSec,crystals:i.collectedCrystals,totalCrystals:i.totalCrystals,insights:i.collectedInsights,totalInsights:i.totalInsights,beacons:i.collectedBeacons,totalBeacons:i.totalBeacons,lowShield:i.flashLowShield,isBossLevel:i.isBossLevel,bossHp:i.boss?.hp??0,bossMaxHp:i.boss?.maxHp??0,bossPhase:i.boss?.attackPhase??1,buffs:[...i.activeBuffs],appliedUpgrades:i.appliedUpgrades,pickupFlashColor:i.pickupFlash?.color??null},e-$.current>80&&($.current=e,eP({...L.current}))}t.fillStyle="#050410",t.fillRect(0,0,l,o);let n=0,d=0;if(i&&i.shakeTimer>0){let e=i.shakeAmount*(i.shakeTimer/280);n=(Math.random()-.5)*e,d=(Math.random()-.5)*e}t.save(),t.translate(n,d);let h=i?i.ship.vx:0,c=i?i.ship.vy:0;for(let e of S.current)for(let a of e.stars){a.y+=(e.speed+c*e.parallax)*r,a.x-=h*e.parallax*r,a.y>o+5&&(a.y=-5),a.y<-5&&(a.y=o+5),a.x>l+5&&(a.x=-5),a.x<-5&&(a.x=l+5),a.twinkle+=a.twinkleSpeed*r;let s=.6+.4*Math.sin(a.twinkle),i=a.brightness*s;t.fillStyle=`rgba(220,230,255,${i})`,t.beginPath(),t.arc(a.x,a.y,a.size,0,2*Math.PI),t.fill()}if(i){for(let e of i.entities)"stargate"===e.type&&function(e,t,a){e.save(),e.translate(t.x,t.y);let s=Math.max(0,1-Math.hypot(a.x-t.x,a.y-t.y)/300),r=.5+.5*Math.sin(t.pulsePhase);e.shadowBlur=25+30*s,e.shadowColor=el;for(let a=0;a<4;a++){e.save(),e.rotate(t.rotation*(a%2==0?1:-1)*(1+.3*a)),e.beginPath();let s=t.radius*(1+.25*a);e.arc(0,0,s,0,1.5*Math.PI),e.strokeStyle=`rgba(251,113,133,${(.3+.2*r)*(1-.15*a)})`,e.lineWidth=3-.5*a,e.stroke(),e.restore()}let l=e.createRadialGradient(0,0,0,0,0,t.radius);if(l.addColorStop(0,"#ffe4e6"),l.addColorStop(.4,el),l.addColorStop(.8,"#9f1239"),l.addColorStop(1,"rgba(159,18,57,0)"),e.fillStyle=l,e.beginPath(),e.arc(0,0,t.radius*(.9+.1*r),0,2*Math.PI),e.fill(),e.shadowBlur=0,s>.1)for(let a=0;a<8;a++){let r=2*t.rotation+a/8*Math.PI*2,l=t.radius*(.8+.6*Math.sin(t.pulsePhase+a)),o=Math.cos(r)*l,i=Math.sin(r)*l;e.fillStyle=`rgba(254,205,211,${.8*s})`,e.beginPath(),e.arc(o,i,2,0,2*Math.PI),e.fill()}s>.3&&(e.beginPath(),e.arc(0,0,1.6*t.radius,0,2*Math.PI),e.strokeStyle=`rgba(251,113,133,${.4*s})`,e.lineWidth=2,e.setLineDash([8,8]),e.stroke(),e.setLineDash([])),e.restore()}(t,e,i.ship);for(let e of i.entities)"storm"===e.type&&function(e,t){e.save(),e.translate(t.x,t.y),e.shadowBlur=30,e.shadowColor="#e879f9";for(let a=0;a<5;a++){let s=a/5*Math.PI*2+t.rotation,r=.4*t.radius*(.5+.5*Math.sin(t.cloudSeed+a)),l=Math.cos(s)*r,o=Math.sin(s)*r,i=t.radius*(.5+.2*Math.sin(.7*t.cloudSeed+2*a)),n=e.createRadialGradient(l,o,0,l,o,i);n.addColorStop(0,"rgba(232,121,249,0.55)"),n.addColorStop(.6,"rgba(168,85,247,0.3)"),n.addColorStop(1,"rgba(88,28,135,0)"),e.fillStyle=n,e.beginPath(),e.arc(l,o,i,0,2*Math.PI),e.fill()}e.shadowBlur=0;let a=e.createRadialGradient(0,0,0,0,0,.3*t.radius);if(a.addColorStop(0,"rgba(253,244,255,0.8)"),a.addColorStop(1,"rgba(232,121,249,0)"),e.fillStyle=a,e.beginPath(),e.arc(0,0,.3*t.radius,0,2*Math.PI),e.fill(),t.lightningTimer<.12){e.strokeStyle="rgba(253,244,255,0.9)",e.lineWidth=2,e.shadowBlur=12,e.shadowColor="#fdf4ff",e.beginPath();let a=0,s=0;e.moveTo(a,s);for(let r=0;r<4;r++)a+=(Math.random()-.5)*t.radius*.5,s+=(Math.random()-.5)*t.radius*.5,e.lineTo(a,s);e.stroke()}e.restore()}(t,e);for(let e of i.entities)"asteroid"===e.type&&function(e,t){e.save(),e.translate(t.x,t.y),e.rotate(t.rotation),e.shadowBlur=14,e.shadowColor="#fb7185",e.beginPath();let a=t.vertices.length;for(let s=0;s0)for(let a of s){let s=eo[a.type],r=a.remaining/a.total,l=t.radius*(1.6+.2*Math.sin(Date.now()/200));e.beginPath(),e.arc(0,0,l,0,2*Math.PI),e.strokeStyle=`${s}${Math.round(200*r).toString(16).padStart(2,"0")}`,e.lineWidth=2,e.stroke(),e.beginPath(),e.arc(0,0,l+3,-Math.PI/2,-Math.PI/2+2*Math.PI*r),e.strokeStyle=s,e.lineWidth=1.5,e.stroke()}e.rotate(t.heading);let r=a&&Math.floor(Date.now()/80)%2==0;if(t.thrust>.1){let a=t.radius*(1.5+1.5*t.thrust),s=e.createLinearGradient(-(.4*t.radius),0,-a,0);s.addColorStop(0,`rgba(251,191,36,${.8*t.thrust})`),s.addColorStop(.5,`rgba(232,121,249,${.4*t.thrust})`),s.addColorStop(1,"rgba(232,121,249,0)"),e.fillStyle=s,e.beginPath(),e.moveTo(-(.4*t.radius),.4*t.radius),e.lineTo(-a,0),e.lineTo(-(.4*t.radius),-(.4*t.radius)),e.closePath(),e.fill()}e.shadowBlur=22,e.shadowColor=ee;let l=t.radius;e.beginPath(),e.moveTo(l,0),e.lineTo(-(.7*l),.75*l),e.lineTo(-(.35*l),0),e.lineTo(-(.7*l),-(.75*l)),e.closePath();let o=e.createLinearGradient(-l,0,l,0);o.addColorStop(0,r?"#fb7185":"#065f46"),o.addColorStop(.5,r?"#fda4af":ee),o.addColorStop(1,r?"#fecdd3":"#a7f3d0"),e.fillStyle=o,e.fill(),e.shadowBlur=0,e.lineWidth=1.5,e.strokeStyle=r?"#ffe4e6":"#d1fae5",e.stroke(),e.beginPath(),e.arc(.15*l,0,.22*l,0,2*Math.PI),e.fillStyle="rgba(255,255,255,0.85)",e.fill(),e.restore()}(t,i.ship,i.invulnTimer>0,i.activeBuffs)}if(t.restore(),i&&i.flashLowShield&&"playing"===i.phase){let a=.3+.3*Math.sin(e/150);t.strokeStyle=`rgba(251,113,133,${a})`,t.lineWidth=6,t.strokeRect(3,3,l-6,o-6)}if(i&&i.pickupFlash&&"playing"===i.phase){let e=i.pickupFlash.timer/400,a=i.pickupFlash.color,s=t.createRadialGradient(l/2,o/2,.3*Math.min(l,o),l/2,o/2,.7*Math.max(l,o));s.addColorStop(0,"rgba(0,0,0,0)"),s.addColorStop(1,`${a}${Math.round(100*e).toString(16).padStart(2,"0")}`),t.fillStyle=s,t.fillRect(0,0,l,o)}};return k.current=requestAnimationFrame(a),()=>cancelAnimationFrame(k.current)},[]);let eB=(0,a.useCallback)(()=>{if("playing"!==I.current)return;let e=!T.current;T.current=e,ep(e)},[]),eT=(0,a.useCallback)(()=>{e()},[e]),eI=(0,a.useCallback)(()=>{R.current&&"won"===R.current.phase&&(eM(function(e=3,t=[]){let a=[...H.filter(e=>!t.includes(e.id))].sort(()=>Math.random()-.5);return a.slice(0,Math.min(e,a.length))}(3,w.current.map(e=>e.id))),ek(null),en("choosing"),I.current="choosing")},[]),eR=(0,a.useCallback)(e=>{let t=ev[e];if(t){ek(e);var a=M.current;switch(t.id){case"speed":a.speedMult*=1.12;break;case"accel":a.accelMult*=1.15;break;case"friction":a.frictionBonus=Math.min(.2,a.frictionBonus+.05);break;case"shield_max":a.shieldMaxBonus+=25;break;case"shield_regen":a.shieldRegenMult*=1.5;break;case"energy_max":a.energyMaxBonus+=25;break;case"energy_regen":a.energyRegenMult*=1.3;break;case"firepower":a.firepowerMult*=1.25;break;case"fire_rate":a.fireRateMult*=.8;break;case"double_shot":a.doubleShot=!0;break;case"attract_radius":a.attractRadiusMult*=1.4;break;case"collect_radius":a.collectRadiusMult*=1.5;break;case"invuln_time":a.invulnBonusMs+=200;break;case"damage_reduce":a.damageReduceMult*=.8;break;case"boss_bonus":a.bossBonusMult*=1.5;break;case"normal_score":a.normalScoreMult*=1.3;break;case"start_shield":a.startShieldBonus+=20;break;case"start_energy":a.startEnergyBonus+=20}w.current=[...w.current,t],eS(w.current),setTimeout(()=>{R.current&&eC(R.current.level+1)},700)}},[ev,eC]),eL=eN.shieldMax>0?Math.max(0,Math.min(100,eN.shield/eN.shieldMax*100)):0,e$=eL>60?"#34d399":eL>30?"#fbbf24":"#fb7185",eE=eN.energyMax>0?Math.max(0,Math.min(100,eN.energy/eN.energyMax*100)):0,eH=Math.max(0,eN.duration-eN.time),eW=eN.bossMaxHp>0?eN.bossHp/eN.bossMaxHp*100:0;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 bg-[#050410] overflow-hidden select-none",children:[(0,t.jsx)("canvas",{ref:l,className:"absolute inset-0 w-full h-full touch-none"}),"playing"===K&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute top-3 left-3 flex flex-col gap-2 min-w-[180px]",children:[(0,t.jsxs)("div",{className:"glass rounded-xl p-2.5 border-white/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)(x,{className:"h-3.5 w-3.5",style:{color:e$}}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"护盾"}),(0,t.jsx)("span",{className:"ml-auto font-mono text-xs font-bold",style:{color:e$},children:Math.round(eN.shield)})]}),(0,t.jsx)("div",{className:"h-2 rounded-full bg-black/50 overflow-hidden border border-white/5",children:(0,t.jsx)("div",{className:"h-full rounded-full transition-all duration-150",style:{width:`${eL}%`,background:`linear-gradient(90deg, ${e$}, ${e$}dd)`,boxShadow:`0 0 8px ${e$}aa`}})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2 mb-1.5",children:[(0,t.jsx)(f.Zap,{className:"h-3.5 w-3.5 text-fuchsia-300"}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"能量"}),(0,t.jsx)("span",{className:"ml-auto font-mono text-xs font-bold text-fuchsia-200",children:Math.round(eN.energy)})]}),(0,t.jsx)("div",{className:"h-2 rounded-full bg-black/50 overflow-hidden border border-white/5",children:(0,t.jsx)("div",{className:"h-full rounded-full transition-all duration-150",style:{width:`${eE}%`,background:"linear-gradient(90deg, #e879f9, #c026d3)",boxShadow:"0 0 8px rgba(232,121,249,0.6)"}})})]}),eN.buffs.length>0&&(0,t.jsx)("div",{className:"glass rounded-xl p-2 border-white/10 flex flex-col gap-1",children:eN.buffs.map((e,a)=>{let s=eo[e.type],r=Math.max(0,e.remaining/e.total*100),l="shield"===e.type?"护盾":"energy"===e.type?"能量":"rapid"===e.type?"急速":"overdrive"===e.type?"过载":"磁吸";return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"h-2 w-2 rounded-full",style:{background:s,boxShadow:`0 0 6px ${s}`}}),(0,t.jsx)("span",{className:"text-[10px] text-white/80",style:{color:s},children:l}),(0,t.jsx)("div",{className:"flex-1 h-1 rounded-full bg-black/40 overflow-hidden",children:(0,t.jsx)("div",{className:"h-full rounded-full",style:{width:`${r}%`,background:s}})}),(0,t.jsxs)("span",{className:"font-mono text-[9px] text-muted-foreground w-6 text-right",children:[Math.ceil(e.remaining),"s"]})]},a)})}),eN.appliedUpgrades.length>0&&(0,t.jsx)("div",{className:"glass rounded-xl p-1.5 border-white/10 flex flex-wrap gap-1 max-w-[200px]",children:eN.appliedUpgrades.map((e,a)=>{let s;return(0,t.jsx)("div",{className:"h-5 w-5 rounded-md flex items-center justify-center border",style:{borderColor:`${e.color}80`,background:`${e.color}20`},title:e.title,children:(s=ei[e.icon]??y.Sparkles,(0,t.jsx)(s,{className:"h-3 w-3",style:{color:e.color}}))},a)})})]}),(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 flex flex-col items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"glass rounded-xl px-4 py-2 border-white/10 flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"关卡"}),(0,t.jsxs)("div",{className:"font-mono text-sm font-bold text-amber-200",children:["L",ed,eN.isBossLevel&&(0,t.jsx)(b.Skull,{className:"inline h-3 w-3 ml-0.5 text-rose-300"})]})]}),(0,t.jsx)("div",{className:"w-px h-7 bg-white/10"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"分数"}),(0,t.jsx)("div",{className:"font-mono text-sm font-bold text-emerald-200",children:(0,Q.formatNum)(eN.score)})]}),(0,t.jsx)("div",{className:"w-px h-7 bg-white/10"}),(0,t.jsxs)("div",{className:"text-center min-w-[52px]",children:[(0,t.jsxs)("div",{className:"text-[9px] text-muted-foreground uppercase tracking-wider flex items-center justify-center gap-0.5",children:[(0,t.jsx)(m.Clock,{className:"h-2.5 w-2.5"}),"用时"]}),(0,t.jsxs)("div",{className:"font-mono text-sm font-bold text-rose-200",children:[Math.floor(eH/60),":",String(Math.floor(eH%60)).padStart(2,"0")]})]})]}),eN.isBossLevel&&eN.bossMaxHp>0&&(0,t.jsxs)("div",{className:"glass rounded-lg px-3 py-1.5 border-rose-400/30 min-w-[260px] sm:min-w-[320px]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-0.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(b.Skull,{className:"h-3 w-3 text-rose-300"}),(0,t.jsx)("span",{className:"text-[10px] text-rose-200 font-bold tracking-wider",children:"BOSS"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${e<=eN.bossPhase?"bg-rose-400":"bg-white/15"}`},e))})]}),(0,t.jsx)("div",{className:"h-2.5 rounded-full bg-black/60 overflow-hidden border border-rose-400/20",children:(0,t.jsx)("div",{className:"h-full rounded-full transition-all duration-200",style:{width:`${eW}%`,background:"linear-gradient(90deg, #fb7185, #e879f9)",boxShadow:"0 0 12px rgba(232,121,249,0.7)"}})})]})]}),(0,t.jsxs)("div",{className:"absolute top-3 right-3 flex items-start gap-2",children:[(0,t.jsxs)("div",{className:"glass rounded-xl p-2 border-white/10 flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(h.Gem,{className:"h-3 w-3 text-emerald-300"}),(0,t.jsxs)("span",{className:"font-mono text-xs font-bold text-emerald-200",children:[eN.crystals,(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["/",eN.totalCrystals]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(c.Brain,{className:"h-3 w-3 text-fuchsia-300"}),(0,t.jsxs)("span",{className:"font-mono text-xs font-bold text-fuchsia-200",children:[eN.insights,(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["/",eN.totalInsights]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(u.Radio,{className:"h-3 w-3 text-amber-300"}),(0,t.jsxs)("span",{className:"font-mono text-xs font-bold text-amber-200",children:[eN.beacons,(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["/",eN.totalBeacons]})]})]})]}),(0,t.jsx)(s.Button,{size:"icon",variant:"ghost",onClick:eB,className:"h-8 w-8 glass border-white/10 hover:bg-white/10 text-white/80","aria-label":"暂停",children:(0,t.jsx)(d,{className:"h-4 w-4"})}),(0,t.jsx)(s.Button,{size:"icon",variant:"ghost",onClick:eT,className:"h-8 w-8 glass border-rose-400/30 hover:bg-rose-500/20 text-rose-200","aria-label":"退出",children:(0,t.jsx)(r.X,{className:"h-4 w-4"})})]}),!eg&&(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 glass rounded-full px-4 py-1.5 border-white/10 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-mono text-white/80",children:"WASD"})," / ",(0,t.jsx)("span",{className:"font-mono text-white/80",children:"方向键"})," 移动 · ",(0,t.jsx)("span",{className:"font-mono text-emerald-300",children:"空格"})," 射击 · ",(0,t.jsx)("span",{className:"font-mono text-white/80",children:"P"})," 暂停 · ",(0,t.jsx)("span",{className:"font-mono text-white/80",children:"Esc"})," 退出"]}),eg&&(0,t.jsx)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 glass rounded-full px-3 py-1 border-white/10 text-[10px] text-muted-foreground pointer-events-none",children:"左下摇杆 · 右下射击"}),eg&&eb.active&&(0,t.jsx)("div",{className:"absolute pointer-events-none",style:{left:eb.baseX,top:eb.baseY,transform:"translate(-50%, -50%)"},children:(0,t.jsx)("div",{className:"relative h-28 w-28 rounded-full border-2 border-amber-400/40 bg-amber-500/5 backdrop-blur-sm",children:(0,t.jsx)("div",{className:"absolute h-12 w-12 rounded-full border-2 border-amber-300 bg-amber-400/30 backdrop-blur",style:{left:"50%",top:"50%",transform:`translate(calc(-50% + ${eb.knobX}px), calc(-50% + ${eb.knobY}px))`,boxShadow:"0 0 16px rgba(251,191,36,0.6)"}})})}),eg&&(0,t.jsxs)("button",{"aria-label":"射击",className:"absolute bottom-20 right-6 h-20 w-20 rounded-full border-2 border-emerald-400/50 bg-emerald-500/15 backdrop-blur-md flex items-center justify-center pointer-events-none",children:[(0,t.jsx)(g,{className:"h-9 w-9 text-emerald-300",style:{filter:"drop-shadow(0 0 8px rgba(52,211,153,0.8))"}}),(0,t.jsx)("div",{className:"absolute inset-0 rounded-full border-2 border-emerald-400/30 animate-ping",style:{animationDuration:"2s"}})]}),em&&(0,t.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-10",children:(0,t.jsxs)("div",{className:"glass rounded-2xl p-8 border-white/15 text-center max-w-xs",children:[(0,t.jsx)(d,{className:"h-10 w-10 mx-auto mb-3 text-amber-300"}),(0,t.jsx)("h3",{className:"text-lg font-bold text-white mb-1",children:"已暂停"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-5",children:"深空时间已凝固"}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)(s.Button,{onClick:eB,className:"bg-amber-500/20 border border-amber-400/50 text-amber-100 hover:bg-amber-500/30",children:[(0,t.jsx)(o,{className:"h-4 w-4 mr-1.5"}),"继续"]}),(0,t.jsx)(s.Button,{variant:"ghost",onClick:eT,className:"text-rose-200 hover:bg-rose-500/10",children:"退出巡航"})]})]})})]}),"ready"===K&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-4 bg-gradient-to-b from-black/40 via-transparent to-black/60",children:(0,t.jsxs)("div",{className:"glass rounded-2xl p-6 sm:p-8 border-amber-400/30 max-w-md w-full text-center relative overflow-hidden",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -top-20 -left-20 h-40 w-40 rounded-full bg-amber-500/20 blur-3xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -bottom-20 -right-20 h-40 w-40 rounded-full bg-rose-500/20 blur-3xl"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"text-[10px] tracking-[0.3em] text-amber-300/70 mb-1",children:"DEEP SPACE CRUISE · v0.8"}),(0,t.jsx)("h2",{className:"text-3xl sm:text-4xl font-bold text-gradient mb-1",children:"深空巡航"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-5",children:"操控飞船穿越陨石带,抵达星门 / 击败 BOSS"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 mb-5 text-left",children:[(0,t.jsxs)("div",{className:"glass rounded-lg p-2.5 border-white/10",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"起始关卡"}),(0,t.jsxs)("div",{className:"font-mono text-lg font-bold text-amber-200",children:["L",ed]})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-2.5 border-white/10",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"历史最高分"}),(0,t.jsx)("div",{className:"font-mono text-lg font-bold text-emerald-200",children:ex?(0,Q.formatNum)(ex.highScore):"—"})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-2.5 border-white/10",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"通关次数"}),(0,t.jsx)("div",{className:"font-mono text-lg font-bold text-fuchsia-200",children:ex?ex.totalWins:0})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-2.5 border-white/10",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"BOSS 击杀"}),(0,t.jsx)("div",{className:"font-mono text-lg font-bold text-rose-200",children:ex?ex.bossKills:0})]})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-3 border-white/10 mb-5 text-left text-[11px] space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.Gem,{className:"h-3 w-3 text-emerald-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"收集晶体碎片 → 晶体奖励"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Brain,{className:"h-3 w-3 text-fuchsia-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"收集洞见光球 → 洞见奖励"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Radio,{className:"h-3 w-3 text-amber-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"收集信标 → 接触进度"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.Trophy,{className:"h-3 w-3 text-rose-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"抵达星门通关 → +50% 奖励"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(b.Skull,{className:"h-3 w-3 text-rose-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"每 5 关 BOSS 战:击败 ×3 奖励"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g,{className:"h-3 w-3 text-emerald-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"空格 / 右下角射击按钮 → 发射能量弹"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Sparkles,{className:"h-3 w-3 text-fuchsia-300 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"通关后 3 选 1 强化卡牌(每局重置)"})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(s.Button,{onClick:()=>eC(ed),className:"flex-1 bg-amber-500/20 border border-amber-400/50 text-amber-100 hover:bg-amber-500/30 h-11",children:[(0,t.jsx)(o,{className:"h-4 w-4 mr-1.5"}),"启动巡航"]}),(0,t.jsx)(s.Button,{variant:"ghost",onClick:eT,className:"border border-white/10 text-white/70 hover:bg-white/10 h-11",children:"返回"})]}),(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground/60 mt-3",children:eg?"左下摇杆移动 · 右下射击":"WASD / 方向键移动 · 空格射击 · P 暂停 · Esc 退出"})]})]})}),("won"===K||"lost"===K)&&ec&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:`glass rounded-2xl p-6 sm:p-8 max-w-md w-full relative overflow-hidden ${"won"===K?ec.isBossLevel?"border-fuchsia-400/50":"border-emerald-400/40":"border-rose-400/40"}`,children:[(0,t.jsx)("div",{className:`pointer-events-none absolute -top-20 -left-20 h-40 w-40 rounded-full blur-3xl ${"won"===K?ec.isBossLevel?"bg-fuchsia-500/25":"bg-emerald-500/20":"bg-rose-500/20"}`}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:`text-[10px] tracking-[0.3em] mb-1 ${"won"===K?ec.isBossLevel?"text-fuchsia-300/70":"text-emerald-300/70":"text-rose-300/70"}`,children:"won"===K?ec.isBossLevel?"BOSS DEFEATED":"MISSION COMPLETE":"MISSION FAILED"}),(0,t.jsx)("h2",{className:`text-3xl font-bold mb-1 ${"won"===K?ec.isBossLevel?"text-fuchsia-300":"text-emerald-300":"text-rose-300"}`,style:{textShadow:`0 0 20px ${"won"===K?ec.isBossLevel?"rgba(232,121,249,0.5)":"rgba(52,211,153,0.5)":"rgba(251,113,133,0.5)"}`},children:"won"===K?ec.isBossLevel?"BOSS 击破":"巡航成功":"巡航失败"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mb-5",children:["关卡 L",ec.level," · 用时 ",Math.floor(ec.durationSec/60),":",String(Math.floor(ec.durationSec%60)).padStart(2,"0")]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[(0,t.jsxs)("div",{className:"glass rounded-lg p-2 border-emerald-400/20 text-center",children:[(0,t.jsx)(h.Gem,{className:"h-4 w-4 mx-auto text-emerald-300 mb-0.5"}),(0,t.jsx)("div",{className:"font-mono text-lg font-bold text-emerald-200",children:ec.collectedCrystals}),(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground",children:"晶体碎片"})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-2 border-fuchsia-400/20 text-center",children:[(0,t.jsx)(c.Brain,{className:"h-4 w-4 mx-auto text-fuchsia-300 mb-0.5"}),(0,t.jsx)("div",{className:"font-mono text-lg font-bold text-fuchsia-200",children:ec.collectedInsights}),(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground",children:"洞见光球"})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-2 border-amber-400/20 text-center",children:[(0,t.jsx)(u.Radio,{className:"h-4 w-4 mx-auto text-amber-300 mb-0.5"}),(0,t.jsx)("div",{className:"font-mono text-lg font-bold text-amber-200",children:ec.collectedBeacons}),(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground",children:"信标"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 mb-4",children:[(0,t.jsxs)("div",{className:"glass rounded-lg p-2 border-white/10 flex items-center gap-2",children:[(0,t.jsx)(x,{className:"h-4 w-4 text-rose-300"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground",children:"剩余护盾"}),(0,t.jsx)("div",{className:"font-mono text-sm font-bold text-rose-200",children:ec.remainingShield})]})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-2 border-white/10 flex items-center gap-2",children:[(0,t.jsx)(p.Trophy,{className:"h-4 w-4 text-amber-300"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground",children:"得分"}),(0,t.jsx)("div",{className:"font-mono text-sm font-bold text-amber-200",children:(0,Q.formatNum)(ec.score)})]})]})]}),(0,t.jsxs)("div",{className:"glass rounded-lg p-3 border-emerald-400/20 mb-5",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mb-2",children:"won"===K?ec.isBossLevel?"BOSS 击败奖励 (×3)":"通关奖励 (+50%)":"残骸回收 (×50%)"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-200",children:[(0,t.jsx)(h.Gem,{className:"h-3 w-3"})," 晶体"]}),(0,t.jsxs)("span",{className:"font-mono text-sm font-bold text-emerald-200",children:["+",(0,Q.formatNum)(ec.rewards.crystals)]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-fuchsia-200",children:[(0,t.jsx)(c.Brain,{className:"h-3 w-3"})," 洞见"]}),(0,t.jsxs)("span",{className:"font-mono text-sm font-bold text-fuchsia-200",children:["+",ec.rewards.insights.toFixed(1)]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-amber-200",children:[(0,t.jsx)(u.Radio,{className:"h-3 w-3"})," 接触"]}),(0,t.jsxs)("span",{className:"font-mono text-sm font-bold text-amber-200",children:["+",ec.rewards.contact.toFixed(1),"%"]})]})]}),(0,t.jsx)("div",{className:"text-[9px] text-muted-foreground/70 mt-2 pt-2 border-t border-white/5",children:"奖励已同步至主游戏"})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:["won"===K&&(0,t.jsxs)(s.Button,{onClick:eI,className:"flex-1 bg-fuchsia-500/20 border border-fuchsia-400/50 text-fuchsia-100 hover:bg-fuchsia-500/30 h-10",children:[(0,t.jsx)(y.Sparkles,{className:"h-4 w-4 mr-1"}),"选择强化"]}),(0,t.jsxs)(s.Button,{onClick:()=>eC(ec.level),variant:"won"===K?"ghost":"default",className:`${"lost"===K?"flex-1 bg-rose-500/20 border border-rose-400/50 text-rose-100 hover:bg-rose-500/30":"border border-white/10 text-white/80 hover:bg-white/10"} h-10`,children:[(0,t.jsx)(i.RotateCcw,{className:"h-4 w-4 mr-1"}),"重试"]}),(0,t.jsx)(s.Button,{variant:"ghost",onClick:eT,className:"border border-white/10 text-white/70 hover:bg-white/10 h-10",children:"返回"})]})]})]})}),"choosing"===K&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-4 bg-black/70 backdrop-blur-md",children:(0,t.jsxs)("div",{className:"w-full max-w-3xl",children:[(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsx)("div",{className:"text-[10px] tracking-[0.4em] text-fuchsia-300/70 mb-1",children:"REINFORCEMENT PROTOCOL"}),(0,t.jsx)("h2",{className:"text-2xl sm:text-3xl font-bold text-gradient mb-1",children:"选择强化"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"星门共鸣释放能量,3 选 1 永久强化(本局有效)"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:ev.map((e,a)=>{let s=ei[e.icon]??y.Sparkles,r=ew===a,l=null!==ew&&!r;return(0,t.jsxs)("button",{onClick:()=>null===ew&&eR(a),disabled:null!==ew,className:`group relative glass rounded-2xl p-5 border-2 transition-all duration-500 text-left overflow-hidden ${r?"scale-105 border-fuchsia-400 shadow-[0_0_30px_rgba(232,121,249,0.5)]":l?"opacity-40 border-white/10":"border-white/15 hover:border-white/30 hover:scale-[1.02] cursor-pointer"}`,style:{minHeight:"220px"},children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -top-10 -left-10 h-32 w-32 rounded-full blur-3xl opacity-40 transition-opacity group-hover:opacity-70",style:{background:e.color}}),(0,t.jsxs)("div",{className:"relative flex flex-col h-full",children:[(0,t.jsx)("div",{className:"h-12 w-12 rounded-xl flex items-center justify-center mb-3 border",style:{background:`${e.color}20`,borderColor:`${e.color}80`,boxShadow:`0 0 16px ${e.color}40`},children:(0,t.jsx)(s,{className:"h-6 w-6",style:{color:e.color}})}),(0,t.jsxs)("div",{className:"text-[10px] font-mono uppercase tracking-wider mb-1",style:{color:e.color},children:["强化 ",String(a+1).padStart(2,"0")]}),(0,t.jsx)("h3",{className:"text-lg font-bold text-white mb-1.5",children:e.title}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-3",children:e.desc}),(0,t.jsx)("div",{className:"mt-auto pt-2 border-t border-white/5",children:(0,t.jsxs)("div",{className:"flex items-center justify-between text-[10px]",children:[(0,t.jsx)("span",{className:"text-muted-foreground/70",children:"点击选择"}),(0,t.jsx)(n.ChevronRight,{className:"h-3 w-3",style:{color:e.color}})]})})]}),r&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-fuchsia-500/10 backdrop-blur-[1px]",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(y.Sparkles,{className:"h-10 w-10 mx-auto text-fuchsia-300 animate-pulse",style:{filter:"drop-shadow(0 0 12px rgba(232,121,249,0.8))"}}),(0,t.jsx)("div",{className:"mt-2 text-xs font-bold text-fuchsia-200 tracking-wider",children:"已激活"})]})})]},e.id)})}),ej.length>0&&(0,t.jsxs)("div",{className:"mt-5 glass rounded-xl p-3 border-white/10",children:[(0,t.jsx)("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mb-2",children:"本局已激活强化"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ej.map((e,a)=>{let s=ei[e.icon]??y.Sparkles;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded-md px-2 py-1 border",style:{borderColor:`${e.color}50`,background:`${e.color}15`},children:[(0,t.jsx)(s,{className:"h-3 w-3",style:{color:e.color}}),(0,t.jsx)("span",{className:"text-[11px] text-white/85",children:e.title})]},a)})})]}),(0,t.jsx)("div",{className:"text-center mt-4",children:(0,t.jsx)(s.Button,{variant:"ghost",onClick:eT,className:"border border-white/10 text-white/60 hover:bg-white/10 h-9",children:"退出巡航"})})]})})]})}e.s(["CruiseMode",()=>en],58959),e.i(58959),e.s(["CruiseMode",()=>en,"UPGRADE_POOL",0,H],20228)},49701,e=>{e.n(e.i(20228))}]);