Mudanças entre as edições de "Widget:Teste"

De Wiki Gla
Ir para navegação Ir para pesquisar
m
Etiqueta: Revertido
m
Etiqueta: Revertido
Linha 1: Linha 1:
<script>
<script>
     (function () {
     (function () {
         const buttons = document.querySelectorAll('.tab-btn');
         const $ = (s) => document.querySelector(s);
        const contents = document.querySelectorAll('.tab-content');
         const $$ = (s) => Array.from(document.querySelectorAll(s));
         const cuadrosContainer = document.querySelector('.cuadros-container');
 
        const descripcionContainer = document.querySelector('.descripcion-container');
         // ---- Tabs
         const videoContainer = document.querySelector('.video-container');
         const tabBtns = $$('.tabs__btn');
         const cuadros = [...cuadrosContainer.querySelectorAll('.cuadro')];
         const panels = $$('.tabs__panel');
         const mwBody = document.querySelector('.personaje-box');
        let totalVideos = 0;
        let loadedVideos = 0;
        const videosCache = {};
        let autoplayEnabled = false;


         activarFlechasCarrusel();
         tabBtns.forEach(btn => {
            btn.addEventListener('click', () => {
                const id = btn.dataset.tab;
                tabBtns.forEach(b => b.classList.remove('is-active'));
                panels.forEach(p => p.classList.remove('is-active'));
                btn.classList.add('is-active');
                const panel = document.getElementById(id);
                if (panel) panel.classList.add('is-active');
            });
        });


         const placeholder = document.createElement('div');
        // ---- Skills
         placeholder.className = 'video-placeholder';
         const iconsContainer = $('.skills__icons');
         placeholder.innerHTML = `<img src="/images/d/d5/Icon_gla.png" alt="Cargando...">`;
         const iconItems = iconsContainer ? Array.from(iconsContainer.querySelectorAll('.skills__icon')) : [];
         videoContainer.appendChild(placeholder);
         const descBox = $('.skills__desc');
         const videoBox = $('.skills__video');


         function removePlaceholderSmooth() {
         const videosCache = {};
            placeholder.classList.add('fade-out');
        let totalVideos = 0, loadedVideos = 0, autoplay = false;
            placeholder.addEventListener('transitionend', () => placeholder.remove(), { once: true });
        }


         function checkAllVideosLoaded() {
         // placeholder do vídeo
             if (loadedVideos === totalVideos && totalVideos > 0) {
        let placeholder = null;
                autoplayEnabled = true;
        if (videoBox) {
             }
             placeholder = document.createElement('div');
            placeholder.className = 'video-placeholder';
            placeholder.innerHTML = '<img src="/images/d/d5/Icon_gla.png" alt="Carregando...">';
             videoBox.appendChild(placeholder);
         }
         }
        const removePlaceholder = () => {
            if (!placeholder) return;
            placeholder.classList.add('fade-out');
            placeholder.addEventListener('transitionend', () => {
                placeholder?.remove();
                placeholder = null;
            }, { once: true });
        };


         // Pré-carregar todos os vídeos
         // pré-carrega vídeos
         cuadros.forEach(div => {
         iconItems.forEach(el => {
             const videoSrc = div.dataset.video;
             const src = (el.dataset.video || '').trim();
             const index = div.dataset.index;
             const idx = el.dataset.index || '';
            if (!src || !videoBox || videosCache[idx]) return;


             if (videoSrc && videoSrc.trim() !== '' && !videosCache[index]) {
             totalVideos++;
                totalVideos++;
            const v = document.createElement('video');
            v.controls = true;
            v.preload = 'auto';
            v.playsInline = true;
            v.style.display = 'none';
            v.dataset.index = idx;


                const videoEl = document.createElement('video');
            const source = document.createElement('source');
                videoEl.setAttribute('width', '100%');
            source.src = src;
                videoEl.setAttribute('controls', '');
            source.type = 'video/webm';
                videoEl.setAttribute('preload', 'auto');
            v.appendChild(source);
                videoEl.setAttribute('playsinline', '');
                videoEl.dataset.index = index;
                videoEl.style.display = 'none';


                const source = document.createElement('source');
            v.addEventListener('canplay', () => {
                 source.src = videoSrc;
                loadedVideos++;
                 source.type = 'video/webm';
                 if (loadedVideos === 1) { v.pause(); v.currentTime = 0; }
                 videoEl.appendChild(source);
                 const active = document.querySelector('.skills__icon.is-active');
                 if (active && active.dataset.index === idx) setTimeout(removePlaceholder, 180);
                if (loadedVideos === totalVideos) autoplay = true;
            });


                // Quando o vídeo já estiver pronto, remover placeholder
            v.addEventListener('error', () => {
                videoEl.addEventListener('canplay', () => {
                loadedVideos++;
                    loadedVideos++;
                removePlaceholder();
                    if (loadedVideos === 1) {
                if (loadedVideos === totalVideos) autoplay = true;
                        videoEl.pause();
            });
                        videoEl.currentTime = 0;
                    }
                    const activeCuadro = document.querySelector('.cuadro.activo');
                    if (activeCuadro && activeCuadro.dataset.index === videoEl.dataset.index) {
                        setTimeout(removePlaceholderSmooth, 200);
                    }
                    checkAllVideosLoaded();
                });
 
 
 
                videoEl.addEventListener('error', () => {
                    loadedVideos++;
                    removePlaceholderSmooth();
                    checkAllVideosLoaded();
                });


                videoContainer.appendChild(videoEl);
            videoBox.appendChild(v);
                videosCache[index] = videoEl;
            videosCache[idx] = v;
            }
         });
         });


        // Se não houver vídeos, ocultar imediatamente
         if (totalVideos === 0) removePlaceholder();
         if (totalVideos === 0) {
            placeholder.remove();
        }


         buttons.forEach(btn => btn.addEventListener('click', () => {
         // clique nas skills
             buttons.forEach(b => b.classList.remove('active'));
        iconItems.forEach(el => {
             contents.forEach(c => c.classList.remove('active'));
            const name = el.dataset.name || '';
             btn.classList.add('active');
             const desc = (el.dataset.desc || '').replace(/'''(.*?)'''/g, '<b>$1</b>');
             document.getElementById(btn.dataset.tab).classList.add('active');
             const attrs = el.dataset.attrs || '';
        }));
             const idx = el.dataset.index || '';
             const hasVideo = !!(el.dataset.video && el.dataset.video.trim() !== '');


        cuadros.forEach(div => {
             el.title = name;
            const nome = div.dataset.nome;
            const desc = div.dataset.desc.replace(/'''(.*?)'''/g, '<b>$1</b>');
            const atr = div.dataset.atr;
             const index = div.dataset.index;
            const hasVideo = div.dataset.video && div.dataset.video.trim() !== '';


             div.title = nome;
             el.addEventListener('click', () => {
                if (!autoplay && loadedVideos > 0) autoplay = true;


            div.addEventListener('click', () => {
                // título + atributos + texto
                if (!autoplayEnabled && loadedVideos > 0) {
                if (descBox) {
                    autoplayEnabled = true;
                    descBox.innerHTML = `
          <div class="skill__title"><h3>${name}</h3></div>
          ${renderAttributes(attrs)}
          <div class="skill__text">${desc}</div>
        `;
                 }
                 }
                descripcionContainer.innerHTML = `
                <div class="titulo-habilidad">
                    <h3>${nome}</h3>
                </div>
                ${generarHTMLAtributos(atr)}
                <div class="desc">${desc}</div>
            `;


                 Object.values(videosCache).forEach(v => {
                // vídeo
                    v.pause();
                 Object.values(videosCache).forEach(v => { v.pause(); v.style.display = 'none'; });
                    v.style.display = 'none';
                 if (videoBox) {
                });
                    if (hasVideo && videosCache[idx]) {
 
                        const v = videosCache[idx];
                 // Gerenciar habilidades com/sem vídeo
                         videoBox.style.display = 'block';
                if (hasVideo) {
                         v.style.display = 'block';
                    const videoEl = videosCache[index];
                         v.currentTime = 0;
                    if (videoEl) {
                         if (autoplay) v.play().catch(() => { });
                         videoContainer.style.display = 'block';
                    } else {
                         videoEl.style.display = 'block';
                        videoBox.style.display = 'none';
                         videoEl.currentTime = 0;
                         if (autoplayEnabled) {
                            videoEl.play().catch(e => console.log('Autoplay bloqueado:', e));
                        }
                     }
                     }
                } else {
                    videoContainer.style.display = 'none';
                 }
                 }


                 cuadros.forEach(c => c.classList.remove('activo'));
                 // estado ativo
                 div.classList.add('activo');
                iconItems.forEach(i => i.classList.remove('is-active'));
                 el.classList.add('is-active');
             });
             });
            ['data-nome', 'data-desc', 'data-atr', 'data-video'].forEach(attr => div.removeAttribute(attr));
        });
        if (Object.keys(videosCache).length === 0) {
            videoContainer.style.display = 'none';
        }
        if (cuadros.length) cuadros[0].click();
        cuadrosContainer.addEventListener('wheel', e => {
            if (e.deltaY) {
                e.preventDefault();
                cuadrosContainer.scrollLeft += e.deltaY;
            }
         });
         });


         function activarFlechasCarrusel() {
         // seleciona a primeira por padrão
            const carousel = document.querySelector('.skins-carousel');
        if (iconItems.length) iconItems[0].click();
            const wrapper = document.querySelector('.skins-carousel-wrapper');
            const [leftBtn, rightBtn] = ['.skins-arrow.left', '.skins-arrow.right'].map(sel => document.querySelector(sel));
            let isPredictingScroll = false, isAutoScrolling = false;


            const getScrollAmount = () => carousel.clientWidth * 0.6;
        // scroll horizontal com roda do mouse
 
        if (iconsContainer) {
             const hideArrow = btn => {
             iconsContainer.addEventListener('wheel', (e) => {
                 if (!btn.classList.contains('desapareciendo') && btn.style.display !== 'none') {
                 if (e.deltaY) {
                     btn.classList.add('desapareciendo');
                     e.preventDefault();
                     setTimeout(() => {
                     iconsContainer.scrollLeft += e.deltaY;
                        btn.style.display = 'none';
                        btn.classList.remove('desapareciendo');
                    }, 300);
                 }
                 }
             };
             });
        }


             const showArrow = btn => {
        // ---- Skins: setas
                if (btn.style.display === 'none') {
        initSkinsArrows();
                    btn.style.display = 'inline-block';
        function initSkinsArrows() {
                    void btn.offsetWidth;
             const carousel = $('.skins__carousel');
                }
            const left = $('.skins__arrow--left');
                btn.classList.remove('desapareciendo');
            const right = $('.skins__arrow--right');
             };
             if (!carousel || !left || !right) return;


             const setArrowsState = scrollLeft => {
             const scrollAmt = () => Math.round(carousel.clientWidth * 0.6);
                const maxScroll = carousel.scrollWidth - carousel.clientWidth;
                const hasLeft = scrollLeft > 5, hasRight = scrollLeft < maxScroll - 5;
                hasLeft ? showArrow(leftBtn) : hideArrow(leftBtn);
                hasRight ? showArrow(rightBtn) : hideArrow(rightBtn);
                wrapper.classList.toggle('has-left', hasLeft);
                wrapper.classList.toggle('has-right', hasRight);
                if (!hasLeft && !hasRight) { carousel.style.justifyContent = 'center'; } else { carousel.style.justifyContent = ''; }
            };


             const handleArrowClick = dir => {
             function update() {
                 isPredictingScroll = true;
                 const max = carousel.scrollWidth - carousel.clientWidth;
                 const scrollLeft = carousel.scrollLeft, maxScroll = carousel.scrollWidth - carousel.clientWidth;
                 const x = carousel.scrollLeft;
                 const nextScroll = dir === 'left' ? Math.max(0, scrollLeft - getScrollAmount()) : Math.min(maxScroll, scrollLeft + getScrollAmount());
                left.disabled = x <= 0;
                right.disabled = x >= max - 1;
            }
            function go(dir) {
                const max = carousel.scrollWidth - carousel.clientWidth;
                 const next = dir < 0
                    ? Math.max(0, carousel.scrollLeft - scrollAmt())
                    : Math.min(max, carousel.scrollLeft + scrollAmt());
                carousel.scrollTo({ left: next, behavior: 'smooth' });
            }


                setArrowsState(nextScroll);
            left.addEventListener('click', () => go(-1));
                carousel.scrollTo({ left: nextScroll, behavior: 'smooth' });
             right.addEventListener('click', () => go(1));
 
             carousel.addEventListener('scroll', update);
                let last = -1, still = 0;
             new ResizeObserver(update).observe(carousel);
                const wait = setInterval(() => {
             update();
                    const current = Math.round(carousel.scrollLeft);
                    if (current === last) {
                        if (++still >= 2) {
                            clearInterval(wait);
                            isPredictingScroll = false;
                            setArrowsState(current);
                        }
                    } else {
                        last = current;
                        still = 0;
                    }
                }, 50);
            };
 
            carousel.addEventListener('scroll', () => {
                if (!isPredictingScroll) setArrowsState(carousel.scrollLeft);
             });
 
            new ResizeObserver(() => {
                if (!isPredictingScroll) setArrowsState(carousel.scrollLeft);
            }).observe(carousel);
 
            leftBtn.addEventListener('click', () => handleArrowClick('left'));
             rightBtn.addEventListener('click', () => handleArrowClick('right'));
             setArrowsState(carousel.scrollLeft);
        }
        // Resolve o arquivo de forma confiável (cai no /images/... certo)
        function resolveFile(name) {
            if (window.mw && mw.util && typeof mw.util.getUrl === 'function') {
                return mw.util.getUrl('Special:FilePath/' + encodeURIComponent(name));
             }
            return '/index.php/Special:FilePath/' + encodeURIComponent(name);
         }
         }


         function generarHTMLAtributos(str) {
        // ---- atributos (ordem fixa + espaços reservados)
         function renderAttributes(str) {
             const vals = (str || '').split(',').map(v => v.trim());
             const vals = (str || '').split(',').map(v => v.trim());
            // ordem recebida: [PVE, PVP, Energia, Recarga]
             const pve = vals[0]; const pvp = vals[1]; const ene = vals[2]; const cd = vals[3];
             const pveRaw = vals[0] ?? '-';
            const pvpRaw = vals[1] ?? '-';
            const eneRaw = vals[2] ?? '-';
            const cdRaw = vals[3] ?? '-';


             const energia = (eneRaw === '-' || isNaN(parseInt(eneRaw, 10)))
             const energia = (!ene || ene === '-' || isNaN(parseInt(ene, 10))) ? '-' :
                ? '-' : ((parseInt(eneRaw, 10) > 0 ? '+' : '') + parseInt(eneRaw, 10));
                ((parseInt(ene, 10) > 0 ? '+' : '') + parseInt(ene, 10));
 
             const recarga = (!cd || cd === '-' || isNaN(parseInt(cd, 10))) ? '-' :
             const recarga = (cdRaw === '-' || isNaN(parseInt(cdRaw, 10)))
                (parseInt(cd, 10) + ' seg');
                ? '-' : (parseInt(cdRaw, 10) + ' seg');


             const rows = [
             const rows = [
                 ['Recarga', recarga],
                 ['Recarga', recarga],
                 ['Energia', energia],
                 ['Energia', energia],
                 ['Poder', (pveRaw === '-' || isNaN(parseInt(pveRaw, 10))) ? '-' : parseInt(pveRaw, 10)],
                 ['Poder', (isNaN(parseInt(pve, 10)) ? '-' : parseInt(pve, 10))],
                 ['Poder PvP', (pvpRaw === '-' || isNaN(parseInt(pvpRaw, 10))) ? '-' : parseInt(pvpRaw, 10)],
                 ['Poder PvP', (isNaN(parseInt(pvp, 10)) ? '-' : parseInt(pvp, 10))]
             ];
             ];


             return `
             return `
    <div class="attr-list">
      <div class="attrs">
      ${rows.map(([label, value]) => `
        ${rows.map(([label, value]) => `
        <div class="attr-row${value === '-' ? ' is-empty' : ''}">
          <div class="attrs__row${value === '-' ? ' attrs__row--empty' : ''}">
          <span class="attr-label">${label}:</span>
            <span class="attrs__label">${label}:</span>
          <span class="attr-value">${value}</span>
            <span class="attrs__value">${value}</span>
        </div>
          </div>
      `).join('')}
        `).join('')}
    </div>
      </div>
  `;
    `;
         }
         }
     })();
     })();
</script>
</script>
<style>
<style>
    /* --------- Resetzinhos úteis ---------- */
/* -------------------- Base / resets -------------------- */
    img {
img { pointer-events: none; user-select: none; }
        pointer-events: none;
video { max-height: 33.25em; object-fit: fill; }
        user-select: none;
.mw-body { padding: unset !important; }
    }
.mw-body-content { line-height: 1.5 !important; }
 
/* Se sua wiki injeta parágrafos soltos acima, mantenha: */
    video {
.mw-body-content p { display: none; }
        max-height: 33.25em;
        object-fit: fill;
    }
 
    .mw-body {
        padding: unset !important;
    }
 
    .mw-body-content {
        line-height: 1.5 !important;
    }
 
    .mw-body-content p {
        display: none;
    }
 
    /* --------- Banner de fundo do topo ---------- */
    .banner {
        position: absolute;
        z-index: -9;
        width: 100%;
        height: 100%;
        background-image: url(https://i.imgur.com/OVGhLvl.png);
        background-size: cover;
    }
 
    .banner-personaje {
        width: 100%;
        height: auto;
    }
 
    .banner::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to right, rgba(0, 0, 0, .6), rgba(0, 0, 0, .2));
    }
 
    /* --------- Caixa geral ---------- */
    .personaje-box {
        padding: unset !important;
        color: #000;
        font-family: 'Noto Sans', sans-serif !important;
        width: 100%;
        margin: auto;
        position: relative;
        user-select: none;
    }
 
    .personaje-box p {
        display: unset;
    }
 
    /* --------- Topbar ---------- */
    .personaje-topbar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 20px;
        padding-top: 4px;
    }
 
    .personaje-nome-box {
        display: flex;
        align-items: center;
        gap: 14px;
    }
 
    .topbar-icon {
        margin-top: 8px;
        width: 100px;
        height: 100px;
        object-fit: none;
    }
 
    .nome {
        text-shadow: 0 0 6px #000, 0 0 9px #000;
        color: #fff;
        font-size: 56px;
        font-family: 'Orbitron', sans-serif;
        font-weight: 900;
    }
 
    .topbar-description {
        display: none !important;
        font-size: 16px;
        margin-top: 6px;
        width: fit-content;
        padding-inline: 16px;
        border-radius: 0 10px 10px 0;
        box-shadow: 0 0 2px rgb(0 0 0 / 70%);
    }
 
    .personaje-header {
        position: relative;
        overflow: hidden;
        display: flex;
        gap: 10px;
        flex-direction: column;
    }
 
    /* Arte do personagem – fica dentro do header e por trás do conteúdo */
    .art-personaje {
        width: 34.3vw;
        height: auto;
        position: absolute;
        right: 3.5rem;
        top: -3.1rem;
        z-index: 1;
        pointer-events: none;
    }
 
    .classes {
        display: flex;
        gap: 9px;
        flex-wrap: wrap;
        margin-left: .28rem;
    }
 
    .classe {
        background: #353420;
        color: #fff;
        outline: 2px solid #000;
        padding: 1px 6px;
        border-radius: 4px;
        font-size: .9em;
        font-weight: bold;
        box-shadow: 0 0 2px rgb(0 0 0 / 70%);
    }
 
    .personaje-info {
        user-select: none;
    }
 
    .personaje-info .tier,
    .personaje-info .classe {
        font-size: 18px;
        color: #bbb;
    }
 
    /* --------- Abas ---------- */
    .personaje-tabs {
        margin: 4px 0 4px 8px;
        display: flex;
        gap: 12px;
        justify-content: flex-start;
    }
 
    .tab-btn {
        padding: 5px 20px;
        background: #333;
        color: #fff;
        border: 2px solid transparent;
        border-radius: 8px;
        font-size: 20px;
        cursor: pointer;
        font-weight: 600;
        line-height: 1;
        transition: background .15s ease, border-color .15s ease;
    }
 
    .tab-btn.active {
        background: #156bc7;
        border-color: #156bc7;
    }
 
    .tab-content {
        display: none;
        background: #26211cd6;
        padding: 0 8px 8px;
        position: relative;
        z-index: 3;
    }
 
    .tab-content.active {
        display: block;
    }
 
    /* --------- Habilidades ---------- */
    .habilidades-container {
        display: flex;
        gap: 20px;
    }
 
    .habilidades-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 50%;
        justify-content: center;
    }
 
    /* Barra dos ícones – ocupa toda a largura e fica acima da arte */
    .cuadros-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px 0 3px 1px;
        position: relative;
        z-index: 4;
        margin-bottom: 6px;
        scrollbar-width: thin;
        scrollbar-color: #ababab transparent;
        scroll-behavior: smooth;
        justify-content: flex-start;
    }
 
    .cuadros-container::-webkit-scrollbar {
        height: 6px;
    }
 
    .cuadros-container::-webkit-scrollbar-track {
        background: transparent;
    }
 
    .cuadros-container::-webkit-scrollbar-thumb {
        background-color: #151515;
        border-radius: 3px;
    }
 
    .cuadros-container .cuadro {
        flex: 0 0 auto;
        width: 50px;
        height: 50px;
        border-radius: 5px;
        cursor: pointer;
        transition: transform .2s, box-shadow .2s;
    }
 
    .cuadros-container .cuadro.activo {
        box-shadow: 0 0 0 1.5px #FFD700;
    }
 
    .cuadro img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
 
    /* Título e tooltip */
    .titulo-habilidad {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 8px;
        padding-right: 32px;
    }
 
    .titulo-habilidad h3 {
        font-size: 1.6em;
        color: #fff;
        text-align: center;
        margin: 0;
        width: 100%;
    }
 
    .tooltip-container {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
 
    .info-btn {
        border: none;
        color: #D3DBDC;
        background: #787878;
        font-weight: bold;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        font-family: 'Noto Sans';
        cursor: pointer;
        transition: .2s;
        box-shadow: 0 0 3px #000;
        font-size: 40px;
        padding: 0;
        line-height: 24px;
        text-align: center;
    }
 
    .tooltip-text {
        visibility: hidden;
        width: 220px;
        background: #222;
        color: #fff;
        text-align: left;
        padding: 8px 10px;
        border-radius: 8px;
        position: absolute;
        z-index: 10;
        bottom: 130%;
        left: 50%;
        transform: translate(-85%, 110%);
        opacity: 0;
        transition: opacity .3s;
        font-size: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
        pointer-events: none;
    }
 
    .tooltip-container:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
 
    /* Descrição da habilidade */
    .descripcion-container {
        min-height: 27.5rem;
        height: 100%;
        padding: 4px 16px !important;
        background: #26211C;
        border-radius: 8px;
        position: relative;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
        color: #fff;
        backdrop-filter: blur(2px);
        transition: all .3s ease;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
        padding-top: 0 !important;
        z-index: 99;
    }
 
    .descripcion-container h3 {
        font-size: 2.7em;
        margin: 0;
        text-align: center;
        padding-top: 0;
    }
 
    .descripcion-container p,
    .desc {
        font-size: 1.2em;
        margin: 0;
    }
 
    .desc {
        overflow-y: auto !important;
        max-height: inherit;
        margin-top: 10px;
    }
 
    .desc * {
        font-size: inherit !important;
        line-height: inherit;
    }
 
    .descripcion-container .descLevel {
        margin-top: 5px;
        font-weight: bold;
    }
 
    .descripcion-container .desc::-webkit-scrollbar,
    .tabSkill--container::-webkit-scrollbar {
        width: 7px;
        height: 7px;
    }
 
    .descripcion-container .desc::-webkit-scrollbar-thumb,
    .tabSkill--container::-webkit-scrollbar-thumb {
        background-color: rgb(71 153 255);
        border-radius: 10px;
    }
 
    .descripcion-container .desc::-webkit-scrollbar-track,
    .tabSkill--container::-webkit-scrollbar-track {
        background-color: #151515a8;
        border-radius: 10px;
    }
 
    /* Tiers */
    .tier-bronze .topbar-icon,
    .tier-bronze .tier {
        outline: 2px solid #7b4e2f !important;
    }
 
    .tier-silver .topbar-icon,
    .tier-silver .tier {
        outline: 2px solid #d6d2d2 !important;
    }
 
    .tier-gold .topbar-icon,
    .tier-gold .tier {
        outline: 2px solid #fcd300 !important;
    }
 
    .tier-diamond .topbar-icon,
    .tier-diamond .tier {
        outline: 2px solid #60dae2 !important;
    }
 
    /* Vídeo da habilidade */
    video::-webkit-media-controls {
        opacity: 0;
        transition: opacity .3s;
    }
 
    video:hover::-webkit-media-controls {
        opacity: 1;
    }
 
    .video-container {
        position: relative;
        width: 43%;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 2%;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
        overflow: hidden;
        z-index: 999;
    }
 
    .video-placeholder {
        position: absolute;
        inset: 0;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        opacity: 1;
        transition: opacity .9s ease;
    }
 
    .video-placeholder img {
        width: 120px;
        height: auto;
        animation: breathe 2.5s ease-in-out infinite;
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, .3));
    }
 
    .video-placeholder.fade-out {
        opacity: 0;
    }
 
    @keyframes breathe {
 
        0%,
        100% {
            transform: scale(1);
            opacity: 1;
        }
 
        50% {
            transform: scale(1.07);
            opacity: .85;
        }
    }
 
    /* ===== Atributos ===== */
    .attr-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin: 4px 0 10px;
    }
 
    .descripcion-container .attr-list,
    .descripcion-container .attr-list * {
        text-shadow: none;
        font-family: 'Noto Sans', sans-serif;
    }
 
    .attr-row {
        min-height: 22px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
 
    .attr-row.is-empty {
        visibility: hidden;
    }
 
    .attr-label {
        font-weight: 700;
        color: #f0c87b;
        font-size: 0.95rem;
    }
 
    .attr-value {
        color: #fff;
        font-weight: 800;
        font-size: 1.05rem;
        letter-spacing: .01em;
    }
 
    @media (max-aspect-ratio: 3/4) {
        .attr-row {
            min-height: 26px;
        }
 
        .attr-label {
            font-size: 1.2rem;
        }
 
        .attr-value {
            font-size: 1.25rem;
        }
    }
 
 
    /* --------- Skins ---------- */
    .attribute-title,
    .card-skins-title {
        font-size: 1.4em;
        text-align: center;
        letter-spacing: 1px;
        font-family: 'Noto Sans', sans-serif !important;
        border-bottom: 2px solid #9d9c9c;
        color: #fff !important;
        padding-bottom: 8px;
        margin-bottom: 16px;
        width: 75%;
    }
 
    .card-skins {
        padding-block: 12px;
        border-radius: 12px;
        user-select: none;
    }
 
    .skins-carousel-wrapper {
        min-height: 21.1rem;
        max-height: 60%;
        padding: 0 16px 1px !important;
        background: #26211C;
        border-radius: 8px;
        position: relative;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
        color: #fff;
        backdrop-filter: blur(2px);
        transition: all .3s ease;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
        flex: 1;
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: center;
        align-items: center;
        overflow: visible;
        z-index: 99;
    }
 
    /* Gradientes laterais quando houver rolagem */
    .skins-carousel-wrapper::before,
    .skins-carousel-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        width: 60px;
        height: 100%;
        pointer-events: none;
        opacity: 0;
        transition: opacity .4s ease;
        z-index: 3;
    }
 
    .skins-carousel-wrapper::before {
        left: 0;
        background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
    }
 
    .skins-carousel-wrapper::after {
        right: 0;
        background: linear-gradient(to left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
    }
 
    .skins-carousel-wrapper.has-left::before,
    .skins-carousel-wrapper.has-right::after {
        opacity: 1;
    }
 
    .has-left {
        padding-left: 60px;
    }
 
    .has-left .skins-carousel {
        mask-image: linear-gradient(to right, transparent 0px, black 40px, black 100%);
    }
 
    .has-right {
        padding-right: 60px;
    }
 
    .has-right .skins-carousel {
        mask-image: linear-gradient(to right, black 0px, black calc(100% - 40px), transparent 100%);
    }
 
    .card-skins-title {
        display: block;
        border-bottom: unset;
        font-size: 40px;
        font-weight: bold;
        padding-bottom: unset;
        margin-bottom: 10px;
        width: 47%;
    }
 
    .skins-carousel {
        display: flex;
        gap: 1vw;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 10px 0;
        flex-grow: 1;
    }
 
    .skins-carousel.both-mask {
        mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%);
    }
 
    .skins-carousel.left-mask {
        mask-image: linear-gradient(to right, transparent 0px, black 40px, black 100%);
    }
 
    .skins-carousel.right-mask {
        mask-image: linear-gradient(to right, black 0px, black calc(100% - 40px), transparent 100%);
    }
 
    .skins-carousel.no-mask {
        mask-image: none;
    }
 
    .skins-carousel::-webkit-scrollbar {
        display: none;
    }
 
    .skins-arrow {
        background: none;
        border: none;
        color: #fff;
        font-size: 36px;
        cursor: pointer;
        padding: 8px;
        z-index: 5;
        transition: opacity .3s ease, transform .3s ease;
    }
 
    .skins-arrow.left {
        margin-right: 8px;
    }
 
    .skins-arrow.right {
        margin-left: 8px;
    }
 
    .skins-arrow.hidden {
        opacity: 0;
        transform: scale(.8);
        pointer-events: none;
        visibility: hidden;
    }
 
    .skin-card {
        position: relative;
        width: 12vw;
        height: 39vh;
        flex: 0 0 auto;
        border: 2px solid #697EC9 !important;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
        background: #111;
    }
 
    .skin-card::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        z-index: 2;
        box-shadow: inset 0 0 8px rgba(180, 180, 180, .18);
    }
 
    .skins--imageBanner {
        width: 100%;
        height: 109%;
    }
 
    .skins--imageBanner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(.5);
        scale: 1.1;
    }
 
    .skins--imageSkin img {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        height: 140px;
        width: auto;
        z-index: 2;
        transition: transform .2s;
    }
 
    /* --------- Responsivo (tela “alta”/mobile) ---------- */
    @media (max-aspect-ratio: 3/4) {
        .desc {
            font-size: 26px;
            line-height: 1.5;
            overflow-y: auto !important;
            max-height: inherit;
            margin: 0;
            width: 100%;
            margin-top: 8px;
        }
 
        .desc * {
            font-size: inherit !important;
            line-height: inherit;
        }
 
        .habilidades-container {
            display: flex;
            gap: 20px;
            flex-direction: column-reverse;
        }
 
        .habilidades-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            width: 96%;
            align-self: center;
        }
 
        .video-container {
            width: 80%;
            border-radius: 3%;
            margin-top: 2%;
            align-self: center;
        }
 
        .art-personaje {
            display: none;
            width: 370px;
            height: 290px;
            position: absolute;
            right: .5rem;
            top: 1.1rem;
            z-index: 1;
            pointer-events: none;
        }


        .topbar-description {
/* -------------------- Character container -------------------- */
            font-size: 22px;
.character {
        }
  position: relative;
  width: 100%;
  margin: 0 auto;
  color: #000;
  font-family: 'Noto Sans', sans-serif !important;
  user-select: none;
}
.character p { display: unset; }


        .personaje-info .tier,
/* Header + banner + art */
        .personaje-info .classe {
.character__header {
            font-size: 30px;
  position: relative;
        }
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.character__banner {
  position: absolute;
  inset: 0;
  z-index: -9;
  background-size: cover;
  background-position: center;
}
.character__banner::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,.2));
}
.character__art {
  position: absolute;
  right: 3.5rem;
  top: -3.1rem;
  width: 34.3vw; height: auto;
  z-index: 1; pointer-events: none;
}


        .cuadros-container {
/* Topbar: avatar, nome e tags */
            width: 98%;
.character__topbar {
            place-self: center;
  display:flex; flex-direction:column; align-items:flex-start;
            padding: 10px 0 16px 1px;
  padding: 8px 20px; padding-top:4px;
        }
}
.character__namebox { display:flex; align-items:center; gap:14px; }
.character__avatar { margin-top:8px; width:100px; height:100px; object-fit:none; }
.character__name {
  font-family:'Orbitron', sans-serif; font-weight:900;
  font-size:56px; color:#fff;
  text-shadow: 0 0 6px #000, 0 0 9px #000;
}
.character__tags { display:flex; gap:9px; flex-wrap:wrap; margin-left:.28rem; }
.character__tag {
  background:#353420; color:#fff; border-radius:4px;
  padding:1px 6px; font-size:.9em; font-weight:bold;
  outline:2px solid #000; box-shadow:0 0 2px rgb(0 0 0 / 70%);
}
.character.tier-bronze  .character__tag--tier { outline-color:#7b4e2f !important; }
.character.tier-silver  .character__tag--tier { outline-color:#d6d2d2 !important; }
.character.tier-gold    .character__tag--tier { outline-color:#fcd300 !important; }
.character.tier-diamond .character__tag--tier { outline-color:#60dae2 !important; }


        .cuadros-container .cuadro {
/* -------------------- Tabs -------------------- */
            width: 80px;
.tabs { margin:4px 0 4px 8px; display:flex; gap:12px; justify-content:flex-start; }
            height: 80px;
.tabs__btn{
        }
  padding:5px 20px; background:#333; color:#fff;
  border:2px solid transparent; border-radius:8px;
  font-size:20px; font-weight:600; line-height:1; cursor:pointer;
  transition: background .15s ease, border-color .15s ease;
}
.tabs__btn.is-active{ background:#156bc7; border-color:#156bc7; }
.tabs__panel{
  display:none; background:#26211cd6; padding:0 8px 8px;
  position:relative; z-index:3;
}
.tabs__panel.is-active{ display:block; }


        .descripcion-container h3 {
/* -------------------- Skills -------------------- */
            font-size: 3.6em;
.skills { display:flex; gap:20px; }
            margin-top: -14px;
.skills__icons{
        }
  display:flex; gap:10px; flex-wrap:nowrap;
  width:100%; overflow-x:auto; overflow-y:hidden;
  padding:10px 0 3px 1px; margin-bottom:6px;
  position:relative; z-index:4; justify-content:flex-start;
  scrollbar-width: thin; scrollbar-color:#ababab transparent; scroll-behavior:smooth;
}
.skills__icons::-webkit-scrollbar { height:6px; }
.skills__icons::-webkit-scrollbar-track { background:transparent; }
.skills__icons::-webkit-scrollbar-thumb { background:#151515; border-radius:3px; }


        .descripcion-container p {
.skills__icon{
            font-size: 2.3em;
  flex:0 0 auto; width:50px; height:50px; border-radius:5px; cursor:pointer;
            margin-bottom: 5px;
  transition: transform .2s, box-shadow .2s;
        }
}
.skills__icon.is-active{ box-shadow:0 0 0 1.5px #FFD700; }
.skills__icon img{ width:100%; height:100%; object-fit:cover; }


        .descripcion-container {
/* Descrição da skill */
            padding: 22px !important;
.skills__desc{
        }
  flex:1; width:50%; display:flex; flex-direction:column; gap:10px; justify-content:center;
  min-height:27.5rem; height:100%;
  padding:4px 16px !important; padding-top:0 !important;
  background:#26211C; color:#fff; border-radius:8px;
  position:relative; z-index:99;
  box-shadow:0 6px 18px rgba(0,0,0,.28); backdrop-filter: blur(2px);
  text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.skill__title h3{
  font-size:2.7em; margin:0; padding-top:0; text-align:center; color:#fff;
}
.skill__text{ font-size:1.2em; margin:0; }
.skill__text *{ font-size:inherit !important; line-height:inherit; }


        .tab-btn {
/* Atributos (ordem fixa, linhas reservadas) */
            padding: 10px 20px;
.attrs{ display:flex; flex-direction:column; gap:4px; margin:4px 0 10px; }
            font-size: 26px;
.skills__desc .attrs, .skills__desc .attrs *{ text-shadow:none; font-family:'Noto Sans', sans-serif; }
        }
.attrs__row{
  min-height:22px; display:flex; align-items:center; gap:6px;
}
.attrs__row--empty{ visibility:hidden; }
.attrs__label{ font-weight:700; color:#f0c87b; font-size:.95rem; }
.attrs__value{ color:#fff; font-weight:800; font-size:1.05rem; letter-spacing:.01em; }


        .tab-content {
/* Vídeo da skill */
            position: relative;
.skills__video{
            z-index: 1;
  position:relative; width:43%;
            padding: 0 8px 20px;
  background:#000; display:flex; align-items:center; justify-content:center;
        }
  border-radius:2%; overflow:hidden; z-index:999;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.video-placeholder{
  position:absolute; inset:0; background:#000;
  display:flex; align-items:center; justify-content:center;
  z-index:2; opacity:1; transition:opacity .9s ease;
}
.video-placeholder img{ width:120px; height:auto; animation:breathe 2.5s ease-in-out infinite; filter:drop-shadow(0 0 6px rgba(255,255,255,.3)); }
.video-placeholder.fade-out{ opacity:0; }
@keyframes breathe { 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.07); opacity:.85; } }
video::-webkit-media-controls{ opacity:0; transition:opacity .3s; }
video:hover::-webkit-media-controls{ opacity:1; }


        .classe {
/* -------------------- Skins -------------------- */
            padding: 0 5px;
.skins__title{
            font-size: 1.4em;
  display:block; width:47%; margin-bottom:10px; padding-bottom:0;
        }
  font-family:'Noto Sans', sans-serif !important; font-weight:700;
  font-size:40px; color:#fff; text-align:center; border-bottom:none;
}
.skins__wrapper{
  min-height:21.1rem; max-height:60%;
  padding:0 16px 1px !important;
  background:#26211C; color:#fff; border-radius:8px;
  position:relative; z-index:99;
  box-shadow:0 8px 24px rgba(0,0,0,.35); backdrop-filter: blur(2px);
  display:flex; gap:10px; justify-content:center; align-items:center;
  text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  overflow:visible; transition: all .3s ease;
}
/* Gradientes laterais quando houver rolagem */
.skins__wrapper::before, .skins__wrapper::after{
  content:""; position:absolute; top:0; width:60px; height:100%;
  pointer-events:none; opacity:0; transition:opacity .4s ease; z-index:3;
}
.skins__wrapper::before{ left:0;  background:linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); }
.skins__wrapper::after { right:0; background:linear-gradient(to left,  rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); }
.skins__wrapper.has-left::before, .skins__wrapper.has-right::after{ opacity:1; }


        /* chips maiores no mobile */
.skins__carousel{
        .attr-chips {
  display:flex; gap:1vw; flex-grow:1;
            gap: 14px;
  overflow-x:auto; padding:10px 0; scroll-behavior:smooth;
        }
}
.skins__carousel.both-mask { mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%); }
.skins__carousel.left-mask { mask-image: linear-gradient(to right, transparent 0px, black 40px, black 100%); }
.skins__carousel.right-mask{ mask-image: linear-gradient(to right, black 0px, black calc(100% - 40px), transparent 100%); }
.skins__carousel.no-mask  { mask-image:none; }
.skins__carousel::-webkit-scrollbar{ display:none; }


        .attr-chip {
.skins__arrow{
            padding: 10px 14px;
  background:none; border:none; color:#fff; font-size:36px; cursor:pointer; padding:8px; z-index:5;
            border-radius: 12px;
  transition: opacity .3s ease, transform .3s ease;
        }
}
.skins__arrow--left { margin-right:8px; }
.skins__arrow--right{ margin-left:8px; }
.skins__arrow.hidden{ opacity:0; transform:scale(.8); pointer-events:none; visibility:hidden; }


        .attr-label,
.skin-card{
        .attr-value {
  position:relative; width:12vw; height:39vh; flex:0 0 auto;
            font-size: 1.3rem;
  border:2px solid #697EC9 !important; border-radius:8px; overflow:hidden;
        }
  background:#111; box-shadow:0 2px 10px rgba(0,0,0,.25);
}
.skin-card::before{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:2;
  box-shadow: inset 0 0 8px rgba(180,180,180,.18);
}
.skins--imageBanner{ width:100%; height:109%; }
.skins--imageBanner img{ width:100%; height:100%; object-fit:cover; filter:brightness(.5); scale:1.1; }
.skins--imageSkin img{
  position:absolute; bottom:10px; left:50%; transform:translateX(-50%);
  height:140px; width:auto; z-index:2; transition:transform .2s;
}


        .skins-carousel {
/* -------------------- Responsive (tela alta / mobile) -------------------- */
            gap: 20px;
@media (max-aspect-ratio: 3/4){
        }
  .skills { flex-direction:column-reverse; gap:20px; }
  .skills__desc{ padding:22px !important; }
  .skills__icons{ width:98%; place-self:center; padding:10px 0 16px 1px; }
  .skills__icon{ width:80px; height:80px; }
  .skill__title h3{ font-size:3.6em; margin-top:-14px; }
  .skill__text{ font-size:2.3em; margin-bottom:5px; }
  .skills__video{ width:80%; border-radius:3%; margin-top:2%; align-self:center; }


        .skin-card {
  .character__art{ display:none; width:370px; height:290px; right:.5rem; top:1.1rem; z-index:1; }
            width: 236px;
            height: 400px;
        }


        .skins--imageSkin img {
  .tabs__btn{ padding:10px 20px; font-size:26px; }
            height: 170px;
  .tabs__panel{ position:relative; z-index:1; padding:0 8px 20px; }
        }


        .tooltipster-content {
  .character__tag{ padding:0 5px; font-size:1.4em; }
            font-size: 26px;
        }


        .attribute-title,
  .attrs__row{ min-height:26px; }
        .card-skins-title {
  .attrs__label{ font-size:1.2rem; }
            width: 100% !important;
  .attrs__value{ font-size:1.25rem; }
        }


        .skins-arrow {
  .skins__carousel{ gap:20px; }
            display: none !important;
  .skin-card{ width:236px; height:400px; }
        }
  .skins--imageSkin img{ height:170px; }


        .skins-carousel-wrapper::after,
  .skins__title{ width:100% !important; }
        .skins-carousel-wrapper::before {
  .skins__arrow{ display:none !important; }
            background: unset;
  .skins__wrapper::before, .skins__wrapper::after{ background:unset; }
        }


        video::-webkit-media-controls {
  video::-webkit-media-controls{ opacity:unset; transition:unset; }
            opacity: unset;
  video:hover::-webkit-media-controls{ opacity:unset; }
            transition: unset;
}
        }
 
        video:hover::-webkit-media-controls {
            opacity: unset;
        }
    }
</style>
</style>

Edição das 21h05min de 18 de agosto de 2025

<script>

   (function () {
       const $ = (s) => document.querySelector(s);
       const $$ = (s) => Array.from(document.querySelectorAll(s));
       // ---- Tabs
       const tabBtns = $$('.tabs__btn');
       const panels = $$('.tabs__panel');
       tabBtns.forEach(btn => {
           btn.addEventListener('click', () => {
               const id = btn.dataset.tab;
               tabBtns.forEach(b => b.classList.remove('is-active'));
               panels.forEach(p => p.classList.remove('is-active'));
               btn.classList.add('is-active');
               const panel = document.getElementById(id);
               if (panel) panel.classList.add('is-active');
           });
       });
       // ---- Skills
       const iconsContainer = $('.skills__icons');
       const iconItems = iconsContainer ? Array.from(iconsContainer.querySelectorAll('.skills__icon')) : [];
       const descBox = $('.skills__desc');
       const videoBox = $('.skills__video');
       const videosCache = {};
       let totalVideos = 0, loadedVideos = 0, autoplay = false;
       // placeholder do vídeo
       let placeholder = null;
       if (videoBox) {
           placeholder = document.createElement('div');
           placeholder.className = 'video-placeholder';
           placeholder.innerHTML = '<img src="/images/d/d5/Icon_gla.png" alt="Carregando...">';
           videoBox.appendChild(placeholder);
       }
       const removePlaceholder = () => {
           if (!placeholder) return;
           placeholder.classList.add('fade-out');
           placeholder.addEventListener('transitionend', () => {
               placeholder?.remove();
               placeholder = null;
           }, { once: true });
       };
       // pré-carrega vídeos
       iconItems.forEach(el => {
           const src = (el.dataset.video || ).trim();
           const idx = el.dataset.index || ;
           if (!src || !videoBox || videosCache[idx]) return;
           totalVideos++;
           const v = document.createElement('video');
           v.controls = true;
           v.preload = 'auto';
           v.playsInline = true;
           v.style.display = 'none';
           v.dataset.index = idx;
           const source = document.createElement('source');
           source.src = src;
           source.type = 'video/webm';
           v.appendChild(source);
           v.addEventListener('canplay', () => {
               loadedVideos++;
               if (loadedVideos === 1) { v.pause(); v.currentTime = 0; }
               const active = document.querySelector('.skills__icon.is-active');
               if (active && active.dataset.index === idx) setTimeout(removePlaceholder, 180);
               if (loadedVideos === totalVideos) autoplay = true;
           });
           v.addEventListener('error', () => {
               loadedVideos++;
               removePlaceholder();
               if (loadedVideos === totalVideos) autoplay = true;
           });
           videoBox.appendChild(v);
           videosCache[idx] = v;
       });
       if (totalVideos === 0) removePlaceholder();
       // clique nas skills
       iconItems.forEach(el => {
           const name = el.dataset.name || ;
           const desc = (el.dataset.desc || ).replace(/(.*?)/g, '$1');
           const attrs = el.dataset.attrs || ;
           const idx = el.dataset.index || ;
           const hasVideo = !!(el.dataset.video && el.dataset.video.trim() !== );
           el.title = name;
           el.addEventListener('click', () => {
               if (!autoplay && loadedVideos > 0) autoplay = true;
               // título + atributos + texto
               if (descBox) {
                   descBox.innerHTML = `

${name}

         ${renderAttributes(attrs)}
${desc}
       `;
               }
               // vídeo
               Object.values(videosCache).forEach(v => { v.pause(); v.style.display = 'none'; });
               if (videoBox) {
                   if (hasVideo && videosCache[idx]) {
                       const v = videosCache[idx];
                       videoBox.style.display = 'block';
                       v.style.display = 'block';
                       v.currentTime = 0;
                       if (autoplay) v.play().catch(() => { });
                   } else {
                       videoBox.style.display = 'none';
                   }
               }
               // estado ativo
               iconItems.forEach(i => i.classList.remove('is-active'));
               el.classList.add('is-active');
           });
       });
       // seleciona a primeira por padrão
       if (iconItems.length) iconItems[0].click();
       // scroll horizontal com roda do mouse
       if (iconsContainer) {
           iconsContainer.addEventListener('wheel', (e) => {
               if (e.deltaY) {
                   e.preventDefault();
                   iconsContainer.scrollLeft += e.deltaY;
               }
           });
       }
       // ---- Skins: setas
       initSkinsArrows();
       function initSkinsArrows() {
           const carousel = $('.skins__carousel');
           const left = $('.skins__arrow--left');
           const right = $('.skins__arrow--right');
           if (!carousel || !left || !right) return;
           const scrollAmt = () => Math.round(carousel.clientWidth * 0.6);
           function update() {
               const max = carousel.scrollWidth - carousel.clientWidth;
               const x = carousel.scrollLeft;
               left.disabled = x <= 0;
               right.disabled = x >= max - 1;
           }
           function go(dir) {
               const max = carousel.scrollWidth - carousel.clientWidth;
               const next = dir < 0
                   ? Math.max(0, carousel.scrollLeft - scrollAmt())
                   : Math.min(max, carousel.scrollLeft + scrollAmt());
               carousel.scrollTo({ left: next, behavior: 'smooth' });
           }
           left.addEventListener('click', () => go(-1));
           right.addEventListener('click', () => go(1));
           carousel.addEventListener('scroll', update);
           new ResizeObserver(update).observe(carousel);
           update();
       }
       // ---- atributos (ordem fixa + espaços reservados)
       function renderAttributes(str) {
           const vals = (str || ).split(',').map(v => v.trim());
           const pve = vals[0]; const pvp = vals[1]; const ene = vals[2]; const cd = vals[3];
           const energia = (!ene || ene === '-' || isNaN(parseInt(ene, 10))) ? '-' :
               ((parseInt(ene, 10) > 0 ? '+' : ) + parseInt(ene, 10));
           const recarga = (!cd || cd === '-' || isNaN(parseInt(cd, 10))) ? '-' :
               (parseInt(cd, 10) + ' seg');
           const rows = [
               ['Recarga', recarga],
               ['Energia', energia],
               ['Poder', (isNaN(parseInt(pve, 10)) ? '-' : parseInt(pve, 10))],
               ['Poder PvP', (isNaN(parseInt(pvp, 10)) ? '-' : parseInt(pvp, 10))]
           ];
           return `
       ${rows.map(([label, value]) => `
           ${label}:
           ${value}
       `).join()}
   `;
       }
   })();

</script> <style> /* -------------------- Base / resets -------------------- */ img { pointer-events: none; user-select: none; } video { max-height: 33.25em; object-fit: fill; } .mw-body { padding: unset !important; } .mw-body-content { line-height: 1.5 !important; } /* Se sua wiki injeta parágrafos soltos acima, mantenha: */ .mw-body-content p { display: none; }

/* -------------------- Character container -------------------- */ .character {

 position: relative;
 width: 100%;
 margin: 0 auto;
 color: #000;
 font-family: 'Noto Sans', sans-serif !important;
 user-select: none;

} .character p { display: unset; }

/* Header + banner + art */ .character__header {

 position: relative;
 overflow: hidden;
 display: flex;
 flex-direction: column;
 gap: 10px;

} .character__banner {

 position: absolute;
 inset: 0;
 z-index: -9;
 background-size: cover;
 background-position: center;

} .character__banner::before{

 content:"";
 position:absolute; inset:0;
 background: linear-gradient(to right, rgba(0,0,0,.6), rgba(0,0,0,.2));

} .character__art {

 position: absolute;
 right: 3.5rem;
 top: -3.1rem;
 width: 34.3vw; height: auto;
 z-index: 1; pointer-events: none;

}

/* Topbar: avatar, nome e tags */ .character__topbar {

 display:flex; flex-direction:column; align-items:flex-start;
 padding: 8px 20px; padding-top:4px;

} .character__namebox { display:flex; align-items:center; gap:14px; } .character__avatar { margin-top:8px; width:100px; height:100px; object-fit:none; } .character__name {

 font-family:'Orbitron', sans-serif; font-weight:900;
 font-size:56px; color:#fff;
 text-shadow: 0 0 6px #000, 0 0 9px #000;

} .character__tags { display:flex; gap:9px; flex-wrap:wrap; margin-left:.28rem; } .character__tag {

 background:#353420; color:#fff; border-radius:4px;
 padding:1px 6px; font-size:.9em; font-weight:bold;
 outline:2px solid #000; box-shadow:0 0 2px rgb(0 0 0 / 70%);

} .character.tier-bronze .character__tag--tier { outline-color:#7b4e2f !important; } .character.tier-silver .character__tag--tier { outline-color:#d6d2d2 !important; } .character.tier-gold .character__tag--tier { outline-color:#fcd300 !important; } .character.tier-diamond .character__tag--tier { outline-color:#60dae2 !important; }

/* -------------------- Tabs -------------------- */ .tabs { margin:4px 0 4px 8px; display:flex; gap:12px; justify-content:flex-start; } .tabs__btn{

 padding:5px 20px; background:#333; color:#fff;
 border:2px solid transparent; border-radius:8px;
 font-size:20px; font-weight:600; line-height:1; cursor:pointer;
 transition: background .15s ease, border-color .15s ease;

} .tabs__btn.is-active{ background:#156bc7; border-color:#156bc7; } .tabs__panel{

 display:none; background:#26211cd6; padding:0 8px 8px;
 position:relative; z-index:3;

} .tabs__panel.is-active{ display:block; }

/* -------------------- Skills -------------------- */ .skills { display:flex; gap:20px; } .skills__icons{

 display:flex; gap:10px; flex-wrap:nowrap;
 width:100%; overflow-x:auto; overflow-y:hidden;
 padding:10px 0 3px 1px; margin-bottom:6px;
 position:relative; z-index:4; justify-content:flex-start;
 scrollbar-width: thin; scrollbar-color:#ababab transparent; scroll-behavior:smooth;

} .skills__icons::-webkit-scrollbar { height:6px; } .skills__icons::-webkit-scrollbar-track { background:transparent; } .skills__icons::-webkit-scrollbar-thumb { background:#151515; border-radius:3px; }

.skills__icon{

 flex:0 0 auto; width:50px; height:50px; border-radius:5px; cursor:pointer;
 transition: transform .2s, box-shadow .2s;

} .skills__icon.is-active{ box-shadow:0 0 0 1.5px #FFD700; } .skills__icon img{ width:100%; height:100%; object-fit:cover; }

/* Descrição da skill */ .skills__desc{

 flex:1; width:50%; display:flex; flex-direction:column; gap:10px; justify-content:center;
 min-height:27.5rem; height:100%;
 padding:4px 16px !important; padding-top:0 !important;
 background:#26211C; color:#fff; border-radius:8px;
 position:relative; z-index:99;
 box-shadow:0 6px 18px rgba(0,0,0,.28); backdrop-filter: blur(2px);
 text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;

} .skill__title h3{

 font-size:2.7em; margin:0; padding-top:0; text-align:center; color:#fff;

} .skill__text{ font-size:1.2em; margin:0; } .skill__text *{ font-size:inherit !important; line-height:inherit; }

/* Atributos (ordem fixa, linhas reservadas) */ .attrs{ display:flex; flex-direction:column; gap:4px; margin:4px 0 10px; } .skills__desc .attrs, .skills__desc .attrs *{ text-shadow:none; font-family:'Noto Sans', sans-serif; } .attrs__row{

 min-height:22px; display:flex; align-items:center; gap:6px;

} .attrs__row--empty{ visibility:hidden; } .attrs__label{ font-weight:700; color:#f0c87b; font-size:.95rem; } .attrs__value{ color:#fff; font-weight:800; font-size:1.05rem; letter-spacing:.01em; }

/* Vídeo da skill */ .skills__video{

 position:relative; width:43%;
 background:#000; display:flex; align-items:center; justify-content:center;
 border-radius:2%; overflow:hidden; z-index:999;
 box-shadow:0 8px 24px rgba(0,0,0,.35);

} .video-placeholder{

 position:absolute; inset:0; background:#000;
 display:flex; align-items:center; justify-content:center;
 z-index:2; opacity:1; transition:opacity .9s ease;

} .video-placeholder img{ width:120px; height:auto; animation:breathe 2.5s ease-in-out infinite; filter:drop-shadow(0 0 6px rgba(255,255,255,.3)); } .video-placeholder.fade-out{ opacity:0; } @keyframes breathe { 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.07); opacity:.85; } } video::-webkit-media-controls{ opacity:0; transition:opacity .3s; } video:hover::-webkit-media-controls{ opacity:1; }

/* -------------------- Skins -------------------- */ .skins__title{

 display:block; width:47%; margin-bottom:10px; padding-bottom:0;
 font-family:'Noto Sans', sans-serif !important; font-weight:700;
 font-size:40px; color:#fff; text-align:center; border-bottom:none;

} .skins__wrapper{

 min-height:21.1rem; max-height:60%;
 padding:0 16px 1px !important;
 background:#26211C; color:#fff; border-radius:8px;
 position:relative; z-index:99;
 box-shadow:0 8px 24px rgba(0,0,0,.35); backdrop-filter: blur(2px);
 display:flex; gap:10px; justify-content:center; align-items:center;
 text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
 overflow:visible; transition: all .3s ease;

} /* Gradientes laterais quando houver rolagem */ .skins__wrapper::before, .skins__wrapper::after{

 content:""; position:absolute; top:0; width:60px; height:100%;
 pointer-events:none; opacity:0; transition:opacity .4s ease; z-index:3;

} .skins__wrapper::before{ left:0; background:linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); } .skins__wrapper::after { right:0; background:linear-gradient(to left, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); } .skins__wrapper.has-left::before, .skins__wrapper.has-right::after{ opacity:1; }

.skins__carousel{

 display:flex; gap:1vw; flex-grow:1;
 overflow-x:auto; padding:10px 0; scroll-behavior:smooth;

} .skins__carousel.both-mask { mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%); } .skins__carousel.left-mask { mask-image: linear-gradient(to right, transparent 0px, black 40px, black 100%); } .skins__carousel.right-mask{ mask-image: linear-gradient(to right, black 0px, black calc(100% - 40px), transparent 100%); } .skins__carousel.no-mask { mask-image:none; } .skins__carousel::-webkit-scrollbar{ display:none; }

.skins__arrow{

 background:none; border:none; color:#fff; font-size:36px; cursor:pointer; padding:8px; z-index:5;
 transition: opacity .3s ease, transform .3s ease;

} .skins__arrow--left { margin-right:8px; } .skins__arrow--right{ margin-left:8px; } .skins__arrow.hidden{ opacity:0; transform:scale(.8); pointer-events:none; visibility:hidden; }

.skin-card{

 position:relative; width:12vw; height:39vh; flex:0 0 auto;
 border:2px solid #697EC9 !important; border-radius:8px; overflow:hidden;
 background:#111; box-shadow:0 2px 10px rgba(0,0,0,.25);

} .skin-card::before{

 content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:2;
 box-shadow: inset 0 0 8px rgba(180,180,180,.18);

} .skins--imageBanner{ width:100%; height:109%; } .skins--imageBanner img{ width:100%; height:100%; object-fit:cover; filter:brightness(.5); scale:1.1; } .skins--imageSkin img{

 position:absolute; bottom:10px; left:50%; transform:translateX(-50%);
 height:140px; width:auto; z-index:2; transition:transform .2s;

}

/* -------------------- Responsive (tela alta / mobile) -------------------- */ @media (max-aspect-ratio: 3/4){

 .skills { flex-direction:column-reverse; gap:20px; }
 .skills__desc{ padding:22px !important; }
 .skills__icons{ width:98%; place-self:center; padding:10px 0 16px 1px; }
 .skills__icon{ width:80px; height:80px; }
 .skill__title h3{ font-size:3.6em; margin-top:-14px; }
 .skill__text{ font-size:2.3em; margin-bottom:5px; }
 .skills__video{ width:80%; border-radius:3%; margin-top:2%; align-self:center; }
 .character__art{ display:none; width:370px; height:290px; right:.5rem; top:1.1rem; z-index:1; }
 .tabs__btn{ padding:10px 20px; font-size:26px; }
 .tabs__panel{ position:relative; z-index:1; padding:0 8px 20px; }
 .character__tag{ padding:0 5px; font-size:1.4em; }
 .attrs__row{ min-height:26px; }
 .attrs__label{ font-size:1.2rem; }
 .attrs__value{ font-size:1.25rem; }
 .skins__carousel{ gap:20px; }
 .skin-card{ width:236px; height:400px; }
 .skins--imageSkin img{ height:170px; }
 .skins__title{ width:100% !important; }
 .skins__arrow{ display:none !important; }
 .skins__wrapper::before, .skins__wrapper::after{ background:unset; }
 video::-webkit-media-controls{ opacity:unset; transition:unset; }
 video:hover::-webkit-media-controls{ opacity:unset; }

} </style>