/* Aetheria Player Portal V0.1 | GPU-friendly transition between site modes */
.aetheria-mode-switch{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:0 0 auto;
  min-height:37px;padding:7px 12px;border:1px solid rgba(243,197,111,.68);
  border-radius:7px;background:linear-gradient(125deg,#4b341b,#191913);
  color:#f5d69a!important;font:800 11px/1.1 Inter,system-ui,sans-serif;
  letter-spacing:.025em;text-decoration:none!important;
  box-shadow:inset 0 1px rgba(255,233,182,.14),0 0 20px rgba(222,146,60,.09);
  position:relative;overflow:hidden;white-space:nowrap;transition:background .22s,box-shadow .22s,transform .22s}
.aetheria-mode-switch:hover{background:linear-gradient(125deg,#674625,#302219);box-shadow:0 0 23px rgba(240,171,74,.23);transform:translateY(-1px)}
.aetheria-mode-switch:focus-visible{outline:2px solid #ffdaa1;outline-offset:3px}
.aetheria-mode-switch__icon{display:grid;place-items:center;width:19px;height:19px;border:1px solid rgba(238,187,91,.85);border-radius:50%;font-size:16px;line-height:1;color:#f6cb80}
.aetheria-mode-switch__arrow{font-size:13px;color:#e4b96b}
.aetheria-mode-switch__label{font-size:10px}
@media(max-width:1580px){.aetheria-mode-switch{padding:7px 9px}.aetheria-mode-switch__label{font-size:9px}}
@media(max-width:1180px){.aetheria-mode-switch{min-height:33px}}
@media(max-width:600px){.aetheria-mode-switch{max-width:154px;gap:6px}.aetheria-mode-switch__label{overflow:hidden;text-overflow:ellipsis}.aetheria-mode-switch__arrow{display:none}}

/* Immersive portal. All layers are DOM/CSS and tiny procedurally drawn lights,
   with no video download, external animation library or WebGL requirement. */
.aetheria-portal-overlay{
  position:fixed;inset:0;z-index:2147483646;display:grid;place-items:center;
  isolation:isolate;overflow:hidden;background:#04070b;color:#f5d9a0;
  opacity:0;pointer-events:none;font-family:Inter,system-ui,sans-serif;
  --aetheria-portal-accent:#e9bb66}
.aetheria-portal-overlay.is-visible{opacity:1;pointer-events:auto;animation:portal-veil-in .17s ease-out both}
.aetheria-portal-overlay.is-arrival{opacity:1;pointer-events:none;animation:portal-arrival-reveal .9s ease-in-out both}
.aetheria-portal-overlay[data-target-mode="official"]{--aetheria-portal-accent:#85c8ee}
.aetheria-portal-overlay::before{
  content:"";position:absolute;inset:-15%;
  background:repeating-conic-gradient(from 10deg at 50% 50%,rgba(232,167,76,.16) 0deg,transparent 2.5deg,transparent 16deg,rgba(195,139,74,.12) 19deg,transparent 23deg);
  opacity:.21;filter:blur(3px);mix-blend-mode:screen;
  transform:scale(1);animation:portal-tunnel-spin 5s linear infinite}
.aetheria-portal-overlay[data-target-mode="official"]::before{
  background:repeating-conic-gradient(from 10deg at 50% 50%,rgba(76,154,232,.14) 0deg,transparent 2.5deg,transparent 18deg,rgba(115,209,255,.1) 21deg,transparent 26deg)}
.aetheria-portal-overlay::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 50% 50%,transparent 0 6%,rgba(13,10,8,.17) 21%,rgba(1,5,10,.81) 78%,#010307);
  z-index:5}
.aetheria-portal-overlay__canvas{position:absolute;inset:0;width:100%;height:100%;opacity:.91;z-index:2;pointer-events:none}
.aetheria-portal-overlay__core{
  display:grid;place-items:center;position:absolute;z-index:7;width:min(460px,86vmin);height:min(460px,86vmin);
  border-radius:50%;transform:translateZ(0);
  background:radial-gradient(circle at center,rgba(249,219,157,.18) 0%,rgba(242,165,69,.09) 21%,transparent 59%);
  filter:drop-shadow(0 0 28px rgba(223,167,77,.22));
}
.aetheria-portal-overlay[data-target-mode="official"] .aetheria-portal-overlay__core{
  background:radial-gradient(circle at center,rgba(178,227,255,.16),rgba(67,156,205,.07) 26%,transparent 63%)}
.aetheria-portal-overlay__core::before{
  content:"";position:absolute;inset:16%;border:1px solid rgba(248,202,121,.53);
  border-radius:50%;box-shadow:0 0 18px rgba(239,183,97,.14),inset 0 0 20px rgba(239,183,97,.11);
  animation:portal-sigil-rotate 9s linear infinite;
  background:repeating-conic-gradient(from 0deg,rgba(255,220,156,.35) 0deg 1deg,transparent 1deg 30deg);
  -webkit-mask-image:radial-gradient(closest-side,transparent 87%,#000 90%,#000 100%);
  mask-image:radial-gradient(closest-side,transparent 87%,#000 90%,#000 100%)}
.aetheria-portal-overlay__core::after{
  content:"";position:absolute;inset:27%;border:1px solid rgba(248,218,162,.28);border-radius:50%;
  animation:portal-sigil-rotate 6s linear infinite reverse}
.aetheria-portal-overlay__rune{
  position:absolute;display:grid;place-items:center;z-index:2;
  width:125px;height:125px;border-radius:50%;
  border:1px solid rgba(250,209,132,.54);background:radial-gradient(circle,#38261a 0%,#0b1016 72%);
  box-shadow:0 0 0 7px rgba(233,176,85,.06),inset 0 0 22px rgba(255,205,118,.14),0 0 64px rgba(233,176,85,.23);
  color:#f1cf8e;font:700 78px/.9 Cinzel,Georgia,serif;text-shadow:0 0 18px rgba(255,214,133,.5);
}
.aetheria-portal-overlay__rune span{transform:translateY(5px)}
.aetheria-portal-overlay__rings{position:absolute;inset:0;z-index:3;pointer-events:none;perspective:650px}
.aetheria-portal-overlay__ring{
  position:absolute;left:50%;top:50%;width:min(82vmin,750px);height:min(82vmin,750px);
  margin-left:calc(min(82vmin,750px)*-.5);margin-top:calc(min(82vmin,750px)*-.5);
  border:2px solid rgba(226,171,83,.39);border-radius:50%;
  box-shadow:inset 0 0 23px rgba(238,181,85,.2),0 0 26px rgba(246,177,87,.18);
  transform:translateZ(-1000px) scale(.25);opacity:0;
  animation:portal-ring-rush 1.13s cubic-bezier(.35,.02,.33,.96) infinite;
}
.aetheria-portal-overlay__ring:nth-child(2){animation-delay:-.22s;border-color:rgba(250,217,156,.6)}
.aetheria-portal-overlay__ring:nth-child(3){animation-delay:-.44s}
.aetheria-portal-overlay__ring:nth-child(4){animation-delay:-.66s;border-color:rgba(240,197,112,.66)}
.aetheria-portal-overlay__ring:nth-child(5){animation-delay:-.88s}
.aetheria-portal-overlay[data-target-mode="official"] .aetheria-portal-overlay__ring{
  border-color:rgba(132,198,247,.47);box-shadow:inset 0 0 23px rgba(103,163,219,.16),0 0 26px rgba(102,168,217,.16)}
.aetheria-portal-overlay__caption{
  position:absolute;z-index:9;bottom:clamp(32px,10vh,95px);display:grid;justify-items:center;
  gap:8px;padding:0 20px;text-align:center;pointer-events:none}
.aetheria-portal-overlay__caption small{color:#eac28a;letter-spacing:.25em;font-size:11px;font-weight:850}
.aetheria-portal-overlay__caption strong{font:600 clamp(18px,3.2vw,32px) Cinzel,Georgia,serif;color:#ffeac1;letter-spacing:.08em;text-shadow:0 0 25px rgba(247,187,95,.3)}
.aetheria-portal-overlay__caption span{color:#aeb4bd;font-size:11px;letter-spacing:.08em}
.aetheria-portal-overlay__progress{display:block;overflow:hidden;height:3px;width:min(235px,62vw);margin-top:12px;border-radius:4px;background:#493625}
.aetheria-portal-overlay__progress::after{content:"";display:block;height:100%;width:0;background:linear-gradient(90deg,#735334,#fff2c9,#cc943b);animation:portal-progress 1.3s linear both}
.aetheria-portal-overlay__skip{
  position:absolute;top:24px;right:26px;z-index:12;
  border:1px solid rgba(228,175,95,.42);border-radius:7px;padding:10px 15px;
  color:#f0d9b5;background:rgba(14,17,21,.86);font-size:11px;font-weight:800;
  cursor:pointer;transition:background .2s}
.aetheria-portal-overlay__skip:hover{background:#43301d}
.aetheria-portal-overlay__skip:focus-visible{outline:2px solid #ffdda8;outline-offset:3px}
.aetheria-portal-overlay.is-arrival .aetheria-portal-overlay__progress{display:none}
.aetheria-portal-overlay.is-arrival .aetheria-portal-overlay__skip{display:none}
.aetheria-portal-overlay.is-arrival .aetheria-portal-overlay__core{animation:portal-arrival-core .85s ease-out both}
.aetheria-portal-overlay.is-arrival .aetheria-portal-overlay__caption{animation:portal-arrival-core .8s ease-out both}
body.aetheria-portal-noscroll{overflow:hidden!important}
@keyframes portal-veil-in{from{opacity:0}to{opacity:1}}
@keyframes portal-arrival-reveal{0%{opacity:1}22%{opacity:1}100%{opacity:0}}
@keyframes portal-arrival-core{0%{transform:scale(.88);opacity:1}100%{transform:scale(2.35);opacity:0}}
@keyframes portal-progress{from{width:0}to{width:100%}}
@keyframes portal-tunnel-spin{to{transform:rotate(360deg) scale(1.17)}}
@keyframes portal-sigil-rotate{to{transform:rotate(360deg)}}
@keyframes portal-ring-rush{
  0%{transform:translateZ(-800px) scale(.16);opacity:0}
  23%{opacity:.85}
  75%{opacity:.61}
  100%{transform:translateZ(600px) scale(2.5);opacity:0}
}
@media(max-width:640px){
  .aetheria-portal-overlay__core{width:88vmin;height:88vmin}
  .aetheria-portal-overlay__rune{width:90px;height:90px;font-size:58px}
  .aetheria-portal-overlay__caption{bottom:11vh}
  .aetheria-portal-overlay__caption strong{font-size:20px}
  .aetheria-portal-overlay__skip{top:16px;right:14px}
}
@media(prefers-reduced-motion:reduce){
  .aetheria-mode-switch{transition:none}
  .aetheria-mode-switch:hover{transform:none}
  .aetheria-portal-overlay,.aetheria-portal-overlay::before,
  .aetheria-portal-overlay__core::before,.aetheria-portal-overlay__core::after,
  .aetheria-portal-overlay__ring,.aetheria-portal-overlay__progress::after{animation:none!important}
}
