/* DANTE (85) – Sötét Apokalipszis kódex-panel (js/ui/danteCodexUI.js).
   A Frank-kódex elrendezését követi. Paletta: --dc-1..5 a skin palettája,
   --dc-glow / --dc-blood / --dc-wind / --dc-accent / --dc-deep / --dc-steel
   a téma kiemelő színei.
   Alap: éjkék penge, vörös démoni aura, fekete szél;
   Űrhajós: plazmapenge, rakéták, csillagpor. */
.codex-dante-show {
    --dc-hi: color-mix(in srgb, var(--dc-glow) 60%, #fff);
    --dc-ink: #f8f5fb;
    --dc-soft: rgba(232, 228, 240, .84);
    --dc-line: color-mix(in srgb, var(--dc-blood) 50%, transparent);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 22px 0 30px;
    padding: 24px;
    border: 1px solid var(--dc-line);
    outline: 1px solid color-mix(in srgb, var(--dc-glow) 40%, transparent);
    outline-offset: -6px;
    border-radius: 4px;
    background:
        radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--dc-glow) 18%, transparent), transparent 44%),
        radial-gradient(circle at 92% 100%, color-mix(in srgb, var(--dc-blood) 26%, transparent), transparent 48%),
        linear-gradient(150deg, color-mix(in srgb, var(--dc-steel) 55%, #05030a), #06040a 58%, color-mix(in srgb, var(--dc-deep) 60%, #000));
    box-shadow: inset 0 0 42px color-mix(in srgb, var(--dc-blood) 16%, transparent), 0 18px 38px #0007;
    color: var(--dc-ink);
}
/* Téma-textúra: alap vérfoltok és repedések, Űrhajós csillagmező. */
.codex-dante-show::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .26;
    background:
        radial-gradient(ellipse 60px 26px at 88% 0, var(--dc-blood), transparent 70%),
        radial-gradient(ellipse 80px 30px at 12% 100%, var(--dc-blood), transparent 70%),
        repeating-linear-gradient(118deg, transparent 0 26px, #0000004d 26px 28px);
}
.codex-dante-show[data-dc-motif="space"]::before {
    opacity: .34;
    background:
        radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent 60%),
        radial-gradient(1.5px 1.5px at 58% 68%, var(--dc-4), transparent 60%),
        radial-gradient(1px 1px at 84% 36%, var(--dc-1), transparent 60%),
        radial-gradient(ellipse 120px 40px at 90% 0, color-mix(in srgb, var(--dc-2) 45%, transparent), transparent 70%);
    background-size: 160px 120px, 160px 120px, 160px 120px, 100% 100%;
}
.codex-dante-show > *:not(.codex-dante-show__motif) { position: relative; z-index: 1; }
.codex-dante-show__motif { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.codex-dante-show__motif > i {
    position: absolute;
    left: var(--dc-x);
    top: var(--dc-y);
    width: 20px;
    height: 20px;
    opacity: .36;
    animation: dcDrift 8s ease-in-out infinite alternate;
    animation-delay: calc(var(--dc-i) * -.9s);
}
.codex-dante-show__motif svg { display: block; width: 100%; height: 100%; overflow: visible; fill: var(--dc-blood); filter: drop-shadow(0 0 4px var(--dc-blood)); }
.codex-dante-show__motif .is-line { fill: none; stroke: var(--dc-blood); stroke-width: 1.4; stroke-linecap: round; }
.codex-dante-show__motif .is-wisp .is-line { stroke: color-mix(in srgb, var(--dc-wind) 70%, #4a2250); stroke-width: 2.2; }
.codex-dante-show__motif .is-wisp { width: 30px; animation-name: dcWisp; animation-duration: 6s; }
.codex-dante-show__motif .is-rune .is-line { stroke: var(--dc-glow); }
.codex-dante-show__motif .is-horn svg { fill: color-mix(in srgb, var(--dc-deep) 70%, #000); stroke: var(--dc-blood); stroke-width: .8; }
.codex-dante-show__motif .is-rocket { width: 13px; height: 22px; animation-name: dcRocket; animation-duration: 7s; }
.codex-dante-show__motif .is-rocket .is-body { fill: #f3f6ff; }
.codex-dante-show__motif .is-rocket .is-fin { fill: var(--dc-2); }
.codex-dante-show__motif .is-rocket .is-window { fill: var(--dc-1); }
.codex-dante-show__motif .is-rocket .is-flame { fill: var(--dc-4); filter: drop-shadow(0 0 3px var(--dc-5)); }
.codex-dante-show__motif .is-star svg { fill: var(--dc-4); filter: drop-shadow(0 0 3px var(--dc-4)); }
.codex-dante-show__motif .is-planet { width: 28px; }
.codex-dante-show__motif .is-planet svg { fill: var(--dc-2); }
.codex-dante-show__motif .is-planet .is-line { stroke: var(--dc-1); }

.codex-dante-show > header { display: flex; align-items: center; gap: 18px; }
.codex-dante-show__emblem { position: relative; display: grid; place-items: center; flex: 0 0 110px; width: 110px; height: 110px; }
.codex-dante-show__emblem > i {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--dc-blood) 55%, transparent), #0009 58%, transparent 72%);
    animation: dcPulse 2.2s ease-in-out infinite;
}
.codex-dante-show__emblem > i.is-wind {
    inset: -2px;
    background: conic-gradient(from 0deg, transparent 0 12%, color-mix(in srgb, var(--dc-wind) 90%, #2a1330) 18%, transparent 30% 55%, color-mix(in srgb, var(--dc-wind) 90%, #2a1330) 62%, transparent 74%);
    -webkit-mask: radial-gradient(circle, transparent 52%, #000 58%, #000 70%, transparent 76%);
    mask: radial-gradient(circle, transparent 52%, #000 58%, #000 70%, transparent 76%);
    animation: dcSpin 2.6s linear infinite;
}
.codex-dante-show__emblem > img { position: relative; width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 0 6px var(--dc-blood)) drop-shadow(0 0 14px color-mix(in srgb, var(--dc-blood) 70%, transparent)); animation: dcBob 3.2s ease-in-out infinite; }
.codex-dante-show > header small { color: var(--dc-hi); font: 800 .58rem/1 Montserrat, sans-serif; letter-spacing: .18em; }
.codex-dante-show > header h3 { margin: 7px 0 5px; color: var(--dc-ink); font: 400 1.65rem/1.1 AOW, serif; text-shadow: 0 0 16px color-mix(in srgb, var(--dc-blood) 70%, transparent); }
.codex-dante-show > header p { margin: 0; color: var(--dc-soft); font-size: .74rem; line-height: 1.45; }

.codex-dante-show__stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.codex-dante-show__stats > span { display: grid; gap: 4px; justify-items: center; padding: 9px 6px; border: 1px solid color-mix(in srgb, var(--dc-blood) 42%, transparent); border-radius: 999px; background: linear-gradient(180deg, color-mix(in srgb, var(--dc-deep) 50%, transparent), #0007); }
.codex-dante-show__stats b { color: var(--dc-hi); font: 800 1rem/1 Montserrat, sans-serif; white-space: nowrap; }
.codex-dante-show__stats small { color: var(--dc-soft); font-size: .56rem; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.codex-dante-show > h4 { margin: 20px 0 10px; color: var(--dc-hi); font: 800 .66rem/1 Montserrat, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.codex-dante-show__note { margin: 8px 0 0; color: var(--dc-soft); font-size: .66rem; line-height: 1.4; }

/* A kard két állapota: alvó (halvány) és felébredt (vörös-fekete izzás). */
.codex-dante-show__states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.codex-dante-show__states article { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid color-mix(in srgb, var(--dc-3) 35%, transparent); border-radius: 12px; background: #0006; }
.codex-dante-show__states img { width: 72px; height: 72px; object-fit: contain; }
.codex-dante-show__states .is-sleeping img { filter: brightness(.7) saturate(.8) drop-shadow(0 0 4px color-mix(in srgb, var(--dc-blood) 45%, transparent)); }
.codex-dante-show__states .is-awake { border-color: var(--dc-blood); background: radial-gradient(circle at 0 50%, color-mix(in srgb, var(--dc-blood) 26%, transparent), transparent 62%), #000a; box-shadow: 0 0 16px color-mix(in srgb, var(--dc-blood) 40%, transparent); }
.codex-dante-show__states .is-awake img { filter: brightness(1.1) drop-shadow(0 0 6px var(--dc-blood)) drop-shadow(0 0 3px #000); animation: dcBob 3.2s ease-in-out infinite; }
.codex-dante-show__states small, .codex-dante-show__upgrades small, .codex-dante-show__lust small { color: var(--dc-hi); font: 800 .56rem/1 Montserrat, sans-serif; letter-spacing: .12em; }
.codex-dante-show__states strong { display: block; margin: 4px 0; color: var(--dc-ink); font: 800 .82rem/1.15 Montserrat, sans-serif; }
.codex-dante-show__states .is-awake strong { text-shadow: 0 0 8px var(--dc-blood); }
.codex-dante-show__states p { margin: 0; color: var(--dc-soft); font-size: .64rem; line-height: 1.38; }

/* Felébredt képességek: alap -> felébredt összehasonlítás. */
.codex-dante-show__upgrades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.codex-dante-show__upgrades article { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border: 1px solid color-mix(in srgb, var(--dc-blood) 30%, transparent); border-radius: 12px; background: #0005; }
.codex-dante-show__upgrades img { width: 50px; height: 50px; object-fit: cover; border: 1px solid var(--dc-blood); border-radius: 9px; }
.codex-dante-show__upgrades strong { display: block; margin-bottom: 6px; color: var(--dc-ink); font: 800 .8rem/1.15 Montserrat, sans-serif; }
.codex-dante-show__upgrades span { display: grid; gap: 3px; padding: 5px 8px; border-left: 2px solid color-mix(in srgb, var(--dc-3) 50%, transparent); color: var(--dc-soft); font-size: .64rem; line-height: 1.35; }
.codex-dante-show__upgrades span.is-awake { margin-top: 4px; border-left-color: var(--dc-blood); background: color-mix(in srgb, var(--dc-deep) 40%, transparent); color: var(--dc-ink); }

.codex-dante-show__lust { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--dc-blood); border-radius: 12px; background: radial-gradient(circle at 0 50%, color-mix(in srgb, var(--dc-blood) 30%, transparent), transparent 60%), #000a; box-shadow: 0 0 18px color-mix(in srgb, var(--dc-blood) 35%, transparent); }
.codex-dante-show__lust img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 0 8px var(--dc-blood)); animation: dcPulse 1.6s ease-in-out infinite; }
.codex-dante-show__lust strong { display: block; margin-bottom: 4px; color: var(--dc-ink); font: 800 .9rem/1.15 Montserrat, sans-serif; }
.codex-dante-show__lust p { margin: 0; color: var(--dc-soft); font-size: .68rem; line-height: 1.4; }

.codex-dante-show__flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.codex-dante-show__flow > span { display: flex; flex: 1 1 170px; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--dc-blood) 34%, transparent); border-radius: 12px; background: radial-gradient(circle at 0 50%, color-mix(in srgb, var(--dc-blood) 18%, transparent), transparent 62%), #0005; }
.codex-dante-show__flow > span > img { flex: 0 0 38px; width: 38px; height: 38px; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--dc-blood) 60%, transparent)); }
.codex-dante-show__flow b { display: block; color: var(--dc-ink); font: 800 .74rem/1.15 Montserrat, sans-serif; }
.codex-dante-show__flow small { color: var(--dc-soft); font-size: .62rem; }
.codex-dante-show__flow > i { color: var(--dc-hi); font: 900 1rem/1 Montserrat, sans-serif; font-style: normal; }

.codex-dante-show__effects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.codex-dante-show__effects article { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--dc-blood) 32%, transparent); border-radius: 12px; background: radial-gradient(circle at 0 50%, color-mix(in srgb, var(--dc-blood) 16%, transparent), transparent 60%), #0005; }
.codex-dante-show__effects article:nth-child(2n) { border-color: color-mix(in srgb, var(--dc-glow) 45%, transparent); }
.codex-dante-show__effects img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--dc-blood) 70%, transparent)); animation: dcBob 3.2s ease-in-out infinite; }
.codex-dante-show__effects strong { display: block; margin-bottom: 4px; color: var(--dc-ink); font: 800 .8rem/1.15 Montserrat, sans-serif; }
.codex-dante-show__effects p { margin: 0; color: var(--dc-soft); font-size: .66rem; line-height: 1.35; }
.codex-dante-show .ability-inline-icon { display: inline-block; width: 1.25em; height: 1.25em; margin: 0 .12em; vertical-align: -.24em; object-fit: contain; animation: none; }
/* A kódex képességkártyáinak Dante-kulcsszó ikonjai és részletező sorai. */
.ability-inline-icon.is-dante-keyword { width: 1.35em; height: 1.35em; margin: -.3em .14em -.28em 0; object-fit: contain; filter: drop-shadow(0 0 3px #d1122faa); }
.ability-inline-icon.is-dante-keyword[data-dante-theme="urhajos"] { filter: drop-shadow(0 0 3px #44DEFFaa); }
.ability-progression.is-dante-details .ability-progression-step.is-wide-label { grid-template-columns: minmax(0, 1fr); gap: 5px; }

@keyframes dcBob { 50% { transform: translateY(-4px); } }
@keyframes dcPulse { 50% { opacity: .6; transform: scale(.92); } }
@keyframes dcSpin { to { transform: rotate(360deg); } }
@keyframes dcDrift { 0% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(12px, -8px) rotate(6deg); } 100% { transform: translate(-6px, -16px) rotate(-3deg); } }
@keyframes dcWisp { 0% { transform: translateX(-10px); opacity: 0; } 30% { opacity: .5; } 100% { transform: translateX(30px); opacity: 0; } }
@keyframes dcRocket { 0% { transform: translate(0, 12px) rotate(20deg); opacity: 0; } 25% { opacity: .6; } 100% { transform: translate(18px, -26px) rotate(20deg); opacity: 0; } }
@media (max-width: 900px) { .codex-dante-show__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .codex-dante-show__upgrades, .codex-dante-show__states { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .codex-dante-show { padding: 18px 16px; } .codex-dante-show > header { flex-direction: column; align-items: flex-start; } .codex-dante-show__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .codex-dante-show__effects { grid-template-columns: 1fr; } .codex-dante-show__flow > i { display: none; } }
.codex-dante-show[data-dc-motif="ice"] { background: radial-gradient(ellipse at 85% 0, #0c80ed44, transparent 45%), linear-gradient(135deg, #080f2b, #001361 70%, #10182b); border-color: #bec7ff77; }
.codex-dante-show[data-dc-motif="ice"] .codex-dante-show__motif .is-snowflake { width: 30px; height: 30px; }
.codex-dante-show[data-dc-motif="ice"] .codex-dante-show__motif .is-crystal { width: 20px; height: 34px; }
.codex-dante-show[data-dc-motif="ice"] .codex-dante-show__motif svg { filter: drop-shadow(0 0 5px #00cee0); }
.codex-dante-show[data-dc-motif="ice"] .codex-dante-show__motif .is-snowflake path { fill: none; stroke: #e7f5ff; stroke-width: 2; }
.codex-dante-show[data-dc-motif="ice"] .codex-dante-show__motif .is-crystal path:first-child { fill: #0c80ed; stroke: #bec7ff; stroke-width: 1; }
@media (prefers-reduced-motion: reduce) { .codex-dante-show__motif { display: none; } .codex-dante-show *, .codex-dante-show *::before { animation: none !important; } }

.codex-dante-show[data-dc-motif="rend"] { background: radial-gradient(ellipse at 85% 0, #B41D2638, transparent 44%), linear-gradient(135deg, #1C1315, #2D0000 65%, #1C1315); border-color: #B1695E88; }
.codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif .is-eclipse { width: 32px; height: 32px; }
.codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif .is-talisman, .codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif .is-oathchain { width: 20px; height: 34px; }
.codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif svg { filter: drop-shadow(0 0 5px #B41D26); }
.codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif .is-line, .codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif .is-line * { fill: none; stroke: #B1695E; stroke-width: 1.7; }
.codex-dante-show[data-dc-motif="rend"] .codex-dante-show__motif .is-oathchain .is-line * { stroke: #C8C3CC; }
