/* ============================================================================
   SISTEMA DE SOBREVIVÊNCIA (FOME, SEDE E TEMPO)
============================================================================ */

/* Animação de Alerta Laranja (Fome/Sede) */
@keyframes pulseWarningOrange {
    0%   { box-shadow: inset 0 0 40px rgba(255, 152, 0, 0.2); background-color: rgba(255, 152, 0, 0.05); }
    50%  { box-shadow: inset 0 0 120px rgba(255, 152, 0, 0.6); background-color: rgba(255, 152, 0, 0.15); }
    100% { box-shadow: inset 0 0 40px rgba(255, 152, 0, 0.2); background-color: rgba(255, 152, 0, 0.05); }
}

#app-ficha.danger-survival {
    animation: pulseWarningOrange 1.5s infinite ease-in-out !important;
    border: 2px solid #ff9800 !important;
}

/* ============================================================================
   ESTILIZAÇÃO AVANÇADA: BIFE GRELHADO E ÁGUA BORBULHANTE
============================================================================ */

/* 1. BARRA DE FOME (Bife Grelhado) */
.fome-fill {
    position: relative;
    background-color: #5c1a06; /* Cor da carne suculenta e assada */
    background-image:
        /* Marcas da Grelha Obíquas */
        repeating-linear-gradient(-45deg, rgba(0,0,0,0.6) 0px, rgba(0,0,0,0.6) 4px, transparent 4px, transparent 18px),
        /* Textura da Carne/Gordura (Marbling) */
        radial-gradient(circle at 50% 50%, rgba(255, 200, 150, 0.15) 1px, transparent 2px),
        radial-gradient(circle at 20% 80%, rgba(255, 200, 150, 0.15) 2px, transparent 3px);
    background-size: 100% 100%, 12px 12px, 18px 18px;
    box-shadow: inset 0 2px 4px rgba(255, 100, 100, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.6);
    border-radius: 4px 0 0 4px;
}

/* O Efeito de Mordidas (Dentes arrancando a borda direita) */
.fome-fill::after {
    content: '';
    position: absolute;
    top: 0; right: -1px; bottom: 0;
    width: 12px;
    /* Desenha círculos com a exata cor do fundo vazio da barra (#1a1a1a) para simular que a carne foi arrancada */
    background-image: radial-gradient(circle at 12px center, #1a1a1a 5px, transparent 6px);
    background-size: 12px 14px; /* Altura de cada mordida */
    background-repeat: repeat-y;
    z-index: 2;
}


/* 2. BARRA DE SEDE (Água com Bolhas e Movimento) */
.sede-fill {
    position: relative;
    background: linear-gradient(180deg, #4fc3f7 0%, #0277bd 50%, #01579b 100%);
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.4), inset 0 -2px 5px rgba(0,0,0,0.6);
    border-radius: 4px;
    overflow: hidden; /* Mantém a água dentro do recipiente */
}

/* Animação das Bolhas subindo do fundo */
.sede-fill::before {
    content: '';
    position: absolute;
    bottom: -20px; left: 0; right: 0; top: 0;
    background-image:
        radial-gradient(circle at 20% 100%, rgba(255,255,255,0.6) 1.5px, transparent 2.5px),
        radial-gradient(circle at 50% 100%, rgba(255,255,255,0.5) 2px, transparent 3px),
        radial-gradient(circle at 80% 100%, rgba(255,255,255,0.4) 1px, transparent 2px),
        radial-gradient(circle at 35% 100%, rgba(255,255,255,0.7) 1.5px, transparent 2.5px);
    background-size: 30px 30px, 45px 45px, 25px 25px, 50px 50px;
    animation: bubbleRise 2.5s infinite linear;
    z-index: 1;
}

/* Brilho da correnteza da água se movendo */
.sede-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: waterFlow 3s infinite linear;
    z-index: 2;
}

/* Motores das Animações Naturais */
@keyframes bubbleRise {
    0% { background-position: 0 20px, 0 30px, 0 15px, 0 40px; }
    100% { background-position: 0 -40px, 0 -30px, 0 -20px, 0 -50px; }
}

@keyframes waterFlow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Overlay no Retrato */
#vfx-survival-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 10, 0, 0.7);
    z-index: 90; display: flex; flex-direction: column; justify-content: center; align-items: center;
    pointer-events: none; opacity: 0; transition: opacity 0.5s;
}
#vfx-survival-overlay.survival-active { opacity: 1; }

.surv-warning-text {
    color: #ffb74d; font-weight: bold; font-size: 24px; text-transform: uppercase;
    text-shadow: 0 0 10px #000, 0 0 20px #ff9800; text-align: center;
    background: rgba(0,0,0,0.6); padding: 5px 10px; border-radius: 4px; border: 1px solid #ff9800;
    margin: 5px 0; transform: rotate(-5deg);
}

/* Badge de Dia */
.dia-badge {
    background: #111; border: 1px solid #ffca28; color: #ffca28;
    padding: 4px 10px; border-radius: 4px; font-weight: bold; font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 5px;
}