/* MuAnimes: tema "Anime" (3 variantes: Cosmos, Saiyajin, Ninja). Artes originais geradas no Canva.
   Ativo quando o tema do site é anime-*; o visitante troca a variante no seletor flutuante
   (fica salvo no navegador). Sem bibliotecas nem fontes externas. Ver aplicar-marca.js 3h. */

body.theme-anime-cosmos {
  --art: url('/themes/anime/cosmos.jpg'); --art-m: url('/themes/anime/cosmos-mobile.jpg');
  --bg: #060a1c; --wrap: #070c22d9; --card: #0b1230f2; --card-2: #101a42; --text: #e7eaf8; --muted: #aab4d8;
  --accent: #f5c451; --accent-2: #8fb4ff; --border: #2c3b74; --title: #ffe29a; --nav: #060b20eb;
  --btn-a: #f9d878; --btn-b: #b8862b; --btn-text: #1b1303; --glow: #f5c45166; --glow-soft: #f5c45122;
  --bs-primary-rgb: 201,154,59;
}
body.theme-anime-saiyajin {
  --art: url('/themes/anime/saiyajin.jpg'); --art-m: url('/themes/anime/saiyajin-mobile.jpg');
  --bg: #0a0d1d; --wrap: #0a0f24d9; --card: #10162ef2; --card-2: #16204a; --text: #eff2ff; --muted: #b5bfe2;
  --accent: #ff9a2e; --accent-2: #43b9ff; --border: #2b3f72; --title: #ffd36b; --nav: #0a0f24eb;
  --btn-a: #ffb347; --btn-b: #e8590c; --btn-text: #1d0d00; --glow: #ff8a1f66; --glow-soft: #43b9ff22;
  --bs-primary-rgb: 232,89,12;
}
body.theme-anime-ninja {
  --art: url('/themes/anime/ninja.jpg'); --art-m: url('/themes/anime/ninja-mobile.jpg');
  --bg: #090405; --wrap: #0d0607db; --card: #14080af2; --card-2: #24090d; --text: #f4e7e7; --muted: #caaaac;
  --accent: #ff4040; --accent-2: #ff8a5c; --border: #4a1a20; --title: #ffd2cd; --nav: #0c0506ec;
  --btn-a: #ef4444; --btn-b: #7a0d12; --btn-text: #ffffff; --glow: #e5383b66; --glow-soft: #e5383b22;
  --bs-primary-rgb: 214,40,40;
}

/* Fundo: arte no topo, desbotando para a cor do tema. */
body[class*="theme-anime-"] {
  background: linear-gradient(180deg, transparent 0, transparent 380px, var(--bg) 1040px) no-repeat,
              var(--art) center top / max(1920px, 100%) auto no-repeat var(--bg);
  background-attachment: scroll;
  color: var(--text);
}
@media (max-width: 700px) {
  body[class*="theme-anime-"] {
    background: linear-gradient(180deg, transparent 0, transparent 260px, var(--bg) 660px) no-repeat,
                var(--art-m) center top / auto 680px no-repeat var(--bg);
  }
}
body[class*="theme-anime-"] .container { max-width: 1100px; }

/* Barra do topo e menu. */
body[class*="theme-anime-"] .top-navbar {
  background: var(--nav); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--glow-soft), 0 8px 24px #0007;
}
body[class*="theme-anime-"] .transparent-header {
  background: linear-gradient(180deg, #000a, #0003); border-bottom: 1px solid var(--border);
  margin-bottom: 0!important;
}
body[class*="theme-anime-"] .transparent-header .nav-link {
  position: relative; margin: 2px 6px; padding: 9px 26px!important;
  color: var(--text)!important; font: 800 13px/1.2 "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff14, #ffffff05);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background .2s, color .2s, transform .2s;
}
body[class*="theme-anime-"] .transparent-header .nav-link:is(:hover, :focus-visible, .active) {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); color: var(--btn-text)!important;
  transform: translateY(-1px);
}
body[class*="theme-anime-"] .top-navbar .nav-link:hover { color: var(--accent)!important; }
body[class*="theme-anime-"] .offcanvas { background: var(--card); color: var(--text); border-color: var(--border); }
body[class*="theme-anime-"] .offcanvas .nav-link { color: var(--text)!important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
body[class*="theme-anime-"] .offcanvas .btn-close { filter: invert(1); }
body[class*="theme-anime-"] .offcanvas-header { border-color: var(--border)!important; }
body[class*="theme-anime-"] .navbar-toggler { color: var(--text); filter: none; }
body[class*="theme-anime-"] .language-flag:is(:hover, :focus-visible, .selected) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Faixa da arte: na página inicial, título à esquerda e status do servidor embaixo. */
body[class*="theme-anime-"] > .home-showcase {
  position: relative; display: flex; align-items: flex-end; min-height: 200px; margin-top: 18px!important;
}
body[class*="theme-anime-"] > .home-showcase:has(> .row) { min-height: 440px; }
body[class*="theme-anime-"] .daedalus-hero { position: absolute; inset: 0; width: 100%; min-height: 0; overflow: visible; pointer-events: none; }
body[class*="theme-anime-"] .hero-character { display: none; }
body[class*="theme-anime-"] .home-showcase > .row { position: relative; z-index: 1; }
body[class*="theme-anime-"] .home-showcase .bg-dark {
  background: linear-gradient(135deg, #000b, #0007)!important; border: 1px solid var(--border);
  box-shadow: 0 0 0 1px #ffffff08 inset, 0 0 26px var(--glow-soft); backdrop-filter: blur(4px);
}
@media (min-width: 992px) { body[class*="theme-anime-"] .home-showcase > .row > .col-lg-4 { width: 390px; } }

.anime-hero { position: absolute; z-index: 1; left: 12px; top: 18px; max-width: 520px; }
.anime-hero-tagline > span { display: none; }
.theme-anime-cosmos .v-cosmos, .theme-anime-saiyajin .v-saiyajin, .theme-anime-ninja .v-ninja { display: inline; }
.anime-hero-kicker {
  display: inline-block; margin-bottom: 10px; padding: 4px 14px; font: 800 12px/1.4 "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--btn-text);
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.anime-hero-title {
  margin: 0; font: 900 clamp(38px, 6vw, 64px)/.95 Impact, "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: .02em; text-transform: uppercase; color: #fff;
  text-shadow: 0 0 2px #000, 0 3px 0 var(--btn-b), 0 0 28px var(--glow);
}
.anime-hero-title span { color: var(--accent); }
.anime-hero-tagline { margin: 10px 0 16px; color: var(--text); font-weight: 600; text-shadow: 0 1px 3px #000; max-width: 420px; }
.anime-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.anime-btn {
  display: inline-block; padding: 11px 26px; font: 800 14px/1.2 "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--btn-text)!important;
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: filter .2s, transform .2s;
}
.anime-btn:is(:hover, :focus-visible) { filter: brightness(1.15) saturate(1.1); transform: translateY(-2px); }
.anime-btn.ghost { background: #000a; color: var(--text)!important; box-shadow: inset 0 0 0 2px var(--accent); }
@media (max-width: 700px) {
  body[class*="theme-anime-"] > .home-showcase:has(> .row) { min-height: 560px; }
  body[class*="theme-anime-"] > .home-showcase { min-height: 150px; }
  .anime-hero { left: 0; right: 0; top: 4px; padding: 10px 12px 14px; border-radius: 12px;
    background: linear-gradient(180deg, #000000b8, #00000080 75%, #00000000); }
  .anime-hero-tagline { font-size: 15px; }
  body[class*="theme-anime-"] h2 { font-size: 19px; letter-spacing: .06em; }
}

/* Conteúdo: caixas escuras com borda de energia. */
body[class*="theme-anime-"] > main { position: relative; z-index: 1; }
body[class*="theme-anime-"] main > .container > :is(.bg-light, .bg-white) {
  background: var(--wrap)!important; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 0 0 1px #ffffff08 inset, 0 24px 60px #000b, 0 0 40px var(--glow-soft)!important;
}
body[class*="theme-anime-"] :is(.bg-white, .bg-light, .card, .card-sub) {
  background: var(--card)!important; color: var(--text)!important; border-color: var(--border)!important;
}
body[class*="theme-anime-"] main .bg-white { border-radius: 12px; }
body[class*="theme-anime-"] :is(.border, .border-bottom, .border-top) { border-color: var(--border)!important; }
body[class*="theme-anime-"] :is(.text-dark, .text-light, .text-body) { color: var(--text)!important; }
body[class*="theme-anime-"] .text-muted { color: var(--muted)!important; }
body[class*="theme-anime-"] :is(a.text-primary, .text-decoration-none, main a:not(.btn):not(.anime-btn)) { color: var(--accent)!important; }
body[class*="theme-anime-"] :is(a.text-primary, .text-decoration-none):hover { color: var(--title)!important; }

body[class*="theme-anime-"] h2 {
  position: relative; overflow: hidden; padding: 14px 18px; color: var(--title)!important;
  font: 900 24px/1.2 "Trebuchet MS", "Segoe UI", system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(100deg, var(--glow), transparent 70%), var(--card-2);
  border-left: 4px solid var(--accent); border-bottom: 1px solid var(--border); border-radius: 8px;
  text-shadow: 0 0 14px var(--glow);
}
body[class*="theme-anime-"] h2::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-110%);
  background: linear-gradient(100deg, transparent 30%, #ffffff26 50%, transparent 70%);
  animation: anime-shine 7s ease-in-out 1.5s infinite;
}
@keyframes anime-shine { 0%, 70% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }

body[class*="theme-anime-"] .news-item {
  background: #ffffff07!important; border-color: var(--border)!important;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
body[class*="theme-anime-"] .news-item:hover { border-color: var(--accent)!important; box-shadow: 0 0 22px var(--glow-soft), inset 0 0 0 1px var(--glow-soft)!important; transform: translateY(-2px); }

body[class*="theme-anime-"] :is(.badge.bg-primary, .badge.text-bg-primary, .text-bg-primary) {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b))!important; color: var(--btn-text)!important;
}
body[class*="theme-anime-"] .btn-primary {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); border: 0; color: var(--btn-text);
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
body[class*="theme-anime-"] .btn-primary:is(:hover, :focus-visible) { filter: brightness(1.12); color: var(--btn-text); }
body[class*="theme-anime-"] :is(.btn-outline-primary, .btn-outline-dark, .btn-outline-secondary) { color: var(--accent); border-color: var(--border); }
body[class*="theme-anime-"] :is(.btn-outline-primary, .btn-outline-dark, .btn-outline-secondary):hover { background: var(--accent); border-color: var(--accent); color: var(--btn-text); }
body[class*="theme-anime-"] :is(input, select, textarea, .form-control, .form-select) {
  background-color: #0000004d; color: var(--text); border-color: var(--border);
}
body[class*="theme-anime-"] :is(input, select, textarea, .form-control, .form-select):focus {
  background-color: #00000066; color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 .2rem var(--glow-soft);
}
body[class*="theme-anime-"] input::placeholder { color: var(--muted); opacity: 1; }
body[class*="theme-anime-"] .table {
  --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border);
  --bs-table-striped-color: var(--text); --bs-table-striped-bg: #ffffff08;
  --bs-table-hover-color: var(--title); --bs-table-hover-bg: var(--glow-soft);
}
body[class*="theme-anime-"] .table :is(td, th) { color: var(--text)!important; }
body[class*="theme-anime-"] .table thead th { color: var(--title)!important; text-transform: uppercase; letter-spacing: .06em; }
body[class*="theme-anime-"] footer { background: var(--bg)!important; color: var(--muted)!important; border-top: 1px solid var(--border); }

/* Efeitos de fundo (camada fixa, atrás do conteúdo, não recebe cliques). */
.anime-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.anime-fx i { position: absolute; display: block; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0; }

/* Cosmos: estrelas piscando e uma estrela cadente. */
.theme-anime-cosmos .anime-fx i { background: radial-gradient(circle, #fff 0, #ffe7a3 40%, transparent 70%); animation: anime-twinkle var(--d) ease-in-out var(--t) infinite; }
.theme-anime-cosmos .anime-fx::before {
  content: ""; position: absolute; top: 12%; left: 70%; width: 160px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #fff, #ffe29a88, transparent); transform: rotate(-25deg); opacity: 0;
  animation: anime-meteor 11s ease-in 3s infinite;
}
@keyframes anime-twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: .95; transform: scale(1.2); } }
@keyframes anime-meteor {
  0% { opacity: 0; transform: rotate(-25deg) translateX(0); }
  3% { opacity: 1; }
  10%, 100% { opacity: 0; transform: rotate(-25deg) translateX(-620px); }
}

/* Saiyajin: faíscas de energia subindo e clarão de raio. */
.theme-anime-saiyajin .anime-fx i {
  top: auto; bottom: -12px; width: calc(var(--s) * .8); height: calc(var(--s) * 3); border-radius: 40%;
  background: linear-gradient(0deg, transparent, #ffb347, #fff3c4); box-shadow: 0 0 8px #ff8a1f;
  animation: anime-rise var(--d) linear var(--t) infinite;
}
.theme-anime-saiyajin .anime-fx i:nth-child(3n) { background: linear-gradient(0deg, transparent, #43b9ff, #e6f7ff); box-shadow: 0 0 8px #43b9ff; }
.theme-anime-saiyajin .anime-fx::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse 50% 40% at 78% 18%, #8fd3ff55, transparent 70%);
  animation: anime-flash 9s linear 2s infinite;
}
@keyframes anime-rise {
  0% { opacity: 0; transform: translateY(0); }
  10% { opacity: .9; }
  80% { opacity: .5; }
  100% { opacity: 0; transform: translateY(-105vh); }
}
@keyframes anime-flash { 0%, 90%, 93%, 96%, 100% { opacity: 0; } 91%, 95% { opacity: 1; } }

/* Ninja: pétalas e brasas caindo com fumaça vermelha embaixo. */
.theme-anime-ninja .anime-fx i {
  top: -16px; width: calc(var(--s) * 1.8); height: var(--s); border-radius: 60% 0 60% 0;
  background: linear-gradient(135deg, #ff6b6b, #8a0f16);
  animation: anime-fall var(--d) linear var(--t) infinite;
}
.theme-anime-ninja .anime-fx i:nth-child(4n) { width: var(--s); border-radius: 50%; background: #ff7a45; box-shadow: 0 0 6px #ff4d00; }
.theme-anime-ninja .anime-fx::before {
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -10vh; height: 45vh; opacity: .55;
  background: radial-gradient(ellipse 30% 45% at 20% 70%, #6b0f1499, transparent 70%),
              radial-gradient(ellipse 35% 50% at 70% 80%, #3a070b99, transparent 70%);
  filter: blur(18px); animation: anime-smoke 26s ease-in-out infinite alternate;
}
@keyframes anime-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  8% { opacity: .9; }
  100% { opacity: 0; transform: translate(-90px, 105vh) rotate(540deg); }
}
@keyframes anime-smoke { from { transform: translateX(-6%); } to { transform: translateX(6%); } }

/* Seletor de variante (canto da tela). */
.anime-switch {
  position: fixed; right: 14px; bottom: 14px; z-index: 1030; display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--nav); box-shadow: 0 6px 24px #000a, 0 0 16px var(--glow-soft);
  font: 700 11px/1 "Trebuchet MS", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.anime-switch button {
  width: 30px; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer;
  background: var(--dot); box-shadow: inset 0 0 0 2px #0008; transition: transform .15s, border-color .15s;
}
.anime-switch button:is(:hover, :focus-visible) { transform: scale(1.12); }
.anime-switch button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }
.anime-switch [data-v="cosmos"] { --dot: url('/themes/anime/cosmos-thumb.jpg') 70% center / cover; }
.anime-switch [data-v="saiyajin"] { --dot: url('/themes/anime/saiyajin-thumb.jpg') 62% center / cover; }
.anime-switch [data-v="ninja"] { --dot: url('/themes/anime/ninja-thumb.jpg') 68% center / cover; }
@media (max-width: 700px) { .anime-switch .anime-switch-label { display: none; } .anime-switch { padding: 5px; } }

/* Quem pede menos movimento no sistema não vê animações. */
@media (prefers-reduced-motion: reduce) {
  .anime-fx { display: none; }
  body[class*="theme-anime-"] h2::after { animation: none; display: none; }
  body[class*="theme-anime-"] *, .anime-btn { transition: none!important; }
}
