/* Magera Returns VFX 2026-10-13: performance-conscious progressive enhancement */
:root{--mx-aurora:#2d75cf;--mx-gold:#ddbb77;--mx-night:#101d31}
.magera-vfx-sky{position:relative;isolation:isolate;overflow:hidden}
.magera-vfx-sky>*:not(.mx-particles){position:relative;z-index:2}
.mx-particles{position:absolute;inset:0;pointer-events:none;z-index:1;mix-blend-mode:screen;opacity:.55}
.magera-vfx-sky:before{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;
background:radial-gradient(ellipse at 75% 15%,rgba(51,128,235,.17),transparent 62%),
radial-gradient(ellipse at 15% 88%,rgba(221,166,71,.09),transparent 51%)}
.mgera-glass{background:linear-gradient(145deg,rgba(22,48,76,.97),rgba(9,22,39,.97));border:1px solid rgba(217,176,100,.6);box-shadow:0 0 0 1px rgba(16,47,85,.65) inset,0 7px 25px #0004}
.mx-crystal{filter:drop-shadow(0 0 7px rgba(41,119,233,.3));transition:filter .28s ease,transform .28s ease;will-change:auto}
.mx-crystal:hover{filter:drop-shadow(0 0 14px rgba(73,157,255,.62));transform:translateY(-2px) scale(1.025)}
.mgh-hall .mgh-crest img,.mgh-hall .mgh-crest span,.mgh-hall .mgh-link,.mgd .mgd-row,.mgh-hall .mgh-season{transition:filter .26s ease,box-shadow .26s ease,transform .26s ease}
.mgh-hall .mgh-crest img:hover{filter:drop-shadow(0 0 9px rgba(35,126,240,.6));transform:translateY(-2px)}
.mgh-hall .mgh-link:hover,.mgh-hall .mgh-view:hover{box-shadow:0 0 11px rgba(235,183,96,.45),inset 0 0 6px rgba(95,168,255,.22)}
.mgd .mgd-row:hover{box-shadow:0 0 11px rgba(65,138,239,.26);transform:translateY(-2px)}
.mgh-hall .mgh-season:hover{box-shadow:0 0 22px rgba(50,133,255,.2)}
.magera-world-live{color:#f2dfb8;font:13px/1.55 Verdana,Arial,sans-serif;margin:12px 0;overflow:hidden}
.magera-world-live *{box-sizing:border-box}
.magera-world-live .mx-panel{position:relative;overflow:hidden;background:linear-gradient(115deg,#0c1930,#173452 68%,#111d31);
border:2px ridge #b08a4b;box-shadow:0 5px 20px #0005,inset 0 0 0 1px rgba(232,194,117,.27);padding:18px}
.magera-world-live .mx-top{display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap}
.magera-world-live .mx-eyebrow{font:bold 10px/1.5 Verdana,sans-serif;letter-spacing:1.9px;color:#d7b371;text-transform:uppercase}
.magera-world-live h1,.magera-world-live h2{font:700 clamp(22px,2.6vw,34px)/1.16 Georgia,serif;color:#f5d798;margin:4px 0 10px;text-shadow:0 2px 10px rgba(0,0,0,.6)}
.magera-world-live .mx-lead{margin:0 0 13px;color:#d6dee9;font:12px/1.7 Verdana,sans-serif}
.magera-world-live .mx-live{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:700;color:#8ff0be;border:1px solid #39745c;background:#122b32;border-radius:20px;padding:6px 11px}
.magera-world-live .mx-dot{width:7px;height:7px;background:#6ce9af;border-radius:50%;box-shadow:0 0 9px #72e9ba;animation:mxPulse 2.5s ease-in-out infinite}
@keyframes mxPulse{50%{opacity:.45;box-shadow:0 0 3px #72e9ba}}
.magera-world-live .mx-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:13px 0}
.magera-world-live .mx-card{display:flex;flex-direction:column;gap:5px;position:relative;border:1px solid #97744c;background:linear-gradient(145deg,#182f4e,#122138);padding:13px 12px;min-width:0}
.magera-world-live .mx-card .mx-card-label{color:#c9d5e5;font-size:10px;letter-spacing:.3px}
.magera-world-live .mx-card strong{font:700 23px Georgia,serif;color:#f6d58d;overflow-wrap:anywhere}
.magera-world-live .mx-card small{font:10px/1.5 Verdana,sans-serif;color:#b8cadc}
.magera-world-live .mx-card.mx-threat{border-color:#b3785b;background:linear-gradient(145deg,#382435,#162a45)}
.magera-world-live .mx-card.mx-threat strong{font-size:17px;color:#ffd5ae}
.magera-world-live .mx-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:12px 0}
.magera-world-live .mx-world-banner{min-height:93px;padding:15px;display:flex;gap:14px;align-items:center;border:1px solid rgba(183,138,62,.8);background:linear-gradient(125deg,rgba(13,31,51,.95),rgba(25,58,95,.93))}
.magera-world-live .mx-world-banner img{width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 0 6px rgba(63,138,251,.25));flex:none}
.magera-world-live .mx-world-banner h3{margin:0 0 4px;font:700 17px Georgia,serif;color:#f5d394}
.magera-world-live .mx-world-banner p{margin:0;color:#c7d4e4;font:11px/1.55 Verdana,sans-serif}
.magera-world-live .mx-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 2px}
.magera-world-live .mx-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 15px;
border:1px solid #d5aa67;background:linear-gradient(#2a5a8b,#11365d);box-shadow:inset 0 0 8px #81a8e033;
color:#ffdfa2!important;font:bold 11px Verdana,sans-serif;text-decoration:none!important;transition:transform .22s ease,box-shadow .22s ease}
.magera-world-live .mx-button:hover{box-shadow:0 0 12px #3777cd99;transform:translateY(-2px)}
.magera-world-live .mx-history{background:#102138;border:1px solid #806840;padding:12px;color:#d1d9e5;font-size:11px}
.magera-world-live .mx-history div{border-bottom:1px solid #42516b;padding:6px 0}
.magera-world-live .mx-history div:last-child{border-bottom:0}
.magera-world-live .mx-history b{color:#f0cf8b}
@media(max-width:760px){
 .magera-world-live .mx-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .magera-world-live .mx-grid-2{grid-template-columns:1fr}
 .magera-world-live .mx-panel{padding:12px}
}
@media(max-width:440px){
 .magera-world-live .mx-grid{grid-template-columns:1fr}
 .magera-world-live .mx-world-banner img{width:50px;height:50px}
}
@media(prefers-reduced-motion:reduce){
 .magera-world-live .mx-dot{animation:none}
 .magera-world-live *,.mgh-hall .mgh-crest img,.mgd .mgd-row{transition:none!important;animation:none!important}
 .mx-particles{display:none!important}
}

/* New separate transparent, handcrafted crests; never composite-cut sheets. */
.mgera-icon{display:inline-block;object-fit:contain;max-width:100%;height:auto}
.mgera-icon-big{width:95px;height:95px;object-fit:contain;filter:drop-shadow(0 0 11px rgba(77,156,248,.3))}
.mx-cinema{border:1px solid #97744c;background:linear-gradient(125deg,#0b1a2f,#183457);padding:12px 13px;margin:13px 0}
.mx-cinema-inner{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.mx-cinema img{width:90px;height:70px;object-fit:contain}
.mx-cinema strong{display:block;color:#f2ce83;font:700 18px Georgia,serif}
.mx-cinema small{display:block;color:#bed1e8;line-height:1.6;font-size:11px}
.mx-cinema video{display:block;max-width:100%;width:100%;max-height:400px;margin-top:9px;object-fit:contain;background:#071425}
.mx-cinema[hidden]{display:none}
.mgh-hall .mgh-guild:has(.mgh-crest):hover .mgh-crest{box-shadow:0 0 13px #529ddd55,0 3px 7px #22150d33}
.mgd .mgd-prizes>div{position:relative;padding-top:16px}
.mgd .mgd-prizes>div:before{content:"";display:block;width:70px;height:68px;margin:0 auto 10px;background:center/contain no-repeat url('/images/magera-cinematic-v1/medalha_louros.webp');filter:drop-shadow(0 0 7px #3588e588)}
.mgd .mgd-prizes>div:first-child:before{background-image:url('/images/magera-cinematic-v1/trofeu_defensores.webp')}
.mgd .mgd-prizes>div:nth-child(2):before{background-image:url('/images/magera-cinematic-v1/selo_real.webp')}
.mgd .mgd-prizes>div:nth-child(3):before{background-image:url('/images/magera-cinematic-v1/medalha_louros.webp')}
.mgd .mgd-hero{background:linear-gradient(100deg,#0a192c 0%,#172f4c 62%,#193859da 100%),url('/images/magera-cinematic-v1/brasao_dragao.webp') right 5% center/145px auto no-repeat!important}
@media(max-width:620px){.mgera-icon-big{width:72px;height:72px}.mx-cinema img{width:64px;height:58px}.mgd .mgd-hero{background-size:auto,95px auto!important}}


.mx-mobile-links{display:none}
@media(max-width:700px){
 body:has(.magera-world-live),body:has(.mgd){min-width:0!important;overflow-x:hidden!important}
 body:has(.magera-world-live) #ArtworkHelper,body:has(.mgd) #ArtworkHelper,
 body:has(.magera-world-live) #Bodycontainer,body:has(.mgd) #Bodycontainer{min-width:0!important;width:100%!important;max-width:100%!important}
 body:has(.magera-world-live) #ContentRow,body:has(.mgd) #ContentRow{width:100%!important;top:145px!important}
 body:has(.magera-world-live) #MenuColumn,body:has(.mgd) #MenuColumn,
 body:has(.magera-world-live) #ThemeboxesColumn,body:has(.mgd) #ThemeboxesColumn{display:none!important}
 body:has(.magera-world-live) #ContentColumn,body:has(.mgd) #ContentColumn{margin:0 7px!important;width:calc(100% - 14px)!important;min-width:0!important}
 body:has(.magera-world-live) #ContentHelper,body:has(.mgd) #ContentHelper,
 body:has(.magera-world-live) .Content,body:has(.mgd) .Content{width:100%!important;min-width:0!important;max-width:100%!important}
 body:has(.magera-world-live) .Content .BoxContent,body:has(.mgd) .Content .BoxContent{padding:5px!important}
 .mx-mobile-links{display:flex;gap:7px;flex-wrap:wrap;padding:8px 0}
 .mx-mobile-links a{flex:1 1 90px;text-align:center;padding:9px 8px;color:#f6dfab!important;background:#18385c;border:1px solid #a98345;font:bold 11px Verdana,Arial,sans-serif;text-decoration:none!important}
 .magera-world-live{margin:0 0 10px!important;width:100%;max-width:100%}
}

/* Honor the initial hidden state until a deliberate user click. */
.mx-cinema video[hidden]{display:none!important}

/* Make classic Tibia fixed-width wrappers responsive on the World Alive page only. */
@media (max-width:700px) {
 body:has(.magera-world-live){min-width:0!important;overflow-x:hidden!important}
 body:has(.magera-world-live) #ArtworkHelper,
 body:has(.magera-world-live) #Bodycontainer{width:100%!important;max-width:100%!important;min-width:0!important}
 body:has(.magera-world-live) #ContentRow{width:100%!important;top:145px!important;left:0!important;right:0!important}
 body:has(.magera-world-live) #MenuColumn,
 body:has(.magera-world-live) #ThemeboxesColumn{display:none!important}
 body:has(.magera-world-live) #ContentColumn{margin:0 7px!important;width:calc(100% - 14px)!important;min-width:0!important;max-width:none!important}
 body:has(.magera-world-live) #ContentHelper,
 body:has(.magera-world-live) .Content{width:100%!important;max-width:100%!important;min-width:0!important}
 body:has(.magera-world-live) .Content .BoxContent{padding:5px!important}
 body:has(.magera-world-live) #ContentContainer{width:100%!important;max-width:100%!important;min-width:0!important}
 body:has(.magera-world-live) .magera-world-live{width:100%;max-width:100%;margin:8px 0}
 body:has(.magera-world-live) .magera-world-live .mx-panel{padding:10px}
 body:has(.magera-world-live) .magera-world-live .mx-grid{grid-template-columns:repeat(1,minmax(0,1fr))}
}


/* Tibia's legacy News titles use left:135px with automatic width, causing horizontal overflow. */
@media(max-width:700px) {
 body:has(.magera-world-live) .Content #News .NewsHeadlineText,
 body:has(.magera-world-live) .Content #FeaturedArticle .NewsHeadlineText,
 body:has(.magera-world-live) .Content #NewsArchive .NewsHeadlineText {
   left:0!important;
   width:100%!important;
   box-sizing:border-box!important;
   padding-left:135px!important;
   padding-right:6px!important;
   overflow-wrap:anywhere;
 }
 body:has(.magera-world-live) .Content #News .NewsHeadlineBackground,
 body:has(.magera-world-live) .Content #FeaturedArticle .NewsHeadlineBackground,
 body:has(.magera-world-live) .Content #NewsArchive .NewsHeadlineBackground {
   height:auto!important;
   min-height:30px;
   overflow:hidden;
   padding-bottom:8px;
 }
}


/* Interactive Magera map - plotted from the audited in-game x/y town coordinates. */
.magera-world-live .mx-map-shell{margin:16px 0 4px;padding:14px;position:relative;border:1px solid #ac8246;background:linear-gradient(125deg,#0c1a2e,#17314d);color:#dce7f0}
.magera-world-live .mx-map-head{display:flex;gap:10px;align-items:center;position:relative;z-index:1}
.magera-world-live .mx-map-head img{width:48px;height:48px;object-fit:contain}
.magera-world-live .mx-map-head h2{margin:3px 0;font:700 23px Georgia,serif;color:#f1d18d}
.magera-world-live .mx-map-intro{font-size:11px;line-height:1.6;color:#cad7e4;margin:8px 0 12px;position:relative;z-index:1}
.magera-world-live .mx-map-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(190px,1fr);gap:12px;position:relative;z-index:1}
.magera-world-live .mx-map-canvas{background:radial-gradient(ellipse at 55% 42%,#225276,#0e2744 61%,#091728);border:1px solid #927446;border-radius:3px;min-width:0;overflow:hidden;box-shadow:inset 0 0 35px rgba(0,0,0,.45)}
.magera-world-live .mx-map-canvas svg{display:block;width:100%;height:auto}
.magera-world-live .mx-map-pin{cursor:pointer;outline:none}
.magera-world-live .mx-map-aura{fill:#c99543;fill-opacity:.13;stroke:#e9ba73;stroke-opacity:.35;stroke-width:1.5;transition:fill-opacity .2s}
.magera-world-live .mx-map-core{fill:#efcf8d;stroke:#4a3320;stroke-width:2;filter:drop-shadow(0 0 3px #efba5f88)}
.magera-world-live .mx-map-name{display:none;font:700 15px Georgia,serif;paint-order:stroke;stroke:#0b1e35;stroke-width:3.5;fill:#fff0c2}
.magera-world-live .mx-map-pin:is(:hover,:focus-visible,.is-selected) .mx-map-aura{fill-opacity:.65;stroke:#f4d5a2;stroke-width:2.5}
.magera-world-live .mx-map-pin:is(:hover,:focus-visible,.is-selected) .mx-map-name{display:block}
/* Attack pulse is anchored to each SVG circle, never to the whole map viewBox. */
.magera-world-live .mx-map-pin.is-active .mx-map-core{
 fill:#fb856d;stroke:#6e1920;transform-box:fill-box;transform-origin:center center;
 animation:mx-map-raid-core 2.4s ease-in-out infinite
}
.magera-world-live .mx-map-pin.is-active .mx-map-aura{
 fill:#e34838;stroke:#ff977e;fill-opacity:.62;pointer-events:none;
 transform-box:fill-box;transform-origin:center center;
 animation:mx-map-raid-pulse 2.4s ease-out infinite
}
@keyframes mx-map-raid-pulse {
 0%{opacity:.82;transform:scale(.92)}
 55%{opacity:.58;transform:scale(1.23)}
 100%{opacity:.08;transform:scale(1.58)}
}
@keyframes mx-map-raid-core {
 0%,100%{opacity:1;transform:scale(1)}
 50%{opacity:.82;transform:scale(1.14)}
}
.magera-world-live .mx-map-details{border:1px solid #675634;background:rgba(7,20,38,.78);padding:12px;min-width:0}
.magera-world-live .mx-map-details label{display:block;color:#e7c88f;font-size:11px;font-weight:700;margin-bottom:6px}
.magera-world-live .mx-map-select{background:#152f4f;color:#ffdf9a;border:1px solid #aa864b;width:100%;max-width:100%;padding:7px;font:12px Verdana,sans-serif}
.magera-world-live .mx-map-details h3{margin:12px 0 7px;font:700 21px Georgia,serif;color:#efd397;overflow-wrap:anywhere}
.magera-world-live .mx-map-details p{margin:5px 0;font-size:11px;line-height:1.6;color:#cdd8e7}
.magera-world-live .mx-map-details strong{color:#f5d38b}
.magera-world-live .mx-map-copy{min-height:48px}
.magera-world-live .mx-map-badge{background:#0e2b37;border:1px solid #3e7266;color:#93e3c2;margin-top:12px;padding:7px;font-size:10px;font-weight:700}
.magera-world-live .mx-map-badge.is-active{background:#472022;border-color:#d47b66;color:#ffcebb}
.magera-world-live .mx-map-legend{border-top:1px solid #534735;margin:13px 0;padding-top:10px;font-size:10px;display:flex;flex-direction:column;gap:7px}
.magera-world-live .mx-map-legend span{display:flex;gap:8px;align-items:center}
.magera-world-live .mx-map-legend i{display:inline-block;width:10px;height:10px;border:1px solid #e9bf7c;border-radius:50%;background:#efd18b}
.magera-world-live .mx-map-legend i.mx-legend-red{background:#e76b5d;border-color:#ffd2bf}
@media(max-width:780px){.magera-world-live .mx-map-layout{grid-template-columns:1fr}.magera-world-live .mx-map-shell{padding:9px}}
@media(max-width:420px){.magera-world-live .mx-map-head h2{font-size:20px}.magera-world-live .mx-map-details{padding:10px}}
@media(prefers-reduced-motion:reduce){.magera-world-live .mx-map-pin.is-active .mx-map-aura,.magera-world-live .mx-map-pin.is-active .mx-map-core{animation:none;transform:none}}

/* Full terrain map from the real 15.30 world.otbm, UI maintains live city coordinates. */
.magera-world-live .mx-map-canvas{position:relative;background:linear-gradient(140deg,#0c192a,#19314d);touch-action:pan-y}
.magera-world-live .mx-map-tools{position:absolute;right:7px;top:7px;z-index:4;display:flex;gap:3px}
.magera-world-live .mx-map-tools button{cursor:pointer;min-width:28px;height:28px;border:1px solid #c49d62;color:#fee5af;background:#132945e8;font:700 16px/25px Georgia,serif}
.magera-world-live .mx-map-tools button:hover,.magera-world-live .mx-map-tools button:focus-visible{background:#29507b}
.magera-world-live .mx-map-live-stats{border:1px solid #a96758;background:linear-gradient(130deg,#432431,#1c3550);padding:9px;margin:12px 0;display:flex;flex-direction:column;gap:6px;font-size:11px}
.magera-world-live .mx-map-live-stats[hidden]{display:none!important}
.magera-world-live .mx-map-live-stats>span:first-child{font-weight:700;color:#ffceac}
.magera-world-live .mx-map-live-stats strong{color:#ffdaa2}
.magera-world-live .mx-live-event[hidden]{display:none!important}
.magera-world-live .mx-live-metrics{display:flex;gap:15px;flex-wrap:wrap;margin:9px 0;color:#f0cf8d}
.magera-world-live .mx-live-metrics strong{font-weight:700;color:#fff2ca}
.magera-world-live .mx-live-progress{overflow:hidden;width:100%;height:6px;background:#243f5a;border:1px solid #957b52}
.magera-world-live .mx-live-progress>span{display:block;width:0;height:100%;background:linear-gradient(90deg,#5cabe5,#dfbc6b);transition:width .45s ease}
.magera-world-live .mx-live-badge-stale{border-color:#957352!important;color:#f0d49c!important;background:#302c2a!important}
.magera-world-live .mx-map-pin.is-active .mx-map-core{filter:drop-shadow(0 0 5px #fc513a)}
.magera-world-live .mx-map-canvas svg{display:block}
@media (prefers-reduced-motion: reduce) {.magera-world-live .mx-live-progress>span{transition:none}}
