/* Estilos CSS para o body e layout geral */
body {
    background-color: #1a1a1a; /* Fundo escuro */
    color: #00ff00; /* Verde brilhante padrão */
    font-family: 'Press Start 2P', Consolas, monospace; /* Fonte pixelada principal */
    margin: 0;
    padding: 0;
    display: flex; /* Para dividir a tela em console e painel direito */
    min-height: 100vh;
    overflow: hidden; /* Esconde a barra de rolagem do body */
    font-size: 16px; /* Tamanho da fonte para o visual pixelado */
    line-height: 1.5; /* Espaçamento entre linhas */
    
    /* Propriedades para tentar forçar renderização pixelada (mais eficaz com pixel fonts) */
    image-rendering: pixelated; 
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Console Container (lado esquerdo) */
.console-container {
    width: 50vw; /* Metade esquerda da largura da viewport */
    height: 100vh; /* Altura total da viewport */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background-color: #000000;
    filter: brightness(1.05) contrast(1.05); 
}

.console-output {
    flex-grow: 1;
    padding: 20px 30px;
    overflow-y: scroll;
    white-space: pre-wrap;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.7); 
    pointer-events: auto;
    text-transform: uppercase;
}

.console-input-area {
    display: flex;
    padding: 10px 30px;
    border-top: 2px solid #00ff00;
    align-items: center;
}

.console-input-prefix {
    color: #00ff00;
    margin-right: 5px;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.7);
    text-transform: uppercase;
}

.console-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Press Start 2P', Consolas, monospace;
    font-size: 16px;
    outline: none;
    caret-color: #00ff00;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.7);
    text-transform: uppercase;
}

.console-input::placeholder {
    color: rgba(0, 255, 0, 0.5);
    text-shadow: none;
}

/* Scrollbar Styling */
.console-output::-webkit-scrollbar { width: 8px; }
.console-output::-webkit-scrollbar-track { background: #1a1a1a; }
.console-output::-webkit-scrollbar-thumb { background-color: #00ff00; border-radius: 4px; border: 2px solid #1a1a1a; }
.console-output { scrollbar-color: #00ff00 #1a1a1a; scrollbar-width: thin; }

/* CRT Overlay */
.crt-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 50%);
    background-size: 100% 3px;
    animation: flicker 0.1s infinite alternate;
    opacity: 0.7;
}

@keyframes flicker { 0% { opacity: 0.7; } 100% { opacity: 0.8; } }

.highlight {
    background-color: #00ff00; color: #000000; text-shadow: none;
}

/* Cores de status para os textos do console (mantidas para o console) */
.status-saudavel { color: #00ff00; } /* Verde */
.status-arranhado { color: #ff0000; } /* Vermelho (mudado para refletir a nova preferência) */
.status-sangrando { color: #8B0000; } /* Vermelho Escuro (mudado) */
.status-fraturado { color: #4B0082; } /* Roxo Escuro (mudado) */
.status-apodrecendo { color: #8B4513; } /* Marrom */
.status-necrosado { color: #808080; } /* Cinza */
.status-arrancado { color: #a52a2a; text-decoration: line-through; } 
.status-queimado { color: #ffa500; } /* Laranja (novo) */
.status-ferida_profunda { color: #4a0000; } /* Preto avermelhado (novo) */

.status-infeccao { color: #008000; } /* Verde Escuro */
.status-virus { color: #8B0000; } /* Vermelho Escuro */
.status-curativo-sujo { color: #a0522d; } /* Marrom Avermelhado */
.status-curativo { color: #90EE90; } /* Verde Claro */


/* ======================================================= */
/* Right Panel Container */
/* ======================================================= */
.right-panel-container {
    width: 50vw; height: 100vh; background-color: #1a1a1a;
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: 20px;
}

.info-panel {
    width: 35vw; max-width: 450px; height: calc(100vh / 3);
    background-color: #000000; border: 2px solid #00ff00;
    display: flex; flex-direction: column; overflow: hidden;
    filter: brightness(1.05) contrast(1.05); position: relative;
}

/* Tab Bar Styling */
.tab-bar {
    display: flex; justify-content: flex-start; align-items: flex-end;
    border-bottom: 2px solid #00ff00; background-color: #000000;
    padding-left: 10px;
    flex-shrink: 0; /* Impede que a barra de abas encolha */
}

.tab-button {
    background-color: #000000; color: #00ff00;
    font-family: 'Press Start 2P', Consolas, monospace; font-size: 10px;
    border: 2px solid #00ff00; border-bottom: none;
    padding: 5px 10px; cursor: pointer; margin-right: 2px;
    text-transform: uppercase; text-shadow: 0 0 2px rgba(0, 255, 0, 0.7);
    outline: none;
}

.tab-button.active {
    background-color: #003300; border-bottom: 2px solid #003300;
    color: #00ffff;
}

.tab-content-container {
    flex-grow: 1; display: flex; flex-direction: column; overflow: hidden;
}

.panel-content {
    display: none; flex-grow: 1; overflow: hidden; /* Oculta por padrão */
}

.panel-content.active {
    display: flex; flex-direction: column; /* Mostra o conteúdo ativo */
}

.panel-header {
    background-color: #003300; color: #00ff00;
    padding: 8px 15px; text-align: center; border-bottom: 1px solid #00ff00;
    font-size: 12px; text-shadow: 0 0 3px rgba(0, 255, 0, 0.7);
    text-transform: uppercase; flex-shrink: 0;
}

/* ======================================================= */
/* VISUAL HEALTH PANEL STYLES (visualHealthPanelContent) */
/* ======================================================= */
.body-display-visual-container {
    flex-grow: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    position: relative;
    font-size: 12px;
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.5);
    background-color: #000; /* Fundo escuro */
}

.human-body-silhouette {
    height: 90%;
    max-height: 250px;
    width: auto;
    stroke: #00ff00; /* Contorno verde claro */
    stroke-width: 1.5; /* Contorno um pouco mais fino */
    fill: #000000; /* Preenchimento preto */
    transition: all 0.3s ease-in-out;
}

.body-part-svg {
    fill: transparent; /* Preenchimento transparente por padrão */
    stroke: #00ff00; /* Contorno default para as partes */
    stroke-width: 1;
}

/* Visuais de status para partes do corpo no SVG */
/* Cores de preenchimento e contorno para os estados */
.body-part-svg.status-arranhado { fill: rgba(255, 0, 0, 0.2); stroke: #ff0000; } /* Vermelho suave */
.body-part-svg.status-sangrando { fill: rgba(139, 0, 0, 0.4); stroke: #8B0000; } /* Vermelho Escuro */
.body-part-svg.status-fraturado { fill: rgba(75, 0, 130, 0.4); stroke: #4B0082; } /* Roxo Escuro */
.body-part-svg.status-apodrecendo { fill: rgba(139, 69, 19, 0.4); stroke: #8B4513; } /* Marrom */
.body-part-svg.status-necrosado { fill: rgba(128, 128, 128, 0.4); stroke: #808080; } /* Cinza */
.body-part-svg.status-arrancado { fill: rgba(165, 42, 42, 0.6); stroke: #a52a2a; } /* Vermelho escuro forte */
.body-part-svg.status-queimado { fill: rgba(255, 165, 0, 0.4); stroke: #ffa500; } /* Laranja */
.body-part-svg.status-ferida_profunda { fill: rgba(74, 0, 0, 0.4); stroke: #4a0000; } /* Preto avermelhado */


.body-part-svg.infected { fill: rgba(0, 128, 0, 0.3); stroke: #008000; } /* Verde escuro para infecção */
.body-part-svg.virus { fill: rgba(139, 0, 0, 0.5); stroke: #8B0000; } /* Vermelho escuro para vírus (mais forte) */
.body-part-svg.curative { fill: rgba(144, 238, 144, 0.3); stroke: #90EE90; } /* Verde claro para curativo */
.body-part-svg.dirty-curative { fill: rgba(160, 82, 45, 0.3); stroke: #a0522d; } /* Marrom avermelhado */


/* Health Bar */
.health-bar-container {
    height: 80%;
    width: 20px;
    background-color: #333;
    border: 1px solid #00ff00;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    margin-left: 20px;
}

.health-bar {
    width: 100%;
    height: 100%; /* Será ajustado via JS */
    background: linear-gradient(to top, 
                #8B0000 0%,
                #ff0000 10%,
                #ffa500 40%,
                #00ff00 60%);
    transition: height 0.5s ease-out;
}

.heart-icon {
    width: 20px; height: 20px;
    background-color: #ff00ff;
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    border: 1px solid #00ff00;
    box-shadow: 0 0 5px #ff00ff;
}

/* Overall Status Text */
.overall-status-text {
    position: absolute;
    top: 5%;
    left: 55%; /* Posição à direita da silhueta */
    text-transform: uppercase;
    color: #00ff00; /* Cor default para o texto */
    font-size: 14px;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.7);
    line-height: 1.2;
}
.overall-status-text p { margin: 0; }
.overall-status-text p.overall-status { font-weight: bold; }

/* ======================================================= */
/* DETAILED HEALTH PANEL STYLES (detailedHealthPanelContent) */
/* ======================================================= */
.body-display-list {
    flex-grow: 1;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.5);
    font-size: 14px;
    line-height: 1.2;
}

.status-group {
    margin-bottom: 8px;
}

.status-heading {
    font-size: 14px;
    color: #00ff00;
    text-decoration: underline;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.body-part-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
    white-space: nowrap;
    text-transform: uppercase;
    overflow: hidden;
}

/* Estilos para as cores baseadas na saúde da parte (texto do nome e %) */
.health-color-normal { color: #00ff00; } /* Verde */
.health-color-damaged { color: #ffa500; } /* Laranja */
.health-color-critical { color: #ff0000; } /* Vermelho */
.health-color-dying { color: #8B0000; } /* Vermelho Escuro */
.health-color-destroyed { color: #808080; text-decoration: line-through; } /* Cinza + riscado */


/* Estilos para status adicionais (no painel de texto detalhado) */
.status-additional-text {
    font-size: 13px;
    margin-left: 8px; /* Espaço entre o elemento anterior e este status */
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.5); /* Bloom sutil */
}
.status-additional-text.infected { color: #008000; } /* Verde Escuro */
.status-additional-text.virus { color: #8B0000; } /* Vermelho Escuro */
.status-additional-text.curative { color: #90EE90; } /* Verde Claro */
.status-additional-text.dirty-curative { color: #a0522d; } /* Marrom Avermelhado */
.status-additional-text.arranhado { color: #ff0000; } /* Vermelho para arranhado */
.status-additional-text.sangrando { color: #8B0000; } /* Vermelho Escuro para sangrando */
.status-additional-text.fraturado { color: #4B0082; } /* Roxo Escuro para fraturado */
.status-additional-text.queimado { color: #ffa500; } /* Laranja para queimado */
.status-additional-text.ferida_profunda { color: #4a0000; } /* Preto avermelhado */

/* Estilos para a parte da info de status (porcentagem e estados) */
.body-part-info {
    display: flex;
    align-items: baseline;
    flex-shrink: 0;
    margin-left: 10px;
    text-align: right;
}