/* --- Style Général --- */
body {
    background-color: #0c0a1a;
    background-image: url('https://avantis.world/perso/IMG/boutique.jpg'); /* Fond thématique */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #e0e0e0;
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

#overlay {
    background-color: rgba(0, 0, 0, 0.6);
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 5vh 0;
    box-sizing: border-box;
}

#generator-container {
    width: 90%;
    max-width: 900px;
    text-align: center;
}

header h1 {
    color: #aaffee;
    font-family: serif;
    font-weight: normal;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.narrator {
    font-style: italic;
    font-size: 1.2em;
    color: #ccc;
}

/* --- Contrôles de Génération --- */
#controls-section {
    background-color: rgba(10, 10, 20, 0.7);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #4a90e2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.control-group label {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #8ec3ff;
}

.control-group select {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    background-color: rgba(0,0,0,0.5);
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 5px;
}

#generate-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-end; /* S'aligne avec le bas des selects */
}

#generate-btn:hover {
    background-color: #63a0e4;
}

/* --- Fiche de Personnage --- */
.hidden {
    display: none !important;
}

#sheet-section {
    margin-top: 40px;
}

#character-sheet {
    background-color: #f4f0e8;
    color: #333;
    border: 2px solid #5a4a3a;
    border-radius: 5px;
    padding: 20px;
    text-align: left;
}

.sheet-header {
    text-align: center;
    border-bottom: 2px solid #9c8b7b;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#npc-name {
    margin: 0;
    font-family: serif;
    font-size: 2.2em;
    color: #5a4a3a;
}

.header-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-style: italic;
    color: #7c6b5b;
}

.sheet-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
}

.stat-column h3, .loot-column h3 {
    color: #5a4a3a;
    border-bottom: 1px solid #c9bfae;
    padding-bottom: 5px;
    margin-top: 0;
    font-size: 1.2em;
    text-transform: uppercase;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}
.stat-item strong {
    font-size: 1.5em;
    color: #5a4a3a;
}

.vrill-gauges {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-top: 20px;
}

.vrill-gauge {
    font-size: 1.2em;
    font-weight: bold;
}
.vrill-gauge strong {
    margin-left: 10px;
    font-size: 1.4em;
}

.loot-item {
    margin-bottom: 15px;
}
.loot-item strong {
    color: #7c6b5b;
}
#loot-supplementaire {
    list-style-type: none;
    padding-left: 0;
    margin-top: 5px;
}
#loot-supplementaire li {
    background-color: rgba(0,0,0,0.05);
    padding: 5px 10px;
    border-radius: 3px;
    margin-bottom: 5px;
}

.sheet-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end; /* Aligne le bouton à droite */
}

#save-json-btn {
    background-color: #6c757d; /* Une couleur différente pour la distinguer */
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#save-json-btn:hover {
    background-color: #868e96;
}