:root {
    --fundo: #0f1115;
    --fundo-cartao: #181b22;
    --fundo-escuro: #12151b;
    --borda: #2a2f3a;
    --texto: #e6e6e6;
    --texto-suave: #9aa3b2;
    --destaque: #f5c451;
    --alta: #e5484d;
    --media: #f5a524;
    --baixa: #3e9bff;
    --cor-classe: #cccccc;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

/* Arte de fundo no topo de todas as páginas, escurecida e sumindo no fundo da página, como no mythicstats.com */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    z-index: -1;
    pointer-events: none;
    /* O grupo e o portão ficam no centro da arte. 85% na vertical põe o portão atrás do título
       e o grupo logo abaixo, antes dos cartões, em telas largas, onde a arte é cortada em cima */
    /* A arte já é noturna: o degradê só escurece o suficiente para o texto e some no fundo da página */
    background:
        linear-gradient(to bottom, rgba(15, 17, 21, .15), rgba(15, 17, 21, .5) 65%, var(--fundo)),
        url("fundo-masmorra.webp") 50% 85% / cover no-repeat;
}

a { color: var(--destaque); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
h1:focus { outline: none; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
code { font-family: Consolas, "Cascadia Mono", monospace; }

.suave { color: var(--texto-suave); }
.ruim { color: var(--alta); }
.dica { color: var(--texto-suave); font-size: .9rem; margin-top: 0; }

/* Estrutura */
.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .75rem 1.5rem;
    border-bottom: 1px solid var(--borda);
    /* Semitransparente para a arte de fundo aparecer atrás do topo */
    background: rgba(18, 21, 27, .6);
}
.topo nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.seletor-idioma { display: inline-flex; align-items: center; gap: .3rem; margin: 0; }
.seletor-idioma svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: var(--texto-suave); stroke-width: 1.6; }
.seletor-idioma select {
    background: var(--fundo-escuro);
    color: var(--texto);
    border: 1px solid var(--borda);
    border-radius: 6px;
    padding: .3rem .4rem;
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
}
.seletor-idioma select:hover, .seletor-idioma select:focus { border-color: var(--destaque); outline: none; }
.logo { display: inline-flex; align-items: center; font-size: 1.4rem; font-weight: 700; letter-spacing: .04em; color: var(--texto); }
.logo span { color: var(--destaque); }
.logo svg { width: 1.75rem; height: 1.75rem; margin-right: .4rem; fill: none; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.logo polyline { stroke: var(--destaque); }
.logo line { stroke: var(--texto); }
.logo:hover { text-decoration: none; }
.conteudo { max-width: 1150px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.rodape {
    max-width: 1150px;
    margin: 0 auto;
    padding: 1rem;
    color: var(--texto-suave);
    font-size: .8rem;
    border-top: 1px solid var(--borda);
}

/* Componentes */
.botao {
    display: inline-block;
    background: var(--destaque);
    color: #111;
    border: 1px solid var(--destaque);
    border-radius: 6px;
    padding: .45rem 1rem;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    white-space: nowrap;
}
.botao:hover { text-decoration: none; filter: brightness(1.1); }
.botao:disabled { opacity: .6; cursor: wait; }
.botao.secundario { background: transparent; color: var(--destaque); }
.botao.perigo { background: var(--alta); border-color: var(--alta); color: #fff; }

.cartao {
    background: var(--fundo-cartao);
    border: 1px solid var(--borda);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    min-width: 0;
}
.cartao h2 { margin-top: 0; font-size: 1.1rem; }

.aviso {
    background: #2a2413;
    border: 1px solid #5c4a14;
    border-radius: 8px;
    padding: .75rem 1rem;
}

.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.duas-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 1rem; }
.tres-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1rem; }

.numeros { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.numeros div {
    background: var(--fundo-escuro);
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: .5rem .9rem;
}
.numeros strong { display: block; font-size: 1.35rem; }
.numeros span { color: var(--texto-suave); font-size: .8rem; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { color: var(--texto-suave); font-weight: 600; }
.tabela-rolagem { overflow-x: auto; }
.tabela-rolagem td { min-width: 180px; }
.tabela-rolagem td:first-child { min-width: 0; }

/* Barras de popularidade */
.linha-popularidade {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 2.6rem;
    align-items: center;
    gap: .6rem;
    padding: .15rem 0;
    font-size: .9rem;
}
.linha-popularidade .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha-popularidade .barra { height: 8px; background: #262b35; border-radius: 4px; overflow: hidden; }
.linha-popularidade .barra span { display: block; height: 100%; background: var(--cor-classe); }
.linha-popularidade .percentual { text-align: right; color: var(--texto-suave); }
.linha-popularidade.destaque .nome::after { content: " (você)"; color: var(--destaque); }

/* Página inicial */
.chamada { text-align: center; padding: 1.5rem 0 2rem; }
.chamada h1 { font-size: 2rem; margin-bottom: .5rem; }
.chamada p { max-width: 640px; margin: 0 auto 1.25rem; }
/* Para que serve entrar com a Battle.net, embaixo do botão */
.chamada .motivo-login {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    margin: .9rem auto 0;
    font-size: .86rem;
    color: var(--texto-suave);
}
.motivo-login svg { width: 1rem; height: 1rem; flex-shrink: 0; fill: none; stroke: var(--destaque); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.classe { border-top: 3px solid var(--cor-classe); }
.classe h2 { color: var(--cor-classe); }
.classe a { display: block; padding: .2rem 0; }
.classe small { color: var(--texto-suave); margin-left: .35rem; }

/* Ranking das especializações: posição, ícone, spec e classe, rating médio e o link para o guia */
/* Botões de papel: o selecionado fica preenchido; o ícone usa a cor do texto do botão */
.abas-papel { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.abas-papel .botao { display: inline-flex; align-items: center; gap: .4rem; }
.abas-papel .botao:hover { text-decoration: none; }
.abas-papel svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* No celular, os três lado a lado com a mesma largura */
@media (max-width: 480px) {
    .abas-papel { display: grid; grid-template-columns: repeat(3, 1fr); }
    .abas-papel .botao { justify-content: center; gap: .3rem; padding: .45rem .3rem; font-size: .85rem; }
}
.linha-rank {
    display: grid;
    grid-template-columns: 1.6rem 30px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .65rem;
    padding: .45rem .4rem;
    border-bottom: 1px solid var(--borda);
    border-radius: 6px;
    color: var(--texto);
}
.linha-rank:hover { background: var(--fundo-escuro); text-decoration: none; }
.linha-rank .posicao { color: var(--texto-suave); text-align: right; font-variant-numeric: tabular-nums; }
.linha-rank:first-child .posicao { color: var(--destaque); font-weight: 700; }
.linha-rank .icone-spec { width: 30px; height: 30px; border-radius: 5px; border: 1px solid var(--cor-classe); }
.linha-rank .nome-rank { min-width: 0; line-height: 1.25; }
.linha-rank .nome-rank strong { display: block; color: var(--cor-classe); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha-rank .nome-rank small { color: var(--texto-suave); font-size: .78rem; }
.linha-rank .rating-rank { text-align: right; font-variant-numeric: tabular-nums; }
.linha-rank .guia { color: var(--destaque); font-size: .8rem; white-space: nowrap; }
/* No celular sobra só a seta, para o nome da spec caber; a linha inteira é o link */
@media (max-width: 480px) {
    .linha-rank { gap: .5rem; }
    .linha-rank .texto-guia { display: none; }
}
/* Duas colunas em tela larga, lidas de cima para baixo */
@media (min-width: 900px) {
    .lista-rank { column-count: 2; column-gap: 1.75rem; }
    .lista-rank .linha-rank { break-inside: avoid; }
}

/* Especialização e comparação */
.titulo-spec h1 { color: var(--cor-classe); margin: 0 0 .25rem; }
.titulo-spec h1 span { color: var(--texto-suave); font-weight: 400; font-size: .6em; }
.titulo-spec p { margin: 0; }
.cabecalho-personagem { display: flex; gap: 1rem; align-items: center; }
.cabecalho-personagem > img { width: 72px; height: 72px; border-radius: 10px; border: 2px solid var(--cor-classe); }

.codigo-talentos { display: flex; gap: .6rem; align-items: center; margin-bottom: .5rem; }
.codigo-talentos code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #0c0e12;
    padding: .35rem .5rem;
    border-radius: 6px;
    font-size: .78rem;
}

.sugestao { display: flex; gap: .75rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--borda); }
.sugestao:last-child { border-bottom: 0; }
.etiqueta { font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: .1rem .45rem; border-radius: 4px; white-space: nowrap; }
.prioridade-1 { background: var(--alta); color: #fff; }
.prioridade-2 { background: var(--media); color: #111; }
.prioridade-3 { background: var(--baixa); color: #fff; }
.categoria { color: var(--texto-suave); font-size: .8rem; white-space: nowrap; min-width: 6.5rem; }

/* Meus personagens */
.personagem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-left: 4px solid var(--cor-classe);
}
.personagem strong { color: var(--cor-classe); font-size: 1.05rem; }
.personagem small { display: block; color: var(--texto-suave); }
.acoes { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Ícones */
.icone-pequeno { width: 18px; height: 18px; border-radius: 3px; vertical-align: -4px; margin-right: .3rem; }
.icone-classe { width: 26px; height: 26px; border-radius: 5px; vertical-align: -6px; margin-right: .4rem; border: 1px solid var(--cor-classe); }
.icone-item { width: 34px; height: 34px; border-radius: 4px; border: 1px solid #a335ee; flex-shrink: 0; }
.icone-grande { width: 64px; height: 64px; border-radius: 10px; border: 2px solid var(--cor-classe); }
.item-com-icone { display: flex; align-items: center; gap: .5rem; }
.item-com-icone:hover { text-decoration: none; }
/* Várias opções de item no mesmo slot, uma embaixo da outra */
.item-com-icone + .item-com-icone { margin-top: .4rem; }
/* Nome da spec em cima e o rating embaixo, para o nome não quebrar no meio */
.link-spec { display: flex !important; align-items: center; gap: .6rem; line-height: 1.25; }
.link-spec .icone-spec { width: 30px; height: 30px; border-radius: 5px; flex-shrink: 0; }
.link-spec small { display: block; margin-left: 0; font-size: .78rem; }
.nome-jogador { color: var(--cor-classe); font-weight: 600; }
.voltar { margin: 0 0 .75rem; font-size: .9rem; }
.identificacao-personagem { display: flex; align-items: center; gap: .75rem; }
.identificacao-personagem .icone-classe { width: 40px; height: 40px; margin: 0; }
.linha-popularidade .nome a { color: var(--texto); }
.link-encantamento { color: var(--texto); }
.link-sugestao { font-weight: 600; }
.link-sugestao .icone-pequeno { margin-right: .2rem; }
.encantamento-mais-usado { margin-top: .35rem; }
.etiqueta-sua { background: var(--destaque); color: #111; border-radius: 4px; padding: 0 .35rem; font-size: .7rem; font-weight: 700; margin-left: .35rem; }

/* Atributos secundários: legenda, pontos, % no jogo, barra e % da parte dos secundários.
   Na página da spec (só os top) a primeira coluna tem o nome do atributo e fica mais larga. */
.tabela-atributos { --coluna-legenda: 3.6rem; }
.tabela-atributos.so-top { --coluna-legenda: 6.6rem; }
.linha-atributo {
    display: grid;
    grid-template-columns: var(--coluna-legenda) 3.4rem 3rem minmax(1.5rem, 1fr) 2.4rem;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}
.linha-atributo .legenda { color: var(--texto-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha-atributo .numero { text-align: right; }
.linha-atributo .barra { height: 10px; background: #262b35; border-radius: 5px; overflow: hidden; }
.linha-atributo .barra span { display: block; height: 100%; border-radius: 5px; }
.linha-atributo.do-personagem .barra span { background: var(--destaque); }
.linha-atributo.top .barra span { background: var(--cor-classe); }
.so-top .linha-atributo.top { padding: .15rem 0; }
.so-top .linha-atributo.top .legenda { color: var(--texto); }
.linha-atributo.cabecalho { color: var(--texto-suave); font-size: .75rem; line-height: 1.2; align-items: end; padding-bottom: .3rem; border-bottom: 1px solid var(--borda); margin-bottom: .35rem; }
.linha-atributo.cabecalho .parte { grid-column: span 2; text-align: right; }
.rotulo-atributo { font-weight: 600; font-size: .92rem; margin-top: .45rem; }
.titulo-tabela-atributos { margin: 1.1rem 0 .35rem; font-size: .95rem; }
.titulo-tabela-atributos:first-of-type { margin-top: .25rem; }
.explicacao-atributos { margin: .85rem 0 0; padding-left: 1.1rem; color: var(--texto-suave); font-size: .8rem; }
.explicacao-atributos li + li { margin-top: .2rem; }
.explicacao-atributos strong { color: var(--texto); font-weight: 600; }

/* Árvore de talentos */
/* Classe e spec lado a lado; as heroicas embaixo, separadas por uma linha. Tudo centralizado. */
.arvores { display: flex; flex-direction: column; gap: 1.5rem; }
.linha-arvores { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 1.5rem 3.5rem; }
.linha-arvores.heroicas { border-top: 1px solid var(--borda); padding-top: 1.25rem; }
.bloco-arvore { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.bloco-arvore h3 { margin: 0 0 .75rem; text-align: center; }
.bloco-arvore h3 small { font-weight: 400; margin-left: .35rem; }
/* Folga lateral: o rótulo dos nós de escolha ("8 · 92") é mais largo que o nó */
.arvore-rolagem { overflow-x: auto; max-width: 100%; padding: 4px 14px .25rem; }
.arvore-talentos { position: relative; --tamanho-no: 44px; }
.arvore-talentos .ligacoes { position: absolute; inset: 0; pointer-events: none; }
.arvore-talentos .ligacoes line { stroke: #353b47; stroke-width: 2.5; }
.arvore-talentos .ligacoes line.forte { stroke: #7a6a3a; }
.no { position: absolute; width: var(--tamanho-no); height: var(--tamanho-no); border-radius: 50%; background: #0c0e12; box-shadow: 0 0 0 2px #3a404c; }
.no.ativo { border-radius: 8px; }
.no.escolha { border-radius: 10px; }
/* Recorta os ícones no formato do nó; o anel colorido é o box-shadow do .no, por fora */
.no .icones { display: flex; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.no .opcao { flex: 1; min-width: 0; height: 100%; display: block; }
.no.escolha .opcao + .opcao { border-left: 2px solid #0c0e12; }
.no .opcao img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no .sem-icone { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: .8rem; color: var(--texto-suave); }
.no .uso { position: absolute; top: calc(var(--tamanho-no) + 2px); left: 50%; transform: translateX(-50%); font-size: .72rem; white-space: nowrap; color: var(--texto-suave); }
.no.muito-usado { box-shadow: 0 0 0 2px #3fb950; }
.no.muito-usado .uso { color: #3fb950; font-weight: 600; }
.no.usado { box-shadow: 0 0 0 2px #d29922; }
.no.meu { box-shadow: 0 0 0 3px var(--destaque), 0 0 6px 2px rgba(245, 196, 81, .35); }
.legenda-arvore { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; font-size: .8rem; color: var(--texto-suave); margin-bottom: 1.1rem; }
.legenda-arvore .marca { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -2px; margin-right: .3rem; background: #0c0e12; box-shadow: 0 0 0 2px #3a404c; }
.legenda-arvore .marca.muito-usado { box-shadow: 0 0 0 2px #3fb950; }
.legenda-arvore .marca.usado { box-shadow: 0 0 0 2px #d29922; }
.legenda-arvore .marca.meu { box-shadow: 0 0 0 2px var(--destaque), 0 0 6px 1px rgba(245, 196, 81, .55); }

/* Janela do build: quem rola é o fundo, então a janela pode ser mais alta que a tela */
.fundo-janela {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .72);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3vh 1rem;
    overflow-y: auto;
    outline: none;
}
body:has(.fundo-janela) { overflow: hidden; }
.janela-build {
    width: min(1240px, 100%);
    background: var(--fundo-cartao);
    border: 1px solid var(--borda);
    border-top: 3px solid var(--cor-classe);
    border-radius: 10px;
    padding: 1rem 1.25rem 1.5rem;
}
.topo-janela { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.topo-janela h2 { margin: 0; font-size: 1.15rem; }
.topo-janela h2 small { font-weight: 400; font-size: .85rem; margin-left: .4rem; }
.fechar-janela { background: none; border: 0; color: var(--texto-suave); font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 .25rem; }
.fechar-janela:hover { color: var(--texto); }
.janela-build .codigo-talentos { margin-bottom: 1.25rem; }

/* Aviso de cookies do Google Analytics: fica no rodapé até a pessoa escolher */
.aviso-cookies {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 900;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--fundo-cartao);
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: .75rem 1rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
    font-size: .9rem;
}
.aviso-cookies[hidden] { display: none; }
.aviso-cookies p { margin: 0; flex: 1 1 320px; }
.aviso-cookies div { display: flex; gap: .5rem; }

@media (max-width: 600px) {
    .sugestao { flex-wrap: wrap; gap: .4rem; }
    .chamada h1 { font-size: 1.5rem; }
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "Ocorreu um erro."; }
