/* --- ESTILOS GERAIS --- */
body { 
    font-family: sans-serif; 
    line-height: 1.6; 
    padding: 20px; 
    max-width: 700px; 
    margin: auto; 
    background-color: #f4f4f4; 
    overflow-y: scroll;
}

.container {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

h1 { text-align: center; margin-bottom: 25px;}
label { font-weight: bold; margin-top: 10px; display: block; font-size: 14px; }
hr { 
    border: 0; 
    border-top: 1px solid #ccc; 
    margin: 15px 0;
}
button { width: 100%; padding: 12px 15px; cursor: pointer; font-size: 16px; background-color: #28a745; color: white; border: none; border-radius: 5px; margin-top: 20px; }
button:hover { background-color: #218838; }
.add-monster-btn { background-color: #007bff; margin-top: 10px; }
.add-monster-btn:hover { background-color: #0056b3; }
button:disabled { background-color: #6c757d; cursor: not-allowed; }
#resultado { margin-top: 20px; padding: 15px; background-color: #e9ecef; border-radius: 5px; min-height: 50px; display: none; }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
#resultado h3 {
    margin: 0;
}
.results-summary {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 15px;
    flex-grow: 1;
}
.result-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.result-item span {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
}
.result-item strong {
    font-size: 1.1em;
    font-weight: bold;
}

/* --- ABAS DE MODO --- */
.mode-selector { display: flex; border-bottom: 2px solid #ccc; margin-bottom: 20px; }
.mode-selector label { padding: 10px 20px; cursor: pointer; border-radius: 5px 5px 0 0; background-color: #f1f1f1; position: relative; border: 2px solid transparent; }
.mode-radio-input { display: none; }
#modeAnalyzer:checked + #modeManual + .mode-selector label[for="modeAnalyzer"],
#modeManual:checked + .mode-selector label[for="modeManual"] { font-weight: bold; background-color: #fff; border-top: 2px solid #ccc; border-left: 2px solid #ccc; border-right: 2px solid #ccc; border-bottom: 2px solid #fff; margin-bottom: -2px; }

.tabs-content-wrapper {
    display: grid;
}
.mode-content {
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}
#modeAnalyzer:checked ~ .tabs-content-wrapper > #analyzerContainer,
#modeManual:checked ~ .tabs-content-wrapper > #manualContainer {
    opacity: 1;
    pointer-events: auto;
}

textarea { width: 100%; height: 312px; display: block; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 8px; }

/* --- ESTILO MATERIAL DESIGN PARA INPUTS --- */
.form-group { position: relative; padding-top: 15px; margin-bottom: 10px; }
.form-input { width: 100%; padding: 10px 0 5px 0; border: none; border-bottom: 1px solid #ccc; background-color: transparent; font-size: 14px; outline: none; }
.form-label { position: absolute; top: 15px; left: 0; font-size: 13px; color: #999; pointer-events: none; transition: all 0.2s ease-out; font-weight: bold; }
.form-input:focus + .form-label,
.form-group.has-value .form-label { top: 0; font-size: 12px; color: #007bff; }
.form-input:focus { border-bottom: 2px solid #007bff; }

/* --- LAYOUTS ESPECÍFICOS --- */
.manual-time-container { display: flex; gap: 20px; align-items: flex-end; }
.manual-time-container .form-group { flex: 0 0 60px; }
.manual-time-container span { padding-bottom: 5px; font-weight: bold; }
.monster-row { display: flex; gap: 10px; align-items: flex-end; position: relative; z-index: 1; }
.monster-row.is-active { z-index: 2; }
.monster-row .quantity-group { flex-basis: 70px; }
.monster-row .name-group { flex: 1; }
.autocomplete-suggestions { position: absolute; border: 1px solid #ccc; border-top: none; background-color: #fff; width: 100%; max-height: 220px; overflow-y: auto; z-index: 1000; border-radius: 0 0 4px 4px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.suggestion-item { padding: 10px; cursor: pointer; }
.suggestion-item:hover, .suggestion-active { background-color: #f0f0f0; }

/* --- Estilos para os inputs de XP --- */
.xp-header { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 10px; }
.xp-type-selector { display: flex; gap: 20px; align-items: center; position: relative; top: 6px; margin-left: 20px; }
.xp-type-selector label { font-weight: bold; margin-top: 0; cursor: pointer; margin-left: -10px; }
input[type="checkbox"] { width: auto; cursor: pointer; }
input[type="checkbox"]:disabled + label { opacity: 0.5; cursor: not-allowed; }
.input-container { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.input-group { flex: 1; min-width: 150px; }
/* O estilo antigo para .input-group input foi removido */
.input-group select { width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; background-color: #fff; margin-top: 8px; }
.input-disabled { background-color: #e9ecef !important; cursor: not-allowed !important; color: #6c757d !important; border-bottom: 1px solid #ccc !important; }
