:root {
    --surface-color: #8B4513;
    --dirt-color: #5D4037;
    --stone-color: #9E9E9E;
    --empty-color: #FFFFFF;
    --citadel-color: #795548;
    --dwarf-color: #FFA000;
    --coal-color: #263238;
    --iron-color: #78909C;
    --gold-color: #FFD700;
    --diamond-color: #B3E5FC;
    --obsidian-color: #300030;
    --cell-size: 45px;
    --pet-health-width: calc(var(--cell-size) * 0.67);
    --mission-target-color: rgba(255,0,0,0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    color: #FFA000;
}

/* Alerte d'attaque au centre de l'écran */
.attack-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    z-index: 1000;
    text-align: center;
    font-size: 24px;
    animation: alert-fade 2s forwards;
    pointer-events: none; /* Permettre les clics à travers */
}

/* Styles pour l'alerte de mort */
.death-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
    z-index: 1000;
    text-align: center;
    font-size: 28px;
    animation: death-alert-fade 5s forwards;
    pointer-events: none; /* Permettre les clics à travers */
    width: 400px;
    border: 2px solid #a00;
}

/* Styles pour l'alerte de game over */
.game-over-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(100, 0, 0, 0.95);
    color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    z-index: 1000;
    text-align: center;
    width: 450px;
    border: 3px solid #ff0000;
    animation: game-over-pulse 1.5s infinite;
    pointer-events: none; /* Permettre les clics à travers */
}

.game-over-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ff0000;
}

.game-over-message {
    font-size: 20px;
    margin-bottom: 15px;
}

.game-over-subtitle {
    font-size: 16px;
    opacity: 0.8;
    font-style: italic;
}

@keyframes game-over-pulse {
    0% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
    50% { box-shadow: 0 0 50px rgba(255, 0, 0, 0.9); }
    100% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
}

.death-symbol {
    font-size: 50px;
    margin-bottom: 10px;
    animation: pulse-death 2s infinite;
}

.death-message {
    font-weight: bold;
    color: #ff5555;
}

@keyframes death-alert-fade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    20% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes pulse-death {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Styles pour les tas d'os */
.bones {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../img/sprites/skull.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
    z-index: 5;
}

.bones-cell {
    position: relative;
    background-color: #333 !important; /* Assombrir la cellule contenant des os */
}

@keyframes alert-fade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    20% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #121212;
    color: #E0E0E0;
}

.game-container {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5D4037;
}

#game-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* position: fixed; */
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: rgba(45, 45, 45, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#dwarf-count, #resources {
    margin-bottom: 0.5rem;
}

#ap-stats {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    border-top: 1px solid #5D4037;
    padding-top: 0.5rem;
    cursor: none;
    justify-content: space-around;
}

.ap-indicator, .hp-indicator {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #fff;
    background-color: #1E88E5;
    display: flex;
    justify-content: space-between;
}

#ap-regen {
    background-color: #7B1FA2;
}

#ap-reduction {
    background-color: #388E3C;
}

#hp-regen {
    background-color: #D32F2F; /* Rouge pour indiquer les points de vie */
}

.ap-indicator span, .hp-indicator span {
    font-weight: bold;
    margin-left: 0.5rem;
}

#resources {
    display: flex;
    gap: 1rem;
}

.hidden{
    display: none;
}

.resource {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    cursor: none;
}

.resource.coal {
    background-color: var(--coal-color);
}

.resource.iron {
    background-color: var(--iron-color);
}

.resource.gold {
    background-color: var(--gold-color);
    color: #000;
}

.resource.diamond {
    background-color: var(--diamond-color);
    color: #000;
}

main {
    display: flex;
    flex-grow: 1;
    gap: 0;
    margin-top: 20px; /* Ajouter de l'espace en haut pour le #game-stats */
    margin-right: 0; /* Supprimer la marge droite pour utiliser toute la largeur */
    width: 100%;
}

/* Styles pour la nouvelle structure dans index.php */
.game-content {
    display: flex;
    width: 100vw;
    height: calc(100vh - 120px); /* Utiliser presque toute la hauteur de l'écran */
    gap: 0;
    position: relative;
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: 0;
    margin-bottom: 0;
}

/* Nouveau conteneur qui englobe la liste des nains et la barre de bâtiments */
.right-panels-container {
    position: fixed;
    background-color: #121212;
    right: 0;
    top: 0; 
        display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 900;
    /* Assurer que la largeur est fixe pour éviter des problèmes de redimensionnement */
    width: 500px;
    overflow-y: auto; /* Ajouter un défilement si le contenu est trop grand */
    max-height: calc(100vh - 80px); /* Hauteur maximale en fonction de la hauteur de la fenêtre */
    transition: transform 0.3s ease-in-out; /* Animation fluide */
}

/* Classe pour masquer le panneau latéral */
.right-panels-container.hidden {
    transform: translateX(495px); /* Légèrement visible pour montrer qu'il y a quelque chose */
}

/* Bouton pour afficher/masquer le panneau latéral */
#toggle-sidebar {
    position: fixed;
    right: 505px; /* Positionné à gauche du panneau */
    top: 75px;
    background-color: #7D5A4F;
    color: white;
    border: none;
    border-radius: 5px 0 0 5px;
    padding: 10px 5px;
    cursor: pointer;
    z-index: 901;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

#toggle-sidebar:hover {
    background-color: #9C7A6D;
}

/* Position du bouton quand le panneau est masqué */
#toggle-sidebar.hidden {
    right: 10px;
}

/* Ajout pour que le JavaScript puisse correctement positionner le bouton */
.right-panels-container.hidden + #toggle-sidebar,
.right-panels-container.hidden ~ #toggle-sidebar {
    right: 0 !important;
}

#game-grid-container, #grid-container {
    flex-grow: 1;
    overflow: auto;
    width: calc(100vw - 520px); /* Largeur de l'écran moins l'espace du panneau droit */
    height: calc(100vh - 140px); /* Utiliser presque toute la hauteur disponible */
    margin-right: auto;
    margin-left: 10px;
    border: 2px solid #5D4037;
    background-color: #212121;
    min-height: 600px;
    min-width: 600px;
}

#game-grid, #grid-container {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 20), var(--cell-size));
    grid-template-rows: repeat(var(--grid-rows, 20), var(--cell-size));
    gap: 1px;
}

.grid-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    background-color: var(--empty-color);
    border-radius: 4px;
    border: 1px solid #424242;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

}

/* Style pour les cellules accessibles */
.grid-cell.accessible {
    cursor: pointer;
    animation: pulse 1.5s infinite;
    box-shadow: inset 0 0 5px 2px rgba(255, 255, 0, 0.5);
}

/* Style pour le chemin calculé */
.grid-cell.path {
    box-shadow: inset 0 0 8px 3px rgba(0, 255, 0, 0.6);
}

/* Style pour la destination d'une mission à long terme */
.grid-cell.mission-target {
    position: relative;
    cursor: pointer;
    animation: target-pulse 1.5s infinite;
}

.grid-cell.mission-target::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, var(--mission-target-color, rgba(255,0,0,0.5)) 0%, transparent 70%);
    pointer-events: none;
    z-index: 5;
}

@keyframes target-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* Styles pour les créatures */
.grid-cell.creature {
    position: relative;
    overflow: visible !important; /* Changer overflow à visible pour permettre au tooltip de s'afficher */
}

.grid-cell.creature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 80% 80%;
    background-position: center;
    background-repeat: no-repeat;
    animation: creature-pulse 2s infinite alternate; 
    z-index: 5;
}

@keyframes creature-pulse {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.1); }
}

/* Araignée */
.grid-cell.creature.spider::after {
    background-image: url('/img/sprites/spider.png');
    background-color: rgba(119, 34, 34, 0.2);
}

/* Slime */
.grid-cell.creature.slime::after {
    background-image: url('/img/sprites/slime.png');
    background-color: rgba(34, 170, 34, 0.2);
}

/* Golem */
.grid-cell.creature.golem::after {
    background-image: url('/img/sprites/golem.png');
    background-color: rgba(136, 136, 136, 0.3);
}

/* Indicateur de dégâts au-dessus des ennemis */
.damage-indicator {
    position: absolute;
    color: #ff3333;
    font-weight: bold;
    font-size: 24px; /* Taille augmentée */
    text-shadow: 0 0 3px #000, 0 0 5px #000; /* Ombre plus visible */
    z-index: 100;
    pointer-events: none;
    animation: damage-float 1.8s ease-out forwards;
    background-color: rgba(0, 0, 0, 0.6); /* Fond plus opaque */
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
    transform: scale(1.2); /* Légère mise à l'échelle */
}

.healing-indicator {
    position: absolute;
    color: #33ff33;
    font-weight: bold;
    font-size: 24px; /* Taille augmentée */
    text-shadow: 0 0 3px #000, 0 0 5px #000; /* Ombre plus visible */
}

.health-damage-indicator {
    position: absolute;
    color: #ff3366; /* Rouge plus vif avec une teinte rose pour différencier des dégâts PA */
    font-weight: bold;
    font-size: 24px; 
    text-shadow: 0 0 3px #000, 0 0 5px #000;
    z-index: 100;
    pointer-events: none;
    animation: damage-float 1.8s ease-out forwards;
    background-color: rgba(0, 0, 0, 0.6); /* Fond plus opaque */
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
    transform: scale(1.2); /* Légère mise à l'échelle */
    border: 1px solid #ff0000; /* Bordure rouge pour indiquer les dégâts aux PV */
}

@keyframes damage-float {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Affichage des butins dans la zone de jeu */
.loot-notification {
    position: absolute;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffcc00;
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
    animation: loot-appear 4s ease-in-out forwards;
    max-width: 200px;
    text-align: center;
    white-space: nowrap;
    text-shadow: 1px 1px 2px black;
}

.loot-notification-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loot-notification-title {
    color: #ffcc00;
    font-size: 18px;
    margin-bottom: 5px;
}

.loot-resource {
    display: flex;
    align-items: center;
    margin: 2px 0;
    color: #ffffff;
}

.loot-resource.coal { color: #aaaaaa; }
.loot-resource.iron { color: #dddddd; }
.loot-resource.gold { color: #ffcc00; }
.loot-resource.diamond { color: #00ffff; }

.loot-resource-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    border-radius: 50%;
}

.loot-resource-icon.coal { background-color: #666666; }
.loot-resource-icon.iron { background-color: #cccccc; }
.loot-resource-icon.gold { background-color: #ffcc00; }
.loot-resource-icon.diamond { background-color: #00ffff; }

.loot-resource.item {
    display: flex;
    align-items: center;
    margin: 4px 0;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    color: #ffffff;
}

.loot-resource-icon.item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 4px;
}

.loot-item-icon {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.loot-amount {
    font-weight: bold;
    margin-left: 3px;
}

@keyframes loot-appear {
    0% { opacity: 0; transform: scale(0.8); }
    10% { opacity: 1; transform: scale(1.1); }
    20% { transform: scale(1); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9) translateY(-20px); }
}

@keyframes pulse {
    0% {
        box-shadow: inset 0 0 5px 2px rgba(255, 255, 0, 0.5);
    }
    50% {
        box-shadow: inset 0 0 8px 4px rgba(255, 255, 0, 0.7);
    }
    100% {
        box-shadow: inset 0 0 5px 2px rgba(255, 255, 0, 0.5);
    }
}

/* Styles pour les boutons de construction */
button, .build-btn, #build-workshop, #build-foundry, #build-brewery, #build-hospital, #build-barracks, #build-wall, #force-save-btn {
    display: inline-block;
    background-color: #5D4037;
    color: #FFF;
    border: 2px solid #3E2723;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 5px 0;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

/* Style spécifique pour le bouton de sauvegarde manuelle */
#force-save-btn {
    background-color: #009688;
    border-color: #00796B;
    margin-top: 8px;
    font-size: 14px;
    width: 100%;
}

button:hover, .build-btn:hover, #force-save-btn:hover {
    background-color: #8D6E63;
}

#force-save-btn:hover {
    background-color: #26A69A;
}

button:active, .build-btn:active, #force-save-btn:active {
    background-color: #3E2723;
    transform: scale(0.97);
}

/* Style spécifique pour les boutons de fin de tour et sauvegarde */
#end-turn, #save-game, #load-game {
    margin-right: 5px;
    background-color: #455A64;
    border-color: #263238;
}

#end-turn:hover, #save-game:hover, #load-game:hover {
    background-color: #607D8B;
}

.empty {
    background-image: url('../img/tiles/empty.svg');
}

.surface {
    background-image: url('../img/tiles/surface.svg');
}

.dirt {
    background-image: url('../img/tiles/dirt.svg');
}

.stone {
    background-image: url('../img/tiles/stone.svg');
}

.coal {
    background-image: url('../img/tiles/coal.svg');
}

.iron {
    background-image: url('../img/tiles/iron.svg');
}

.gold {
    background-image: url('../img/tiles/gold.svg');
}

.diamond {
    background-image: url('../img/tiles/diamond.svg');
}

.obsidian {
    background-color: var(--obsidian-color);
    background-image: url('../img/tiles/stone.svg');
    filter: brightness(0.5) hue-rotate(270deg);
}

.citadel {
    background-image: url('../img/tiles/citadel.svg');
}

/* Styles pour les salles spéciales */
.workshop {
    background-image: url('../img/buildings/workshop.png');
}

.foundry {
    background-image: url('../img/buildings/foundry.png');
}

/* Brasserie */
.brewery {
    background-image: url('../img/tiles/brasserie.png');
    background-size: cover;
    background-position: center;
}

.barracks {
    background-image: url('../img/buildings/barrack.png');
}

/* Bâtiments de ressources */
.iron_quarry {
    background-image: url('../img/buildings/quarryIron.png');
    background-size: cover;
    background-position: center;
}

.coal_quarry {
    background-image: url('../img/buildings/quarryCoal.png');
    background-size: cover;
    background-position: center;
}

.gold_carry {
    background-image: url('../img/buildings/quarryGold.png');
    background-size: cover;
    background-position: center;
}

.diamond_carry {
    background-image: url('../img/buildings/quarryDiamond.png');
    background-size: cover;
    background-position: center;
}

.hospital {
    background-color: #eaeaea; /* Rose pour l'hôpital */
    background-image: url('../img/buildings/hospital.png');
    background-size: cover;
    background-position: center;
}

.wall {
    background-color: #6D4C41; /* Couleur marron foncé pour ressembler à un mur en terre compactée */
    background-image: url('../img/buildings/cobblestones.png');
    background-size: cover;
    background-position: center;
}

.dwarf {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    background-image: url('../img/sprites/dwarf-1.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
    cursor: pointer;
}

/* Style pour les nains sélectionnés */
.dwarf.selected {
    outline: 2px solid #FFA000;
    box-shadow: 0 0 8px #FFA000;
    border-radius: 50%;
}

/* Styles pour la colonne des nains */
.dwarf-column {
    width: 100%;
    background-color: rgba(33, 33, 33, 0.8);
    border-radius: 5px;
    padding: 0.25rem;
    overflow-y: auto;
    max-height: 50vh;
    z-index: 90;
    border-bottom: 1px solid #5D4037;
    margin-bottom: 5px;
}

.dwarf-column h3 {
    color: #FFA000;
    margin-top: 0;
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid #5D4037;
    text-align: center;
}

#dwarf-list {
    overflow-y: auto;
    margin-bottom: 5px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
}

.dwarf-item {
    margin-bottom: 0;
    padding: 0.5rem;
    background-color: #333;
    border-radius: 4px;
}

.dwarf-item.selected, 
#dwarf-list .selected {
    border: 2px solid #FFA000;
    box-shadow: 0 0 8px rgba(255, 160, 0, 0.6);
    background-color: #3e3e3e;
    position: relative;
}

.dwarf-item.selected::before,
#dwarf-list .selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 4px;
    animation: selected-pulse 2s infinite;
    pointer-events: none;
}

@keyframes selected-pulse {
    0% { box-shadow: inset 0 0 0 1px rgba(255, 160, 0, 0.3); }
    50% { box-shadow: inset 0 0 0 3px rgba(255, 160, 0, 0.5); }
    100% { box-shadow: inset 0 0 0 1px rgba(255, 160, 0, 0.3); }
}

/* Pour les écrans étroits, revenir à une seule colonne */
@media (max-width: 640px) {
    #dwarf-list {
        grid-template-columns: 1fr;
    }
}

#game-controls, .sidebar {
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(45, 45, 45, 0.8);
    overflow-y: auto;
    position: relative;
    border-radius: 5px;
}

.dwarf-level {
    font-size: 0.8rem;
    background-color: #7B1FA2;
    color: white;
    padding: 2px 5px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Style pour l'en-tête du nain avec nom, niveau et position */
.dwarf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.dwarf-name {
    font-weight: bold;
    font-size: 0.8rem;
    color: #FFA000;
}

.dwarf-position {
    color: #aaa;
    font-size: 0.8rem;
}

/* Nouveau style pour le conteneur des statistiques */
.stats-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.stat-item {
    flex: 1;
}

.action-points-container, .health-points-container, .experience-container {
    height: 8px;
    background-color: #333;
    margin-top: 4px;
    margin-bottom: 8px;
    border-radius: 4px;
    position: relative;
    border: 1px solid #555;
    display: block;
    width: 100%;
}

.action-points {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 0;
    max-width: 100%;
    transition: width 0.3s ease-in-out;
    display: block;
}

.health-points {
    height: 100%;
    background-color: #ff5555;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 0;
    max-width: 100%;
    transition: width 0.3s ease-in-out;
    display: block;
}

.experience-points {
    height: 100%;
    background-color: #2196F3;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 0;
    max-width: 100%;
    transition: width 0.3s ease-in-out;
    display: block;
}

.dwarf-ap, .dwarf-hp, .dwarf-xp {
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.dwarf-ap {
    color: #81C784;
}

.dwarf-hp {
    color: #ff8080;
}

.dwarf-xp {
    color: #90CAF9;
}

.dwarf-missions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #555;
}

.missions-limit {
    font-size: 0.9rem;
    color: #81C784;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.dwarf-mission {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #555;
    font-size: 0.9rem;
    color: #FFC107;
}

/* Style spécial pour les missions de combat */
.dwarf-mission.combat-mission {
    color: #ff5252;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0.5rem;
    border-top: 1px dashed #ff5252;
    animation: combat-mission-pulse 2s infinite alternate;
}

@keyframes combat-mission-pulse {
    0% { background-color: rgba(255, 0, 0, 0.05); }
    100% { background-color: rgba(255, 0, 0, 0.2); }
}

.cancel-mission-btn {
    margin-top: 0.3rem;
    padding: 2px 8px;
    background-color: #E53935;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.cancel-mission-btn:hover {
    background-color: #F44336;
}

/* Styles pour le panneau des salles */
#rooms-panel {
   
    /* border-top: 1px solid #5D4037; */
}

.room-intro {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #BDBDBD;
}

.room-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: #333;
    border-radius: 4px;
    cursor: pointer;
}

.room-item:hover {
    background-color: #444;
}

.room-icon {
    width: var(--cell-size);
    height: var(--cell-size);
    margin-right: 0.5rem;
    background-size: cover;
}

/* Icônes des salles dans le panneau */
.room-icon.workshop {
    background-image: url('../img/buildings/workshop.png');
}

.room-icon.foundry {
    background-image: url('../img/buildings/foundry.png');
}

/* Icône pour la Brasserie */
.room-icon.brewery {
    background-image: url('../img/tiles/brasserie.png');
    background-size: cover;
    background-position: center;
}

.room-icon.barracks {
    
    background-image: url('../img/buildings/barrack.png');
    background-size: cover;
    background-position: center;
}

.room-icon.hospital {
    background-color: #ffffff;
    color: white;
    background-image: url('../img/buildings/hospital.png');
    background-size: cover;
    background-position: center;
}

.room-icon.wall {
    background-color: #6D4C41;
    background-image: url('../img/buildings/cobblestones.png');
    background-size: cover;
    background-position: center;
}

.room-info {
    flex-grow: 1;
}

.room-name {
    font-weight: bold;
}

#room-details {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Ajoutez cette ligne */
    
    padding: 0.5rem;
    background-color: #333;
    border-radius: 4px;
    border: 4px solid #5D4037;
    z-index: 9999;
}

#room-shape {
    display: grid;
    grid-template-columns: repeat(var(--shape-cols, 3), 15px);
    grid-template-rows: repeat(var(--shape-rows, 3), 15px);
    gap: 2px;
    margin: 1rem 0;
}

.shape-cell {
    width: 15px;
    height: 15px;
    background-color: #5D4037;
    border-radius: 2px;
}

.shape-cell.empty {
    background-color: transparent;
    border: 1px dashed #757575;
}

#room-cost {
    color: #FFC107;
    white-space: pre-line;
    line-height: 1.3;
    margin-bottom: 8px;
    font-size: 0.95em;
}

#room-benefit {
    color: #81C784;
}

#build-room, #cancel-room {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
}

#build-room {
    background-color: #4CAF50;
    color: white;
}

#build-room:disabled {
    background-color: #757575;
    cursor: not-allowed;
}

#cancel-room {
    background-color: #F44336;
    color: white;
}

.action-points {
    height: 100%;
    background-color: #FFA000;
    border-radius: 5px;
  
}

footer {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #5D4037;
}

/* Style pour les tooltips */
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    top: -10px;
    left: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.grid-cell:hover .tooltip,
.dwarf:hover .tooltip,
.grid-cell.creature:hover .tooltip {
    opacity: 1;
}

/* Nouveau conteneur pour les messages */
#game-messages-container {
    width: 100%;
    margin: 10px auto;
    padding: 0 10px;
    z-index: 100;
    /* Assurer que le conteneur est bien au-dessus des colonnes latérales */
    position: relative;
}

#game-messages {
    height: 40px;
    overflow-y: auto;
    padding: 0.1rem 0.5rem;
    background-color: rgba(45, 45, 45, 0.95);
    border: 2px solid #5D4037;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    /* Scroll toujours visible pour faciliter la navigation des messages */
    scrollbar-width: thin;
    scrollbar-color: #5D4037 #2D2D2D;
    position: relative;
    transition: height 0.3s ease-in-out;
}

#game-messages.expanded {
    height: 200px;
}

.toggle-messages-btn {
    position: absolute;
    bottom: 5px;
    right: 10px;
    background-color: #5D4037;
    color: #FFF;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.toggle-messages-btn:hover {
    background-color: #8D6E63;
}

.toggle-messages-btn i {
    transition: transform 0.3s ease;
}

#game-messages.expanded .toggle-messages-btn {
    transform: rotate(180deg);
    bottom: 5px;
}

/* Effets de particules pour le minage */
.mining-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    animation: mining-particle-animation 0.5s ease-out forwards;
}

@keyframes mining-particle-animation {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.bomb-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(206, 109, 17, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    animation: mining-particle-animation 0.5s ease-out forwards;
}

/* Animation d'explosion pour les pets de type bombe */
.explosion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.explosion-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 200, 0, 0.7);
    border-radius: 50%;
    z-index: 9;
    animation: explosion-flash 0.8s ease-out forwards;
}

.explosion-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 100, 0, 0.9);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9;
    animation: explosion-particle 1s ease-out forwards;
}

@keyframes explosion-flash {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        opacity: 0.8;
    }
    100% {
        transform: scale(5);
        opacity: 0;
    }
}

@keyframes explosion-particle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Animation de secousse pour l'explosion */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5px, -5px); }
    20% { transform: translate(5px, 5px); }
    30% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, -3px); }
    50% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    70% { transform: translate(-1px, 1px); }
    80% { transform: translate(1px, -1px); }
    90% { transform: translate(-1px, -1px); }
    100% { transform: translate(0, 0); }
}

/* Effet de flash lors du minage */
.mining-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 4;
    animation: mining-flash-animation 0.2s ease-out forwards;
}

@keyframes mining-flash-animation {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}



#tips{
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    text-align: center;
    cursor: none;
}

#tips:hover{
    color: #7a7979;
}



.pointer{
    cursor: pointer;
}

/* Styles pour le bouton de toggle des salles */
#rooms-panel h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-button {
    background: none;
    border: none;
    color: #FFA000;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.toggle-button:hover {
    color: #FFB74D;
}

.toggle-button .toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.toggle-button.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.rooms-container {
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
}

.rooms-container.collapsed {
    max-height: 0;
    opacity: 0.5;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

#inventory-grid {
    display: grid;
   
    gap: 10px;
    background-color: #2c2c2c;
    padding: 10px;
    border-radius: 8px;
    
    
    
}

#inventory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
}




.message-pub {
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 8px;
    width: calc(100vw - 540px);
    margin-left: 10px;
}

.message-title {
    font-weight: bold;
    font-size: 1.2em;
}


.message-content {
    font-size: 1em;
}

.message-pub p {
    margin: 0;
}
.not-connected-save {
    font-size: 11px;
    font-weight: normal;
    color: var(---stone-color);
}

.inventory-item {
    width: 15px;
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    margin-right: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    position: relative;
    cursor: pointer;
}

.item-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.item-quantity {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    z-index: 50;
}

.item-on-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 5;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
   /* animation: item-pulse 2s infinite; */
}

@keyframes item-pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.crafting-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    border: 2px solid #8B4513;
    border-radius: 10px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: 10px 20px;
    color: white;
}

.crafting-popup.active {
    display: flex;
}

.crafting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1px;
    border-bottom: 1px solid #8B4513;
}

.crafting-title {
    font-size: 24px;
    color: #FFA000;
    z-index: 1000;
}

.close-crafting {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.crafting-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.inventory-section {
    flex: 1;
    padding: 10px;
    background-color: rgba(45, 45, 45, 0.5);
    border-radius: 5px;
}

.inventory-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inventory-item-crafting {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid #8B4513;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
}

.crafting-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Styles pour les éléments avec attribut title (info-bulles) */
[title] {
    position: relative;
    cursor: help;
    text-decoration: none;
  
    
}

[title]:hover {
    background-color: rgba(255, 160, 0, 0.1);
    
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%; /* Décalé plus à droite */
    transform: translateX(-20%); /* Moins centré vers la gauche */
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px 5px;
    width: max-content;
    max-width: 200px;
    z-index: 2000;
    font-size: 12px;
    font-weight: normal;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border: 1px solid #FFA000;
    pointer-events: none;
    white-space: pre-wrap;
    animation: tooltip-fade 0.3s ease-in-out;
}

@keyframes tooltip-fade {
    from { opacity: 0; transform: translate(-20%,10px); }
    to { opacity: 1; transform: translate(-20%, 0); }
}   

/* Styles pour les pets */
.pet {
    position: absolute;
    width: var(--cell-size);
    height: var(--cell-size);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 5; /* Entre les nains (6) et les créatures (4) */
    pointer-events: none;
    transition: transform 0.3s;
}

.pet:hover {
    transform: scale(1.1);
}

/* Styles pour la barre de santé des pets */
.pet-health {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: var(--pet-health-width);
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
}

.pet-health .health-inner {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

/* Animation pour les pets */
@keyframes pet-idle {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

.pet {
    animation: pet-idle 2s infinite;
}

/* Style spécifique pour l'Iron Spider */
.pet[style*="iron_spider.png"] {
    filter: drop-shadow(0 0 3px rgba(255, 165, 0, 0.7));
}

.creature-entity {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
}

/*mettre un effet pulsing sur les boss*/
.creature-entity.boss{
    /*il faut remonté, le sprite en hauteur*/
    top: -5px;
    animation: pulse 2s infinite;
    animation-direction: alternate;
} 

@keyframes pulse {
    0% { transform: scale(1.5); }
    50% { transform: scale(2); }
    100% { transform: scale(1.5); }
}

/* Style pour l'état de pause */
.game-paused::before {
    content: "PAUSE\A Press P to resume the game. ";
    white-space: pre-line;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    font-size: 32px;
    font-weight: bold;
    border-radius: 10px;
    z-index: 1000;
    text-shadow: 0 0 10px rgba(255, 160, 0, 0.8);
    border: 2px solid #FFA000;
    box-shadow: 0 0 20px rgba(255, 160, 0, 0.4);
}

.game-paused #grid-container {
    filter: brightness(0.7);
    pointer-events: none;
}

.game-paused .dwarf,
.game-paused .creature,
.game-paused .pet {
    animation-play-state: paused !important;
}

#game-messages-content {
    height: 100%;
    overflow-y: auto;  margin-top: 0.1rem;
    padding-right: 30px; /* Espace pour le bouton */
    padding-bottom: 5px;
}

.game-message {
   
    padding: 2px 5px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    font-size: 0.9em;
    color: #fff;
    word-wrap: break-word;
}

/* Style pour le dernier message */
.game-message:last-child {
    border-left: 2px solid #FFA000;
    padding-left: 8px;
}

.container-crafting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px;
}

.open-crafting {
    flex-shrink: 0;
}

#inventory-list {
    flex-grow: 1;
    display: flex;
    gap: 5px;
}

.close-crafting-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.close-crafting-btn:hover {
    background-color: #b71c1c;
}

/* Styles pour la liste des recettes disponibles */
.recipe-list-available {
    margin-top: 20px;
    height: 23rem;

    overflow-y: auto;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 5px;
}

.recipe-list-available h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ddd;
    font-size: 16px;
    text-align: center;
}

.recipe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recipe-item:hover {
    background-color: #3a3a3a;
}

.recipe-result {
    display: flex;
    align-items: center;
}

.result-icon {
    margin-right: 8px;
}

.result-name {
    font-size: 14px;
    color: #fff;
}

.purchase-price {
    font-size: 12px;
    color: #ffcc00;
    font-weight: bold;
    margin-top: 4px;
    margin-left: 10px;
    padding: 2px 6px;
    background-color: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 3px;
    display: inline-block;
    text-align: center;
    min-width: 80px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.purchase-price:hover {
    background-color: rgba(255, 204, 0, 0.2);
    border-color: rgba(255, 204, 0, 0.5);
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(255, 204, 0, 0.3);
}

.purchase-price:active {
    transform: scale(0.98);
    background-color: rgba(255, 204, 0, 0.3);
}

.recipe-ingredients {
    display: flex;
    align-items: center;
}

.recipe-ingredient {
    display: flex;
    align-items: center;
    margin-left: 5px;
}

.ingredient-icon.small img {
    width: 20px;
    height: 20px;
}

.ingredient-quantity {
    font-size: 12px;
    color: #ccc;
    margin-left: 2px;
}

.recipe-craft-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}

.recipe-craft-btn:hover {
    background-color: #45a049;
}

.recipe-craft-btn:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

/* Styles pour le popup d'équipement des nains */
#dwarf-equipment-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 80%;
    background-color: rgba(0, 0, 0, 0.95);
    border: 2px solid #8B4513;
    border-radius: 10px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: 10px 20px;
    color: white;
}

#dwarf-equipment-popup.active {
    display: flex;
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1px;
    border-bottom: 1px solid #8B4513;
}

.equipment-title {
    font-size: 24px;
    color: #FFA000;
    z-index: 1000;
}

.close-equipment-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.close-equipment-btn:hover {
    background-color: #b71c1c;
}

.equipment-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow: auto;
    padding: 10px;
}
.container-crafting-btn {
    display: flex;
    flex-direction: column;
   
}


#open-equipment-btn:hover {
    background-color: #FFB74D;
}

/* Styles pour l'affichage des équipements */
.equipment-dwarf-header {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #8B4513;
    padding-bottom: 10px;
}

.equipment-dwarf-header h3 {
    color: #FFA000;
    font-size: 20px;
    margin: 0;
}

.equipment-dwarf-stats {
    display: flex;
    flex-direction: column;
    background-color: rgba(45, 45, 45, 0.5);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    padding: 5px 10px;
}

.stat-label {
    font-weight: bold;
    color: #ccc;
}

.stat-value {
    color: white;
}

.equipment-slots {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 15px;
}

.equipment-slot {
    background-color: rgba(45, 45, 45, 0.5);
    border-radius: 5px;
    padding: 10px;
    border: 1px solid #555;
    min-width: 150px;
}

.slot-title {
    color: #FFA000;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.equipped-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.item-icon {
    margin-bottom: 5px;
}

.item-name {
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.item-stats {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 10px;
    text-align: center;
}

.unequip-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.unequip-btn:hover {
    background-color: #b71c1c;
}

.empty-slot {
    text-align: center;
    color: #666;
    padding: 20px 0;
    font-style: italic;
}

/* Quest Modal Styles */
.quest-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quest-modal-content {
    background-color: #2D2D2D;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    border: 2px solid #5D4037;
}

.quest-modal-header {
    background-color: #5D4037;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8B4513;
}

.quest-modal-header h2 {
    color: #FFA000;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.quest-close {
    color: #E0E0E0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.quest-close:hover {
    color: #FFA000;
}

.quest-modal-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.quest-filter {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #3D3D3D;
    border-radius: 8px;
    border: 1px solid #5D4037;
}

.quest-filter label {
    color: #E0E0E0;
    font-weight: bold;
    margin-right: 10px;
}

.quest-filter select {
    background-color: #2D2D2D;
    color: #E0E0E0;
    border: 1px solid #5D4037;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 14px;
}

.quest-filter select:focus {
    outline: none;
    border-color: #FFA000;
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quest-item {
    background-color: #3D3D3D;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #5D4037;
    transition: all 0.3s ease;
}

.quest-item:hover {
    background-color: #4D4D4D;
    transform: translateX(5px);
}

.quest-item.completed {
    border-left-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.quest-item.in-progress {
    border-left-color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quest-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quest-icon {
    font-size: 18px;
}

.quest-status-text {
    font-weight: bold;
    font-size: 14px;
}

.quest-item.completed .quest-status-text {
    color: #4CAF50;
}

.quest-item.in-progress .quest-status-text {
    color: #FF9800;
}

.quest-age {
    background-color: #5D4037;
    color: #FFA000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.quest-content {
    color: #E0E0E0;
}

.quest-name {
    color: #FFA000;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
}

.quest-description {
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #CCCCCC;
}

.quest-rewards {
    padding: 10px;
    background-color: #2D2D2D;
    border-radius: 5px;
    border: 1px solid #5D4037;
}

.quest-rewards strong {
    color: #FFA000;
}

.reward-item {
    display: inline-block;
    background-color: #5D4037;
    color: #E0E0E0;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 2px;
    font-size: 12px;
    font-weight: bold;
}

.no-quests {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px;
    font-size: 16px;
}

/* Responsive design pour la modal des quêtes */
@media (max-width: 768px) {
    .quest-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .quest-modal-header {
        padding: 10px 15px;
    }
    
    .quest-modal-header h2 {
        font-size: 20px;
    }
    
    .quest-modal-body {
        padding: 15px;
    }
    
    .quest-item {
        padding: 12px;
    }
    
    .quest-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Styles pour l'effet visuel de completion de quête */
.quest-completion-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color:  #5D4037;
    color: #E0E0E0;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 10000;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease-out;
    border: 3px solid #FFA000;
    min-width: 350px;
 
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.quest-completion-effect.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.quest-completion-effect.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}

.quest-completion-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background-color: rgba(45, 45, 45, 0.9);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #8B4513;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.quest-completion-icon {
    font-size: 48px;
    animation: quest-celebration 1s ease-in-out infinite alternate;
    text-shadow: 0 0 10px #FFA000;
    filter: drop-shadow(0 0 5px rgba(255, 160, 0, 0.8));
}

.quest-completion-title {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    color: #FFA000;
    text-transform: uppercase;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 10px;
    width: 100%;
}

.quest-completion-reward {
    font-size: 18px;
    background: linear-gradient(135deg, #8B4513, #5D4037);
    color: #E0E0E0;
    padding: 12px 25px;
    border-radius: 8px;
    border: 2px solid #FFA000;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.quest-completion-show-all-btn {
    background-color: #5D4037;
    color: #E0E0E0;
    border: 2px solid #FFA000;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.quest-completion-show-all-btn:hover {
    background-color: #8D6E63;
    border-color: #FFB74D;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.quest-completion-show-all-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes quest-celebration {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    25% { transform: scale(1.2) rotate(180deg); opacity: 1; }
    50% { transform: scale(1) rotate(360deg); }
    75% { transform: scale(1.1) rotate(540deg); }
    100% { transform: scale(0) rotate(720deg); opacity: 0; }
}

/* Effets visuels pour la montée de niveau */
.level-up-effect {
    user-select: none;
}

.level-up-glow {
    animation: levelUpGlow 2s ease-out;
}

@keyframes levelUpGlow {
    0% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); transform: scale(1); }
    25% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); transform: scale(1.1); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 1); transform: scale(1.05); }
    75% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); transform: scale(1); }
}

@keyframes levelUpAnimation {
    0% { 
        opacity: 0; 
        transform: translateY(0) scale(0.5); 
    }
    25% { 
        opacity: 1; 
        transform: translateY(-20px) scale(1.2); 
    }
    50% { 
        opacity: 1; 
        transform: translateY(-30px) scale(1); 
    }
    75% { 
        opacity: 0.8; 
        transform: translateY(-40px) scale(0.9); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-60px) scale(0.7); 
    }
}

/* Animations pour les particules d'étoiles */
@keyframes particleAnimation0 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(5px, -10px) scale(1.2); }
    100% { opacity: 0; transform: translate(20px, -40px) scale(0.5); }
}

@keyframes particleAnimation1 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(15px, -5px) scale(1.2); }
    100% { opacity: 0; transform: translate(40px, -20px) scale(0.5); }
}

@keyframes particleAnimation2 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(10px, 15px) scale(1.2); }
    100% { opacity: 0; transform: translate(30px, 40px) scale(0.5); }
}

@keyframes particleAnimation3 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(-5px, 20px) scale(1.2); }
    100% { opacity: 0; transform: translate(-20px, 50px) scale(0.5); }
}

@keyframes particleAnimation4 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(-15px, 5px) scale(1.2); }
    100% { opacity: 0; transform: translate(-40px, 20px) scale(0.5); }
}

@keyframes particleAnimation5 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(-10px, -15px) scale(1.2); }
    100% { opacity: 0; transform: translate(-30px, -40px) scale(0.5); }
}

@keyframes particleAnimation6 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(5px, -20px) scale(1.2); }
    100% { opacity: 0; transform: translate(20px, -50px) scale(0.5); }
}

@keyframes particleAnimation7 {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 1; transform: translate(-5px, -10px) scale(1.2); }
    100% { opacity: 0; transform: translate(-20px, -30px) scale(0.5); }
}

/* Animation pour les dégâts critiques */
@keyframes criticalHitAnimation {
    0% { 
        opacity: 0; 
        transform: translateY(0) scale(0.8); 
        color: #FF4444;
    }
    25% { 
        opacity: 1; 
        transform: translateY(-15px) scale(1.3); 
        color: #FF0000;
    }
    50% { 
        opacity: 1; 
        transform: translateY(-25px) scale(1.1); 
        color: #FF6666;
    }
    75% { 
        opacity: 0.7; 
        transform: translateY(-35px) scale(0.9); 
        color: #ffd344;
    }
    100% { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.6); 
        color: #e9b50a;
    }
}

/* Effet visuel pour la fatigue des nains */
.fatigue-active {
    opacity: 0.7;
    filter: grayscale(0.3);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

@keyframes fatigueAnimation {
    0% { 
        opacity: 0; 
        transform: translateY(0) scale(0.8); 
    }
    20% { 
        opacity: 0.8; 
        transform: translateY(-8px) scale(1); 
    }
    40% { 
        opacity: 1; 
        transform: translateY(-12px) scale(1.1); 
    }
    60% { 
        opacity: 0.9; 
        transform: translateY(-10px) scale(1); 
    }
    80% { 
        opacity: 0.6; 
        transform: translateY(-8px) scale(0.9); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-15px) scale(0.7); 
    }
}

/* Styles pour la section Captain */
.equipment-captain-section {
    background-color: rgba(45, 45, 45, 0.5);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #8B4513;
}

.captain-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
}

.captain-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #FFA000;
    font-weight: bold;
    gap: 8px;
}

.captain-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
    accent-color: #FFA000;
    cursor: pointer;
}

.captain-text {
    font-size: 16px;
    color: #FFA000;
}

.captain-label:hover .captain-text {
    color: #FFB74D;
}

/* === AUTO-MINING PREFERENCES MENU === */

.auto-mining-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.auto-mining-menu .menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.auto-mining-menu .menu-content {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    border: 2px solid #FFA000;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    animation: menu-appear 0.3s ease-out;
}

@keyframes menu-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auto-mining-menu .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255, 160, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.auto-mining-menu .menu-title {
    color: #FFA000;
    font-size: 1.4em;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 160, 0, 0.4);
}

.auto-mining-menu .menu-close {
    background: none;
    border: none;
    color: #FFA000;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.auto-mining-menu .menu-close:hover {
    background: rgba(255, 160, 0, 0.2);
    transform: rotate(90deg);
}

.auto-mining-menu .menu-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.auto-mining-menu .preference-section,
.auto-mining-menu .range-section {
    margin-bottom: 25px;
}

.auto-mining-menu .preference-section h4,
.auto-mining-menu .range-section h4 {
    color: #FFA000;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(255, 160, 0, 0.3);
}

.auto-mining-menu .help-text {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
}

.auto-mining-menu .minerals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auto-mining-menu .mineral-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 160, 0, 0.1);
    border: 1px solid rgba(255, 160, 0, 0.3);
    border-radius: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.auto-mining-menu .mineral-item:hover {
    background: rgba(255, 160, 0, 0.2);
    transform: translateX(5px);
}

.auto-mining-menu .mineral-item:active {
    cursor: grabbing;
}

.auto-mining-menu .mineral-icon {
    font-size: 1.5em;
    margin-right: 12px;
    min-width: 30px;
}

.auto-mining-menu .mineral-name {
    flex: 1;
    color: #fff;
    font-weight: bold;
    font-size: 1em;
}

.auto-mining-menu .mineral-priority {
    color: #FFA000;
    font-size: 0.9em;
    margin-right: 15px;
    font-weight: 600;
}

.auto-mining-menu .mineral-drag-handle {
    color: #888;
    font-size: 1.2em;
    cursor: grab;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.auto-mining-menu .mineral-item:hover .mineral-drag-handle {
    opacity: 1;
}

.auto-mining-menu .range-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auto-mining-menu .range-control label {
    color: #fff;
    font-weight: 600;
}

.auto-mining-menu #range-value {
    color: #FFA000;
    font-weight: bold;
}

.auto-mining-menu #mining-range {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 160, 0, 0.2);
    outline: none;
    cursor: pointer;
}

.auto-mining-menu #mining-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFA000;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 160, 0, 0.5);
    transition: all 0.3s ease;
}

.auto-mining-menu #mining-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 160, 0, 0.8);
}

.auto-mining-menu .menu-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    border-top: 2px solid rgba(255, 160, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.05), rgba(255, 215, 0, 0.02));
}

.auto-mining-menu .btn-confirm,
.auto-mining-menu .btn-cancel {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.auto-mining-menu .btn-confirm {
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.auto-mining-menu .btn-confirm:hover {
    background: linear-gradient(45deg, #66BB6A, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.auto-mining-menu .btn-cancel {
    background: linear-gradient(45deg, #666, #888);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

.auto-mining-menu .btn-cancel:hover {
    background: linear-gradient(45deg, #888, #666);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.4);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .auto-mining-menu .menu-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .auto-mining-menu .menu-header,
    .auto-mining-menu .menu-footer {
        padding: 15px 20px;
    }
    
    .auto-mining-menu .menu-body {
        padding: 20px;
    }
    
    .auto-mining-menu .menu-footer {
        flex-direction: column;
    }
}

/* === TUTORIAL POPUP STYLES === */

.tutorial-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: tutorial-fade-in 0.5s ease-out;
}

@keyframes tutorial-fade-in {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.tutorial-content {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    border: 3px solid #FFA000;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: tutorial-appear 0.6s ease-out;
}

@keyframes tutorial-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tutorial-header {
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.3), rgba(255, 215, 0, 0.2));
    padding: 25px 30px;
    border-bottom: 2px solid rgba(255, 160, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-title {
    color: #FFA000;
    font-size: 2em;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 160, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 15px;
}

.tutorial-icon {
    font-size: 1.2em;
    animation: tutorial-icon-glow 2s ease-in-out infinite alternate;
}

@keyframes tutorial-icon-glow {
    from { 
        filter: drop-shadow(0 0 5px rgba(255, 160, 0, 0.5));
        transform: scale(1);
    }
    to { 
        filter: drop-shadow(0 0 15px rgba(255, 160, 0, 0.8));
        transform: scale(1.1);
    }
}

.tutorial-close {
    background: none;
    border: none;
    color: #FFA000;
    font-size: 2.5em;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tutorial-close:hover {
    background: rgba(255, 160, 0, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 160, 0, 0.4);
}

.tutorial-body {
    padding: 30px;
    max-height: calc(85vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #FFA000 #2d2d2d;
}

.tutorial-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 160, 0, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 160, 0, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.tutorial-section:hover {
    border-color: rgba(255, 160, 0, 0.5);
    background: rgba(255, 160, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 160, 0, 0.2);
}

.tutorial-section h3 {
    color: #FFA000;
    font-size: 1.4em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(255, 160, 0, 0.4);
}

.tutorial-section-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 0 5px rgba(255, 160, 0, 0.6));
}

.tutorial-section p {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.tutorial-highlight {
    background: linear-gradient(45deg, rgba(255, 160, 0, 0.2), rgba(255, 215, 0, 0.1));
    color: #FFD700;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.tutorial-tips {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(129, 199, 132, 0.1));
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.tutorial-tips p {
    color: #81C784;
    margin: 0;
    font-style: italic;
}

.tutorial-footer {
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.1), rgba(255, 215, 0, 0.05));
    border-top: 2px solid rgba(255, 160, 0, 0.3);
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tutorial-btn {
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tutorial-btn:hover {
    background: linear-gradient(45deg, #66BB6A, #4CAF50);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

.tutorial-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Responsive design pour mobile */
@media (max-width: 768px) {
    .tutorial-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .tutorial-header {
        padding: 20px;
    }
    
    .tutorial-title {
        font-size: 1.5em;
    }
    
    .tutorial-body {
        padding: 20px;
    }
    
    .tutorial-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .tutorial-section h3 {
        font-size: 1.2em;
    }
    
    .tutorial-footer {
        padding: 15px 20px;
    }
}

/* Animation de départ pour le tutoriel */
.tutorial-popup.closing {
    animation: tutorial-fade-out 0.4s ease-out forwards;
}

@keyframes tutorial-fade-out {
    from {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}
