/* ============================================================
   RF AVALON — TEMA NOVO para as paginas internas
   Carregado depois de style.css e painel.css: aqui so ajustamos o
   conteudo antigo (.panel, .page-head, .rf-button...) ao visual do painel.
   ============================================================ */
body.tema-novo { background: var(--fundo) !important; font-family: var(--f-corpo); }
body.tema-novo::before, body.tema-novo::after { display: none !important; }
body.tema-novo .page-noise, body.tema-novo .ambient { display: none !important; }

/* Estrutura */
body.tema-novo .site-shell { width: min(1240px, 100% - 48px); margin: 0 auto; min-height: 0; }
body.tema-novo .main-content { width: 100%; padding: 8px 0 40px; }
body.tema-novo .hub-btn.ativo { border-color: var(--line); background: rgba(46,168,255,.16); }
body.tema-novo .hub-btn.ativo::before { opacity: 1; }
body.tema-novo .rodape-links a { color: var(--steel); }
body.tema-novo .rodape-links a:hover { color: var(--ice); }
body.tema-novo .rodape-linha { margin-bottom: 8px; }
body.tema-novo .rodape { letter-spacing: .2em; }

/* Cabecalhos de pagina */
body.tema-novo .eyebrow { color: var(--ice); font-family: var(--f-titulo); font-size: 11px; letter-spacing: .32em; }
body.tema-novo .page-head h1, body.tema-novo .section-head h2, body.tema-novo .text-page h1 {
  font-family: var(--f-titulo); font-weight: 700; letter-spacing: .06em; color: var(--chrome);
  text-shadow: 0 0 24px rgba(127,216,255,.25);
}
body.tema-novo .page-head p, body.tema-novo .muted { color: var(--steel); }
body.tema-novo .page-head { margin: 22px 0 22px; }

/* Paineis: vidro recortado (igual ao painel do jogador) */
body.tema-novo .panel {
  background: var(--vidro); border: 1px solid var(--line-soft); border-radius: 0;
  box-shadow: none; backdrop-filter: blur(4px);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
body.tema-novo .panel-title h2, body.tema-novo .panel h2 { font-family: var(--f-titulo); letter-spacing: .22em; text-transform: uppercase; }
body.tema-novo .panel-title a { color: var(--ice); }
body.tema-novo table th { font-size: 11px; letter-spacing: .24em; color: var(--steel); }
body.tema-novo table td { font-size: 15px; }
body.tema-novo .rank-pos.top { color: var(--ice); }
body.tema-novo .filter-bar a { font-family: var(--f-titulo); letter-spacing: .2em; font-size: 12px; }
body.tema-novo .filter-bar a.active, body.tema-novo .filter-bar a:hover { color: var(--ice); }

/* Botoes */
body.tema-novo .rf-button {
  height: 52px; min-width: 0; padding: 0 22px; gap: 10px;
  font-family: var(--f-corpo); font-weight: 700; letter-spacing: .28em; text-transform: uppercase; font-size: 13px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  background: rgba(46,168,255,.08); box-shadow: inset 0 0 0 1px var(--line);
}
body.tema-novo .rf-button.primary { background: linear-gradient(90deg, var(--ice), var(--arc)); color: #031018; box-shadow: 0 0 22px rgba(46,168,255,.45); }
body.tema-novo .rf-button.primary strong { color: #031018; }
body.tema-novo .rf-button:hover { filter: brightness(1.12); transform: translateY(-2px); }
body.tema-novo .rf-mark { display: none; }

/* Formularios */
body.tema-novo input, body.tema-novo select, body.tema-novo textarea {
  background: rgba(4,7,13,.7) !important; border: 1px solid rgba(255,255,255,.12) !important; color: var(--chrome) !important;
  font-family: var(--f-corpo); border-radius: 0 !important;
}
body.tema-novo input:focus, body.tema-novo select:focus, body.tema-novo textarea:focus { border-color: var(--ice) !important; box-shadow: 0 0 14px rgba(127,216,255,.3); }
body.tema-novo label { color: var(--steel); letter-spacing: .08em; }

/* Alertas */
body.tema-novo .alert { border-radius: 0; border-left: 3px solid var(--ice); background: rgba(46,168,255,.12); }
body.tema-novo .alert-error { border-color: #ff5a5a; background: rgba(255,90,90,.12); }
body.tema-novo .alert-success { border-color: #46f28e; background: rgba(70,242,142,.12); }

/* Admin: abas */
body.tema-novo .admin-tabs a { font-family: var(--f-corpo); letter-spacing: .12em; }
body.tema-novo .admin-tabs a.active { color: var(--ice); }

/* Downloads: card inteiro clicavel */
body.tema-novo .download-item { align-items: center; }
body.tema-novo .download-icon { color: var(--ice); transition: transform .3s, filter .3s; }
body.tema-novo .download-card {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 22px;
  color: inherit; text-decoration: none; cursor: pointer; overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s, background .25s;
}
body.tema-novo .download-card:hover {
  transform: translateY(-4px); border-color: var(--line); background: rgba(46,168,255,.12);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 30px rgba(46,168,255,.28);
}
body.tema-novo .download-card:hover .download-icon { transform: translateY(4px) scale(1.12); filter: drop-shadow(0 0 12px rgba(127,216,255,.8)); }
body.tema-novo .download-card:hover .rf-button { filter: brightness(1.15); transform: translateX(4px); }
body.tema-novo .download-card:hover .rf-button .icon { animation: seta-pulsa .8s ease-in-out infinite; }
body.tema-novo .download-card:active { transform: translateY(-1px) scale(.995); }
/* varredura de luz atravessando o card */
body.tema-novo .download-varredura {
  position: absolute; top: -30%; bottom: -30%; left: -40%; width: 30%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.14), transparent);
  transform: skewX(-18deg) translateX(-140%); transition: transform .7s ease;
}
body.tema-novo .download-card:hover .download-varredura { transform: skewX(-18deg) translateX(520%); }
@keyframes seta-pulsa { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

/* ---------- Animacao de entrada dos paineis/cards (todas as paginas) ---------- */
@keyframes rf-materializar {
  0%   { opacity: 0; transform: translateY(18px) scale(.985); filter: brightness(1.6) saturate(.6); }
  60%  { opacity: 1; filter: brightness(1.15); }
  100% { opacity: 1; transform: none; filter: none; }
}
body.tema-novo .hub-btn, body.tema-novo .panel, body.tema-novo .cartao, body.tema-novo .bloco,
body.tema-novo .page-head, body.tema-novo .filter-bar, body.tema-novo .section-head, body.tema-novo .race-rank-card, body.tema-novo .aviso {
  animation: rf-materializar .55s cubic-bezier(.2,.8,.2,1) both;
}
body.tema-novo .hub-btn:nth-child(1) { animation-delay: .05s; }
body.tema-novo .hub-btn:nth-child(2) { animation-delay: .10s; }
body.tema-novo .hub-btn:nth-child(3) { animation-delay: .15s; }
body.tema-novo .hub-btn:nth-child(4) { animation-delay: .20s; }
body.tema-novo .hub-btn:nth-child(5) { animation-delay: .25s; }
body.tema-novo .hub-btn:nth-child(6) { animation-delay: .30s; }
body.tema-novo .hub-btn:nth-child(7) { animation-delay: .35s; }
body.tema-novo .page-head, body.tema-novo .filter-bar { animation-delay: .35s; }
body.tema-novo .main-content > .panel:nth-of-type(1), body.tema-novo .main-content > *:nth-child(2) { animation-delay: .45s; }
body.tema-novo .main-content > *:nth-child(3) { animation-delay: .55s; }
body.tema-novo .main-content > *:nth-child(4) { animation-delay: .65s; }
body.tema-novo .main-content > *:nth-child(5) { animation-delay: .75s; }
body.tema-novo .main-content > *:nth-child(n+6) { animation-delay: .85s; }
body.tema-novo .download-list .download-card:nth-child(2) { animation-delay: .6s; }
body.tema-novo .content-grid > .panel:nth-child(2), body.tema-novo .duas > .bloco:nth-child(2) { animation-delay: .8s; }
/* dashboard (.conteudo) */
body.tema-novo .conteudo > *:nth-child(1) { animation-delay: .45s; }
body.tema-novo .conteudo > *:nth-child(2) { animation-delay: .6s; }
body.tema-novo .conteudo > *:nth-child(3) { animation-delay: .75s; }
body.tema-novo .conteudo > *:nth-child(n+4) { animation-delay: .9s; }
body.tema-novo .cartoes > .cartao:nth-child(1) { animation-delay: .45s; }
body.tema-novo .cartoes > .cartao:nth-child(2) { animation-delay: .55s; }
body.tema-novo .cartoes > .cartao:nth-child(3) { animation-delay: .65s; }
body.tema-novo .cartoes, body.tema-novo .duas { animation: none; }
body.tema-novo .race-rank-card:nth-child(1) { animation-delay: .7s; }
body.tema-novo .race-rank-card:nth-child(2) { animation-delay: .8s; }
body.tema-novo .race-rank-card:nth-child(3) { animation-delay: .9s; }
/* linha de "scan" que desce quando a pagina carrega */
body.tema-novo::before {
  content: "" !important; display: block !important; position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 999;
  background: linear-gradient(90deg, transparent, var(--ice), transparent); pointer-events: none;
  animation: rf-scan 1s ease-out .05s both;
}
@keyframes rf-scan { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(100vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body.tema-novo *, body.tema-novo::before { animation: none !important; }
}

@media (max-width: 800px) {
  body.tema-novo .site-shell { width: calc(100% - 32px); }
}
