/* =========================================================
   CABEÇALHO DO SITE (todas as páginas)
   ========================================================= */

.barra-site {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 1.5rem;
}

.marca {
    font: 800 1.15rem var(--fonte-titulo);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--titulo-grad);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}
[data-tema="retro"] .marca { font-size: .8rem; }

.menu {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.menu a {
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--suave);
    font-weight: 600;
    font-size: .85em;
    text-decoration: none;
    transition: color .2s, background .2s, border-color .2s;
}
.menu a:hover { color: var(--texto); background: color-mix(in srgb, var(--texto) 7%, transparent); }
.menu a[aria-current="page"] {
    color: var(--lend);
    border-color: color-mix(in srgb, var(--lend) 45%, transparent);
    background: color-mix(in srgb, var(--lend) 10%, transparent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--lend) 25%, transparent);
}
[data-tema="retro"] .menu a { border-radius: 0; }

.temas .tema-btn { padding: 6px; }
.temas .orbe { width: 16px; height: 16px; }

/* Wishlist: chamas no lugar da nota */
.nota-hype { font-size: .7em; letter-spacing: -2px; }

.btn-video {
    display: block;
    margin-bottom: 8px;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 720px) {
    .barra-site { flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 1rem; }
    .menu { order: 3; width: 100%; justify-content: center; margin: 0; }
    .menu a { padding: 6px 10px; font-size: .78em; }
}


/* =========================================================
   BOTÃO VOLTAR AO TOPO
   ========================================================= */
.subir {
    position: fixed;
    right: 22px;
    bottom: 52px;
    z-index: 70;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 2px solid color-mix(in srgb, var(--lend) 70%, white);
    border-radius: 50%;
    background: radial-gradient(circle at 32% 25%, color-mix(in srgb, var(--lend) 40%, white), var(--lend) 55%, color-mix(in srgb, var(--lend) 55%, black));
    color: #1a1204;
    cursor: pointer;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .7), 0 0 20px color-mix(in srgb, var(--lend) 50%, transparent), inset 0 2px 3px rgba(255, 255, 255, .6);
    opacity: 0;
    transform: translateY(20px) scale(.8);
    pointer-events: none;
    transition: opacity .3s, transform .35s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s;
}
.subir.visivel { opacity: 1; transform: none; pointer-events: auto; }
.subir svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.subir:hover { transform: translateY(-4px) scale(1.1); box-shadow: 0 12px 26px -6px rgba(0, 0, 0, .8), 0 0 30px var(--lend), inset 0 2px 3px rgba(255, 255, 255, .7); }
.subir:active { transform: scale(.94); }
.subir:focus-visible { outline: 3px solid var(--raro); outline-offset: 3px; }
@media (max-width: 720px) { .subir { right: 14px; bottom: 56px; width: 46px; height: 46px; } }


/* =========================================================
   CABECALHO v2: "Dashboard Gamer" no centro com brilho do tema,
   menu em barra de botoes a esquerda, seletor de tema a direita.
   Todas as cores vem do tema ativo (--titulo-grad, --raro, --epic,
   --lend), entao trocar o tema troca o brilho junto.
   ========================================================= */

.barra-site {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 12px;
}
.barra-site .menu { justify-self: start; margin: 0; }
.barra-site .seletor-tema { justify-self: end; }

/* ---------- Titulo luminoso ---------- */
.marca {
    position: relative;
    isolation: isolate;
    justify-self: center;
    padding: 2px 6px 8px;
    background: none;
    color: inherit;
    font: 800 clamp(1.3rem, 1.1rem + 1vw, 2rem) var(--fonte-titulo);
    letter-spacing: 5px;
    text-align: center;
}
/* Texto com o degrade do tema andando devagar */
.marca span {
    background: var(--titulo-grad);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: marca-brilho 6s linear infinite;
}
/* Copia borrada atras do texto = halo de luz na cor do tema */
.marca::before {
    content: attr(data-texto);
    position: absolute;
    inset: 2px 6px 8px;
    z-index: -1;
    background: var(--titulo-grad);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: blur(14px) saturate(1.4);
    opacity: .85;
    animation: marca-brilho 6s linear infinite, marca-pulso 3s ease-in-out infinite;
}
/* Linha de luz embaixo do titulo */
.marca::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--epic), var(--raro), var(--lend), transparent);
    box-shadow: 0 0 12px var(--raro), 0 0 24px var(--epic);
    opacity: .9;
}
.marca:hover::before { opacity: 1; filter: blur(18px) saturate(1.6); }
@keyframes marca-brilho { to { background-position: 220% center; } }
@keyframes marca-pulso { 50% { opacity: .45; } }
[data-tema="retro"] .marca { letter-spacing: 2px; font-size: 1rem; }
:is([data-tema="gatinho"], [data-tema="jardim"], [data-tema="doces"], [data-tema="pergaminho"]) .marca::before { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .marca span, .marca::before { animation: none; } }

/* ---------- Menu em barra de botoes ---------- */
.menu {
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--linha);
    border-radius: 999px;
    background: color-mix(in srgb, var(--card) 75%, transparent);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent), 0 8px 24px -14px rgba(0, 0, 0, .7);
}
.menu a {
    position: relative;
    padding: 8px 16px;
    border: 0;
    font-size: .86em;
    letter-spacing: .3px;
    transition: color .2s, background .25s, box-shadow .25s, transform .15s;
}
.menu a:hover {
    color: var(--texto);
    border: 0;
    background: color-mix(in srgb, var(--raro) 16%, transparent);
    box-shadow: none;
    transform: translateY(-1px);
}
.menu a:active { transform: translateY(0) scale(.97); }
/* Pagina atual: botao aceso com o degrade do tema */
.menu a[aria-current="page"] {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, var(--epic), var(--raro));
    box-shadow: 0 0 16px color-mix(in srgb, var(--raro) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.menu a:focus-visible { outline: 2px solid var(--lend); outline-offset: 2px; }
[data-tema="retro"] .menu { border-radius: 0; }

/* Seletor de tema combinando com o menu */
.seletor-botao { height: 42px; backdrop-filter: blur(8px); }

/* Celular: titulo em cima, menu e tema embaixo */
@media (max-width: 860px) {
    .barra-site { grid-template-columns: 1fr auto; gap: 10px 12px; }
    .marca { grid-column: 1 / -1; grid-row: 1; }
    .barra-site .menu { grid-row: 2; }
    .barra-site .seletor-tema { grid-row: 2; }
}
@media (max-width: 720px) {
    .barra-site { display: grid; padding: 10px 1rem; }
    .barra-site .menu { grid-column: 1 / -1; grid-row: 2; width: auto; justify-self: center; }
    .barra-site .seletor-tema { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
}
