﻿/* ============================================================================
   ESTILOS E ANIMAÇÕES DE RARIDADE DOS INIMIGOS (FORÇA MÁXIMA)
============================================================================ */

/* Regra Global para conter as animações dentro das bordas */
[class^="npc-tier-"] {
    position: relative !important;
    overflow: hidden !important;
}

/* Comum */
.npc-tier-comum { border: 2px solid #71797E !important; background: #1a1a1a !important; }

/* Raro */
.npc-tier-raro { border: 2px solid #FFD700 !important; background: linear-gradient(135deg, #1a1a1a, #2b2b2b) !important; box-shadow: inset 0 0 10px rgba(192,192,192,0.3) !important; }

/* Épico */
@keyframes glowPurple {
    0% { box-shadow: 0 0 5px #8e24aa, inset 0 0 5px #8e24aa; }
    50% { box-shadow: 0 0 15px #ba68c8, inset 0 0 10px #ba68c8; }
    100% { box-shadow: 0 0 5px #8e24aa, inset 0 0 5px #8e24aa; }
}
.npc-tier-epico { border: 2px solid #E5E4E2 !important; background: linear-gradient(to bottom, #111, #2a0845) !important; animation: glowPurple 2s infinite alternate !important; }

/* Lendário (Degradê com Brilho Pulsante) */
@keyframes pulseGold {
    0% { box-shadow: 0 0 8px #FFD700, inset 0 0 10px #FFD700; filter: brightness(1); }
    50% { box-shadow: 0 0 25px #FFEA00, inset 0 0 20px #FFEA00; filter: brightness(1.2); }
    100% { box-shadow: 0 0 8px #FFD700, inset 0 0 10px #FFD700; filter: brightness(1); }
}
.npc-tier-lendario {
    border: 2px solid #FFD700 !important;
    background: linear-gradient(135deg, #3a2a00, #1a1300, #4a3600) !important;
    animation: pulseGold 2s infinite ease-in-out !important;
    color: #fff !important;
    text-shadow: 1px 1px 2px #000 !important;
}

/* Destroyer (Chamas Verticais Subindo e Descendo) */
@keyframes fireRise {
    0% { background-position: 50% 100%; }
    50% { background-position: 50% 0%; }
    100% { background-position: 50% 100%; }
}
.npc-tier-destroyer {
    border: 2px solid #f44336 !important;

    /* O SEGREDO: Usar background-image em vez de background para não travar a animação! */
    background-image: linear-gradient(0deg, #220000 0%, #8b0000 30%, #f44336 60%, #ff9800 100%) !important;
    background-color: #220000 !important;

    background-size: 100% 300% !important;
    animation: fireRise 2.5s infinite ease-in-out !important;
    color: #fff !important;
    text-shadow: 1px 1px 2px #000 !important;
}

/* Boss (Névoa Negra, Cinza e Branca) */
@keyframes mistFlow {
    0% { background-position: 0% 50%, 100% 50%, 0% 50%; }
    50% { background-position: 100% 50%, 0% 50%, 100% 50%; }
    100% { background-position: 0% 50%, 100% 50%, 0% 50%; }
}
.npc-tier-boss {
    border: 2px solid #fff !important;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(200,200,200,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(80,80,80,0.6) 0%, transparent 60%),
        linear-gradient(270deg, #000, #1a1a1a, #050505) !important;
    background-color: #000 !important;

    background-size: 200% 200%, 250% 250%, 100% 100% !important;
    animation: mistFlow 6s infinite alternate ease-in-out !important;
    box-shadow: inset 0 0 20px #000, 0 0 15px rgba(255,255,255,0.4) !important;
    color: #fff !important;
}
/* ============================================================================
   BASE NPC PANEL (migrado de npc.html <style>)
============================================================================ */
/* Só aplica na aba standalone npc.html (body.npc-panel-page) — NÃO no VTT principal */
body.npc-panel-page {
    background: #050505;
    color: #fff;
    font-family: 'Georgia', serif;
    padding: 10px;
    margin: 0;
}

.npc-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.npc-toolbar-btn {
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.npc-toolbar-btn--inimigo {
    flex: 2;
    background: #4caf50;
    box-shadow: 0 0 10px rgba(76,175,80,0.5);
}

.npc-toolbar-btn--sync {
    flex: 2;
    background: #2196f3;
    box-shadow: 0 0 10px rgba(33,150,243,0.5);
}

.npc-toolbar-btn--limpar {
    flex: 1;
    background: #9e9e9e;
    box-shadow: 0 0 10px rgba(158,158,158,0.5);
}

.npc-card {
    background: #111;
    border: 2px solid #5a3c22;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    transition: 0.3s;
}

.npc-input {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 6px;
    text-align: center;
    width: 45%;
    font-weight: bold;
}

.npc-attr {
    background: rgba(0,0,0,0.6);
    padding: 8px;
    border: 1px solid #333;
    border-radius: 4px;
    text-align: center;
    position: relative;
}

.npc-attr input {
    background: #000;
    border: 1px solid #555;
    color: #ffca28;
    font-weight: bold;
    border-radius: 3px;
    outline: none;
}

.btn-acao {
    background: #2196f3;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 5px;
}

.btn-dano {
    background: #8b0000;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    z-index: 10;
    font-weight: bold;
}

.raridade-select {
    width: 100%;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border: 1px solid #555;
    padding: 8px;
    font-weight: bold;
    margin-bottom: 15px;
    border-radius: 4px;
    outline: none;
}

.hab-box {
    background: rgba(0,0,0,0.8);
    border: 1px solid #00bcd4;
    border-left: 4px solid #00bcd4;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
}

.hab-box input,
.hab-box select,
.hab-box textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
}

.attr-roll-btn {
    width: 100%;
    background: linear-gradient(to bottom, #2196f3, #1565c0);
    border: 1px solid #1e88e5;
    color: white;
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.attr-roll-btn:hover {
    background: #42a5f5;
}
