.xx-page{position:relative;min-height:calc(100vh - 12rem);overflow:hidden;border-radius:2rem;background:radial-gradient(circle at 18% 12%,rgba(142,197,255,.24),transparent 28rem),radial-gradient(circle at 76% 8%,rgba(239,173,247,.22),transparent 30rem),linear-gradient(135deg,#070a12,#111827 52%,#090b16);border:1px solid rgba(255,255,255,.12);box-shadow:0 26px 48px -18px rgba(15,23,42,.45);color:#eef6ff}
.xx-aura{position:absolute;inset:-40%;background:conic-gradient(from 180deg,transparent,#8ec5ff33,#efadf733,#ffd69b22,transparent);animation:xxSpin 18s linear infinite;filter:blur(18px);opacity:.85}
.xx-shell{position:relative;z-index:1;display:grid;grid-template-columns:340px minmax(0,1fr);gap:20px;padding:20px}
.xx-panel,.xx-stage{border:1px solid rgba(255,255,255,.15);background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.06));box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 18px 36px -20px rgba(0,0,0,.55);backdrop-filter:blur(18px);border-radius:1.5rem}
.xx-status{padding:20px}.xx-brand{display:flex;align-items:center;gap:13px}.xx-brand span{display:grid;width:48px;height:48px;place-items:center;border-radius:16px;background:linear-gradient(135deg,#8ec5ff,#efadf7);color:#07111f;font-size:25px;font-weight:950;box-shadow:0 14px 28px -10px rgba(142,197,255,.65)}.xx-brand b{display:block;font-size:20px;letter-spacing:-.03em}.xx-brand small{display:block;margin-top:3px;color:#bfdbfe}
.xx-realm{display:flex;align-items:end;justify-content:space-between;margin:24px 0;padding:18px;border-radius:20px;background:rgba(8,13,25,.54);border:1px solid rgba(142,197,255,.17)}.xx-realm em{font-style:normal;font-size:28px;font-weight:900;letter-spacing:-.04em}.xx-realm strong{color:#ffd69b}
.xx-bars{display:grid;gap:14px}.xx-bars label{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:10px;color:#dbeafe;font-size:14px}.xx-bars i{height:10px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.1)}.xx-bars i span{display:block;height:100%;width:100%;border-radius:inherit;background:linear-gradient(90deg,#8ec5ff,#efadf7,#ffd69b);transform:scaleX(0);transform-origin:left center;transition:transform .45s cubic-bezier(.2,.8,.2,1)}.xx-bars b{text-align:right;color:#fff}
.xx-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.xx-stats span{padding:12px;border-radius:16px;background:rgba(255,255,255,.08);color:#bfdbfe}.xx-stats b{float:right;color:#fff}
.xx-key{display:grid;gap:8px;color:#bfdbfe;font-size:13px}.xx-key input,.xx-model,.xx-custom input{width:100%;min-height:44px;border:1px solid rgba(255,255,255,.18)!important;border-radius:14px!important;background:rgba(8,13,25,.72)!important;color:#eef6ff!important;padding:0 13px}.xx-model{margin-top:10px}
#xx-reset,.xx-test{width:100%;min-height:46px;margin-top:12px;border-radius:14px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);color:#eef6ff;font-weight:800}.xx-test{background:linear-gradient(135deg,#8ec5ff,#efadf7);color:#07111f;border:0;box-shadow:0 16px 30px -16px rgba(142,197,255,.8)}.xx-test:disabled,.xx-actions button:disabled,.xx-custom button:disabled,.xx-custom input:disabled{cursor:not-allowed;opacity:.52}
.xx-stage{position:relative;overflow:hidden;padding:22px}.xx-sky{position:absolute;inset:0;pointer-events:none}.xx-sky span{position:absolute;width:6px;height:6px;border-radius:50%;background:#dbeafe;box-shadow:0 0 18px #8ec5ff;animation:xxFloat 8s ease-in-out infinite}.xx-sky span:nth-child(1){left:15%;top:20%}.xx-sky span:nth-child(2){left:72%;top:18%;animation-delay:-2s}.xx-sky span:nth-child(3){left:84%;top:68%;animation-delay:-4s}.xx-sky span:nth-child(4){left:28%;top:78%;animation-delay:-6s}
.xx-scroll{position:relative;min-height:310px;padding:30px;border-radius:26px;background:linear-gradient(145deg,rgba(8,13,25,.72),rgba(17,24,39,.52));border:1px solid rgba(142,197,255,.18)}.xx-scroll p{margin:0 0 12px;color:#8ec5ff;font-weight:800}.xx-scroll h1{margin:0;color:#fff!important;font-size:clamp(2.2rem,6vw,5.4rem);line-height:.94;letter-spacing:-.06em;text-wrap:balance}.xx-scroll article{max-width:780px;margin-top:24px;color:#dbeafe;font-size:18px;line-height:1.9}
.xx-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}.xx-actions button,.xx-custom button{min-height:54px;border:0;border-radius:16px;background:linear-gradient(135deg,#8ec5ff,#efadf7);color:#07111f;font-weight:900;box-shadow:0 16px 30px -16px rgba(142,197,255,.8)}.xx-actions button{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);color:#eef6ff}.xx-actions button:hover,#xx-reset:hover{background:rgba(255,255,255,.16)}
.xx-custom{display:grid;grid-template-columns:1fr 150px;gap:12px;margin-top:12px}.xx-log{display:grid;gap:10px;max-height:260px;overflow:auto;margin-top:16px;padding-right:4px}.xx-log article{padding:13px 15px;border-radius:16px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12)}.xx-log b{display:block;color:#fff}.xx-log p{margin:.35rem 0 0;color:#bfdbfe;line-height:1.65}.xx-delta{margin-top:8px;color:#ffd69b;font-size:12px}.xx-loading{opacity:.72;filter:saturate(.7)}
@keyframes xxSpin{to{transform:rotate(360deg)}}@keyframes xxFloat{50%{transform:translate3d(0,-18px,0) scale(1.4);opacity:.55}}
@media(max-width:900px){.xx-page{border-radius:0;margin-inline:-1rem}.xx-shell{grid-template-columns:1fr;padding:12px}.xx-stage{padding:14px}.xx-actions{grid-template-columns:1fr}.xx-custom{grid-template-columns:1fr}.xx-scroll{min-height:260px;padding:22px}.xx-scroll article{font-size:16px}.xx-realm em{font-size:24px}}
@media(prefers-reduced-motion:reduce){.xx-aura,.xx-sky span{animation:none}}

/* World Genesis immersive mode */
.game-immersive{background:#050814!important;overflow:hidden;color:#eef6ff!important}
.game-immersive header,.game-immersive footer{display:none!important}
.game-main{width:100vw;height:100vh;margin:0!important;padding:0!important;max-width:none!important;overflow:hidden;background:#050814}
.wg-page{width:100vw;height:100vh;min-height:100vh;border-radius:0;border:0;background:radial-gradient(circle at 16% 12%,rgba(142,197,255,.18),transparent 30rem),radial-gradient(circle at 78% 18%,rgba(239,173,247,.18),transparent 34rem),linear-gradient(135deg,#050814,#0b1020 50%,#070a12);box-shadow:none}
.wg-topbar{position:relative;z-index:2;height:72px;display:flex;align-items:center;justify-content:space-between;padding:14px 22px;border-bottom:1px solid rgba(255,255,255,.12);background:linear-gradient(90deg,rgba(255,255,255,.09),rgba(255,255,255,.03));backdrop-filter:blur(18px)}
.wg-title{display:flex;align-items:center;gap:13px}.wg-title span{display:grid;width:44px;height:44px;place-items:center;border-radius:15px;background:linear-gradient(135deg,#8ec5ff,#efadf7);color:#07111f;font-weight:950}.wg-title b{display:block;font-size:19px;letter-spacing:-.03em;color:#fff}.wg-title small{color:#bfdbfe}
.wg-time{display:flex;align-items:center;gap:12px}.wg-time b,.wg-time span{padding:10px 13px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#eaf4ff}.wg-time a{display:grid;width:38px;height:38px;place-items:center;border-radius:999px;background:rgba(255,255,255,.1);color:#fff;text-decoration:none;font-size:24px;line-height:1}
.wg-shell{height:calc(100vh - 72px);grid-template-columns:minmax(280px,360px) minmax(0,1fr);padding:18px;gap:18px}.wg-ledger{max-height:calc(100vh - 108px);overflow:auto}.wg-stage{min-height:0;display:grid;grid-template-rows:auto auto auto auto minmax(120px,1fr);padding:18px;overflow:hidden}
.wg-scroll{min-height:230px;padding:28px 32px;background:linear-gradient(145deg,rgba(8,13,25,.78),rgba(20,27,48,.54));overflow:hidden}.wg-scroll h1{font-size:clamp(3rem,8vw,7rem)}
.wg-map{position:absolute;inset:92px 28px auto auto;width:min(44vw,560px);height:300px;opacity:.55;pointer-events:none;filter:drop-shadow(0 24px 40px rgba(0,0,0,.32))}
.wg-map:before{content:"";position:absolute;inset:0;border-radius:42% 58% 48% 52%;background:linear-gradient(145deg,rgba(142,197,255,.25),rgba(239,173,247,.16));border:1px solid rgba(255,255,255,.18);clip-path:polygon(12% 32%,28% 10%,50% 18%,66% 4%,90% 24%,82% 55%,96% 72%,67% 88%,38% 78%,14% 92%,4% 62%)}
.wg-map i{position:absolute;width:12px;height:12px;border-radius:999px;background:#ffd69b;box-shadow:0 0 22px #ffd69b}.wg-map i:nth-child(1){left:23%;top:38%}.wg-map i:nth-child(2){left:55%;top:30%}.wg-map i:nth-child(3){left:72%;top:62%}.wg-map i:nth-child(4){left:38%;top:70%}.wg-map b{position:absolute;left:24%;top:41%;width:50%;height:2px;background:linear-gradient(90deg,#ffd69b,#8ec5ff);transform:rotate(18deg);opacity:.7}
.wg-council{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.wg-council span{padding:9px 12px;border-radius:999px;background:rgba(142,197,255,.1);border:1px solid rgba(142,197,255,.22);color:#dbeafe;font-size:13px;font-weight:800}
.wg-command{grid-template-columns:minmax(0,1fr) 170px}.wg-command input{font-size:16px}
@media(max-width:900px){.game-immersive{overflow:auto}.game-main{height:auto;min-height:100vh;overflow:visible}.wg-page{height:auto;min-height:100vh}.wg-topbar{height:auto;align-items:flex-start;gap:12px}.wg-time{gap:8px;flex-wrap:wrap;justify-content:flex-end}.wg-shell{height:auto;grid-template-columns:1fr;padding:12px}.wg-ledger{max-height:none}.wg-stage{display:block}.wg-map{position:relative;inset:auto;width:100%;height:180px;margin:8px 0}.wg-council{display:grid;grid-template-columns:1fr 1fr}.wg-command{grid-template-columns:1fr}.wg-scroll h1{font-size:clamp(2.5rem,18vw,4.2rem)}}

/* Modal feedback + DeepSeek loading animation */
.xx-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px;background:rgba(3,7,18,.58);backdrop-filter:blur(12px);opacity:0;pointer-events:none;transition:opacity .22s ease}
.xx-modal.show{opacity:1;pointer-events:auto}.xx-modal-card{width:min(440px,calc(100vw - 32px));position:relative;overflow:hidden;border-radius:28px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(145deg,rgba(15,23,42,.96),rgba(30,41,59,.92));box-shadow:0 34px 80px -32px rgba(0,0,0,.75),inset 0 1px 0 rgba(255,255,255,.18);padding:30px;color:#eaf4ff;text-align:center}.xx-modal-card:before{content:"";position:absolute;inset:-2px;z-index:-1;border-radius:inherit;background:conic-gradient(from 0deg,#8ec5ff,#efadf7,#ffd69b,#8ec5ff);filter:blur(18px);opacity:.5;animation:xxSpin 3s linear infinite}
.xx-modal-close{position:absolute;right:14px;top:12px;width:34px;height:34px;border:0;border-radius:999px;background:rgba(255,255,255,.08);color:#fff;font-size:22px;line-height:1}.xx-modal-icon{width:66px;height:66px;margin:4px auto 18px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(135deg,#8ec5ff,#efadf7);color:#07111f;font-size:34px;font-weight:950;box-shadow:0 18px 38px -18px rgba(142,197,255,.9)}.xx-modal.loading .xx-modal-icon{border-radius:999px;background:conic-gradient(from 0deg,#8ec5ff,#efadf7,#ffd69b,#8ec5ff);animation:xxSpin 1s linear infinite}.xx-modal.loading .xx-modal-icon:after{content:"";width:42px;height:42px;border-radius:999px;background:#111827}.xx-modal.error .xx-modal-icon{background:linear-gradient(135deg,#fb7185,#ffd69b)}.xx-modal h2{margin:0;color:#fff!important;font-size:24px;font-weight:950;letter-spacing:-.03em}.xx-modal p{margin:12px 0 22px;color:#cfe4ff;line-height:1.75;word-break:break-word}.xx-modal-ok{min-width:138px;min-height:46px;border:0;border-radius:16px;background:linear-gradient(135deg,#8ec5ff,#efadf7);color:#07111f;font-weight:950}
