/* Base e Tipografia */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4; 
    color: black;
    margin: 0;
    padding: 0;
}

/* Cabeçalho */
header {
    background-color: #34495e; /* Azul/cinza escuro */
    color: white;
    padding: 10px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    margin-bottom: 5px;
    font-size: 1.8em;
    font-weight: 800;
}

/* Campo de Nome */
#playerNameInput {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    width: 300px;
    padding: 5px 10px;
    margin-bottom: 5px;
    opacity: 0.8;
}
#playerNameInput:focus {
    outline: 1px solid white;
}


/* Layout Principal (Três Colunas) */
.container {
    display: flex;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 20px;
    align-items: flex-start; 
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
/* Larguras adaptadas ao template: 2:1.5:1 */
.column-overall { flex: 2; min-width: 450px; }
.column-technique { flex: 1.5; min-width: 300px; }
.column-mental { flex: 1; min-width: 250px; }


/* Card Style (Blocos Cinzas) */
.card {
    background-color: #d7d8e0; /* Cinza claro */
    padding: 15px;
    border: 1px solid #a9a9a9;
    border-radius: 0; /* Sem bordas arredondadas */
    box-shadow: none; 
}

/* Títulos de Seção */
h2 {
    color: black;
    font-size: 1em;
    font-weight: bold;
    margin: 0 0 10px 0;
}

h3 {
    color: black;
    font-size: 1em;
    font-weight: bold;
    padding-bottom: 5px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

/* Formulários de Stats */
.stat-form label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
    font-size: 0.9em;
}

.stat-form input {
    width: 40px;
    padding: 3px;
    border: 1px solid black;
    border-radius: 0;
    text-align: center;
    font-weight: bold;
    background-color: white;
}


/* --- Overall Section (Layout Complexo) --- */
.overall-card {
    background-color: white;
}
.overall-top-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* 1. Etiqueta Total/Ranking */
.total-ranking-tag {
    flex-shrink: 0;
    width: 100px;
    border: 1px solid black;
    text-align: center;
    font-weight: bold;
    font-size: 0.8em;
}

.tag-top {
    background-color: white;
    padding: 3px 0;
    border-bottom: 1px solid black;
    color: black;
}
.tag-middle, .tag-bottom {
    padding: 5px 0;
    color: black; /* Será substituído via JS */
}
.tag-bottom {
    border-top: 1px solid black;
}

.total-value, .ranking-value {
    display: block;
    font-size: 1.4em;
    margin-top: 2px;
}

/* 2. Gráfico de Radar */
.overall-chart-container {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    border: 1px solid black; /* Borda externa do gráfico */
}
/* Rótulos posicionados por fora, imitando o design original */
.chart-labels div {
    position: absolute;
    font-size: 0.7em;
    font-weight: bold;
    white-space: nowrap;
    color: black;
}
.label-offense { top: 75px; left: -40px; }
.label-defense { top: 75px; right: -45px; }
.label-shoot { bottom: 20px; left: -40px; }
.label-pass { bottom: 20px; right: -45px; }
.label-dribble { bottom: -15px; left: 50%; transform: translateX(-50%); }
.label-hitbox { top: -15px; left: 50%; transform: translateX(-50%); }

/* 3. Mini Imagem */
.mini-portrait-area {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}
.mini-portrait-container {
    width: 90px;
    height: 90px;
    border: 1px solid black;
    overflow: hidden;
    margin-bottom: 5px;
}
#mini-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-breakdown {
    margin-top: 15px;
    padding-top: 5px;
    border-top: 1px solid black;
    font-size: 0.8em;
    text-align: center;
}

/* Imagem de Corpo Inteiro */
.full-body-portrait-container {
    padding: 0;
    overflow: hidden;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #a9a9a9;
}
#full-body-portrait {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Controles de Upload */
.upload-label {
    background-color: black;
    color: white;
    padding: 5px 10px;
    border-radius: 0;
    cursor: pointer;
    display: inline-block;
    font-weight: normal;
    font-size: 0.8em;
    border: 1px solid black;
}
.upload-label input[type="file"] {
    display: none;
}
.image-upload-controls {
    text-align: center;
    margin-top: -15px; /* Puxa para cima para ficar mais próximo da imagem */
    margin-bottom: 20px;
}

/* Responsividade básica */
@media (max-width: 1000px) {
    .container {
        flex-direction: column;
    }

    .column {
        min-width: unset;
        width: 100%;
    }

    .overall-top-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .overall-chart-container {
        order: -1;
        width: 100%;
        height: 250px;
        margin: 10px 0;
    }
    
    .chart-labels { display: none; } /* Oculta os rótulos externos em telas pequenas */
    
    .tag-top { font-size: 1.2em; }
}