/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Écrans */
.screen {
    display: none;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Écran de titre */
#title-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.title-container h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.title-container h2 {
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Boutons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn.secondary {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* En-tête du jeu */
.game-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    
    align-items: flex-start;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 120px;
}

.guild-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.guild-name-input {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    max-width: 350px;
}

.guild-name-input:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.guild-name-input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.15);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.guild-rank {
    color: #2d3436;
    font-weight: 600;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.bonuses-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.bonuses-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3436;
}

.bonuses-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bonus-item {
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: help;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Styles de rareté pour les bonus */
.bonus-item.rarity-common {
    background: linear-gradient(45deg, #666666, #7f8c8d);
    border-color: #666666;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.bonus-item.rarity-common:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 102, 102, 0.4);
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
}

.bonus-item.rarity-uncommon {
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.bonus-item.rarity-uncommon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.4);
    background: linear-gradient(45deg, #00cec9, #55a3ff);
}

.bonus-item.rarity-rare {
    background: linear-gradient(45deg, #74b9ff, #55a3ff);
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.bonus-item.rarity-rare:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(116, 185, 255, 0.4);
    background: linear-gradient(45deg, #55a3ff, #a29bfe);
}

.bonus-item.rarity-epic {
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
    border-color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.3);
}

.bonus-item.rarity-epic:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.4);
    background: linear-gradient(45deg, #6c5ce7, #fdcb6e);
}

.bonus-item.rarity-legendary {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    border-color: #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

.bonus-item.rarity-legendary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(253, 203, 110, 0.4);
    background: linear-gradient(45deg, #e17055, #d63031);
}

/* Fallback pour les bonus sans rareté spécifiée */
.bonus-item:not([class*="rarity-"]) {
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.bonus-item:not([class*="rarity-"]):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.4);
    background: linear-gradient(45deg, #00cec9, #55a3ff);
}

/* Styles pour les consommables avec rareté */
.consumable-item.rarity-common {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    border-color: #7f8c8d;
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
}

.consumable-item.rarity-common:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(127, 140, 141, 0.4);
    background: linear-gradient(45deg, #95a5a6, #00b894);
}

.consumable-item.rarity-uncommon {
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.consumable-item.rarity-uncommon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.4);
    background: linear-gradient(45deg, #00cec9, #55a3ff);
}

.consumable-item.rarity-rare {
    background: linear-gradient(45deg, #74b9ff, #55a3ff);
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.consumable-item.rarity-rare:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(116, 185, 255, 0.4);
    background: linear-gradient(45deg, #55a3ff, #a29bfe);
}

.consumable-item.rarity-epic {
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
    border-color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.3);
}

.consumable-item.rarity-epic:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.4);
    background: linear-gradient(45deg, #6c5ce7, #fdcb6e);
}

.consumable-item.rarity-legendary {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    border-color: #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

.consumable-item.rarity-legendary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(253, 203, 110, 0.4);
    background: linear-gradient(45deg, #e17055, #d63031);
}

/* Fallback pour les consommables sans rareté spécifiée */
.consumable-item:not([class*="rarity-"]) {
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.consumable-item:not([class*="rarity-"]):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.4);
    background: linear-gradient(45deg, #00cec9, #55a3ff);
}

/* Styles pour les icônes de consommables avec rareté */
.consumable-icon-header.rarity-common {
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.consumable-icon-header.rarity-uncommon {
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.consumable-icon-header.rarity-rare {
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.consumable-icon-header.rarity-epic {
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.3);
}

.consumable-icon-header.rarity-legendary {
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

/* Anciens styles pour les boutons de vente individuels - supprimés car remplacés par la modal */

/* Styles pour la modal de confirmation de vente */
.sell-confirmation-details {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.sell-price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.sell-price-label {
    font-weight: 600;
    color: #495057;
}

.sell-price-value {
    font-weight: bold;
    color: #28a745;
    font-size: 1.2rem;
}

.sell-description {
    color: #6c757d;
    font-style: italic;
}

.sell-confirmation-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.sell-confirmation-actions .btn {
    min-width: 80px;
}

/* Styles pour la modal de vente de bonus */
.sell-bonuses-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.sell-bonuses-info p {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
}

.sell-bonuses-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.sell-bonus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.sell-bonus-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.sell-bonus-item.has-quantity {
    border-color: #28a745;
    background: #f8fff9;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.sell-bonus-info {
    flex: 1;
    margin-right: 15px;
}

.sell-bonus-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sell-bonus-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 6px;
}

.sell-bonus-count {
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
}

.sell-bonus-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.sell-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.sell-quantity-input {
    width: 50px;
    height: 28px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.sell-quantity-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.sell-bonus-price {
    text-align: right;
    min-width: 120px;
}

.sell-bonus-price-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.sell-bonus-price-total {
    font-weight: bold;
    font-size: 1rem;
    color: #28a745;
}

.sell-bonuses-summary {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-top: 3px solid #28a745;
}

.total-gold-gain {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.summary-label {
    font-weight: 600;
    color: #495057;
}

.summary-value {
    font-weight: bold;
    color: #28a745;
    font-size: 1.2rem;
}

.sell-bonuses-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.sell-bonuses-actions .btn {
    min-width: 100px;
}

/* Responsive pour la modal de vente */
@media (max-width: 768px) {
    .sell-bonus-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .sell-bonus-controls {
        width: 100%;
        justify-content: space-between;
        min-width: auto;
    }
    
    .sell-quantity-controls {
        flex: 1;
        max-width: 150px;
    }
    
    .sell-bonus-price {
        text-align: right;
        min-width: auto;
    }
}

.bonus-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3436;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.bonus-item:hover .bonus-tooltip {
    opacity: 1;
    visibility: visible;
}

.bonus-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2d3436;
}

/* Style pour le compteur de bonus */
.bonus-count {
    background: #e74c3c;
    color: white;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 4px;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    animation: bonusCountPulse 2s infinite;
}

/* Styles pour la modal de détail des bonus */
.bonus-detail-info {
    margin-bottom: 20px;
}

.bonus-detail-info > div {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.bonus-rarity {
    border-left-color: #6f42c1 !important;
}

.bonus-description {
    border-left-color: #28a745 !important;
}

.bonus-quantity {
    border-left-color: #ffc107 !important;
}

.bonus-price {
    border-left-color: #dc3545 !important;
}

.bonus-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.bonus-actions .btn {
    min-width: 120px;
}

.sell-bonus-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes bonusCountPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.resources {
    display: flex;
    gap: 20px;
    margin-left: auto;
    align-items: center;
}

.resource {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.resource-icon {
    font-size: 1.2rem;
}

.consumables-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.consumables-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.consumable-icon-header {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.consumable-icon-header:hover {
    transform: scale(1.1);
}

.consumable-icon-header[data-count]:not([data-count="0"])::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: bonusCountPulse 2s infinite;
}

/* Styles pour l'affichage des troupes dans le header */
.troops-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.troops-header h4 {
    margin: 0;
    flex-shrink: 0;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sort-icons {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    padding: 5px 0;
}

.sort-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
    min-height: 50px;
    font-size: 0.75rem;
    text-decoration: none;
    user-select: none;
}

.sort-icon-btn:hover {
    border-color: #74b9ff;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2);
}

.sort-icon-btn.active {
    border-color: #74b9ff;
    background: #74b9ff;
    color: white;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.sort-icon-btn .sort-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
    line-height: 1;
}

.sort-icon-btn .sort-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1;
}

.sort-direction-btn {
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
}

.sort-direction-btn:hover {
    border-color: #74b9ff;
    background: #f8f9fa;
}

.sort-direction-btn.active {
    border-color: #74b9ff;
    background: #74b9ff;
    color: white;
}

.sort-icon {
    font-size: 0.9rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.sort-direction-btn.ascending .sort-icon {
    transform: rotate(180deg);
}

/* Bouton de reset des filtres */
.clear-filters-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-transform: none;
    letter-spacing: normal;
    backdrop-filter: blur(5px);
}

.clear-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.clear-filters-btn .sort-icon {
    font-size: 1rem;
    line-height: 1;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.clear-filters-btn .sort-label {
    font-size: 0.6rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.reroll-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.reroll-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.reroll-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.reroll-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    border-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(189, 195, 199, 0.3);
}

.reroll-btn .sort-icon {
    font-size: 0.9rem;
}

.reroll-btn .sort-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.reroll-section {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.reroll-counter {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2d3436;
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Version mobile pour les contrôles de tri */
@media (max-width: 768px) {
    .troops-sort-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .sort-controls {
        justify-content: center;
    }
    
    .sort-icons {
        justify-content: center;
        gap: 3px;
    }
    
    .sort-icon-btn {
        min-width: 45px;
        min-height: 45px;
        padding: 4px 6px;
    }
    
    .sort-icon-btn .sort-icon {
        font-size: 1rem;
    }
    
    .sort-icon-btn .sort-label {
        font-size: 0.65rem;
    }
}

.troops-icons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    max-width: none;
    padding-bottom: 5px;
}

.troop-icon-header {
    position: relative;
    cursor: help;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    padding: 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
}

.troop-icon-header:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.troop-icon-header[data-count]:not([data-count="0"])::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -6px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid white;
}

.troop-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-top: 8px;
    max-width: 200px;
    text-align: center;
}

.troop-icon-header:hover .troop-tooltip {
    opacity: 1;
    visibility: visible;
}

.troop-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

/* Styles de rareté pour les icônes de troupes */
.troop-icon-header.rarity-common {
    background: rgba(102, 102, 102, 0.1);
    border-color: rgba(102, 102, 102, 0.3);
}

.troop-icon-header.rarity-uncommon {
    background: rgba(0, 184, 148, 0.1);
    border-color: rgba(0, 184, 148, 0.3);
}

.troop-icon-header.rarity-rare {
    background: rgba(116, 185, 255, 0.1);
    border-color: rgba(116, 185, 255, 0.3);
}

.troop-icon-header.rarity-epic {
    background: rgba(162, 155, 254, 0.1);
    border-color: rgba(162, 155, 254, 0.3);
}

.troop-icon-header.rarity-legendary {
    background: rgba(253, 203, 110, 0.1);
    border-color: rgba(253, 203, 110, 0.3);
}

/* Responsive pour les troupes dans le header */
@media (max-width: 768px) {
    .troops-icons {
        max-width: none;
        gap: 6px;
    }
    
    .troop-icon-header {
        font-size: 1rem;
        padding: 3px;
    }
    
    .troop-icon-header[data-count]:not([data-count="0"])::after {
        width: 14px;
        height: 14px;
        font-size: 0.5rem;
    }
    
    .troop-tooltip {
        font-size: 0.7rem;
        max-width: 150px;
    }
}

/* Zone principale */
.game-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    height: 80vh;
    padding-bottom: 100px; /* Espace pour la barre de boutons fixe */
}

/* Section des troupes */
.troops-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Section avant combat */
.pre-combat-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.pre-combat-section h3 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.pre-combat-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.shop-preview, .combat-info {
    background: #c6e0fa;
    padding: 15px;
    border-radius: 8px;
}

.shop-preview h4, .combat-info h4 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.combat-preview {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.troops-section h3 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.troops-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.troops-available, .troops-selected {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.troops-available h4, .troops-selected h4 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.troops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    min-height: 100px;
}

/* Cartes d'unités */
.unit-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* S'assurer que les cartes sans rareté ont un background blanc */
.unit-card:not([class*="rarity-"]) {
    background: white !important;
}

.unit-card:hover {
    border-color: #74b9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.unit-card.selected {
    border-color: #ff6b6b;
    border-width: 3px;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4);
    transform: scale(1.02);
}

/* Garder le gradient de rareté même quand sélectionné - Styles plus spécifiques */
.unit-card.selected.rarity-common {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.15) 0%, rgba(102, 102, 102, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

.unit-card.selected.rarity-uncommon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(0, 184, 148, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

.unit-card.selected.rarity-rare {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.15) 0%, rgba(116, 185, 255, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

.unit-card.selected.rarity-epic {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.15) 0%, rgba(162, 155, 254, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

.unit-card.selected.rarity-legendary {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.15) 0%, rgba(253, 203, 110, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

.unit-card.used {
    border-color: #d63031;
    background: #ffe8e8;
    opacity: 0.6;
    cursor: not-allowed;
}

.unit-card.used .unit-used {
    background: #d63031;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-top: 5px;
}

.unit-card .unit-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.unit-card .unit-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #2d3436;
}

.unit-card .unit-stats {
    font-size: 0.8rem;
    color: #2d3436;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.unit-card .unit-rarity {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.unit-card .unit-type {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    background: rgba(116, 185, 255, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

/* Pastille d'ordre de sélection */
.selection-order-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    border: 2px solid white;
    z-index: 10;
}

.selection-order-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}



/* Bordures de rareté pour les cartes d'unités */
.unit-card.rarity-common {
    border-color: #666666 !important;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.2) !important;
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.1) 0%, rgba(102, 102, 102, 0.05) 100%) !important;
}

.unit-card.rarity-common:hover {
    border-color: #666666 !important;
    box-shadow: 0 4px 16px rgba(102, 102, 102, 0.3) !important;
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.15) 0%, rgba(102, 102, 102, 0.08) 100%) !important;
}

.unit-card.rarity-uncommon {
    border-color: #00b894 !important;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.2) !important;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1) 0%, rgba(0, 184, 148, 0.05) 100%) !important;
}

.unit-card.rarity-uncommon:hover {
    border-color: #00b894 !important;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3) !important;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(0, 184, 148, 0.08) 100%) !important;
}

.unit-card.rarity-rare {
    border-color: #74b9ff !important;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.1) 0%, rgba(116, 185, 255, 0.05) 100%) !important;
}

.unit-card.rarity-rare:hover {
    border-color: #74b9ff !important;
    box-shadow: 0 4px 16px rgba(116, 185, 255, 0.3) !important;
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.15) 0%, rgba(116, 185, 255, 0.08) 100%) !important;
}

.unit-card.rarity-epic {
    border-color: #a29bfe !important;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.2) !important;
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.1) 0%, rgba(162, 155, 254, 0.05) 100%) !important;
}

.unit-card.rarity-epic:hover {
    border-color: #a29bfe !important;
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.3) !important;
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.15) 0%, rgba(162, 155, 254, 0.08) 100%) !important;
}

.unit-card.rarity-legendary {
    border-color: #fdcb6e !important;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.2) !important;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1) 0%, rgba(253, 203, 110, 0.05) 100%) !important;
}

.unit-card.rarity-legendary:hover {
    border-color: #fdcb6e !important;
    box-shadow: 0 4px 16px rgba(253, 203, 110, 0.3) !important;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.15) 0%, rgba(253, 203, 110, 0.08) 100%) !important;
}

/* Règles CSS plus spécifiques pour forcer l'application */
div.unit-card.rarity-legendary {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1) 0%, rgba(253, 203, 110, 0.05) 100%) !important;
}

div.unit-card.rarity-rare {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.1) 0%, rgba(116, 185, 255, 0.05) 100%) !important;
}

div.unit-card.rarity-epic {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.1) 0%, rgba(162, 155, 254, 0.05) 100%) !important;
}

div.unit-card.rarity-uncommon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1) 0%, rgba(0, 184, 148, 0.05) 100%) !important;
}

div.unit-card.rarity-common {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.1) 0%, rgba(102, 102, 102, 0.05) 100%) !important;
}

/* Styles de sélection très spécifiques pour toutes les rarités */
div.unit-card.selected.rarity-legendary {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.15) 0%, rgba(253, 203, 110, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

div.unit-card.selected.rarity-rare {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.15) 0%, rgba(116, 185, 255, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

div.unit-card.selected.rarity-epic {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.15) 0%, rgba(162, 155, 254, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

div.unit-card.selected.rarity-uncommon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(0, 184, 148, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

div.unit-card.selected.rarity-common {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.15) 0%, rgba(102, 102, 102, 0.08) 100%), linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%) !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4) !important;
}

/* Bordures de rareté pour les items du magasin */
.shop-item.rarity-common {
    border-color: #666666;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.2);
}

.shop-item.rarity-common:hover {
    border-color: #666666;
    box-shadow: 0 4px 16px rgba(102, 102, 102, 0.3);
}

.shop-item.rarity-uncommon {
    border-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.2);
}

.shop-item.rarity-uncommon:hover {
    border-color: #00b894;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3);
}

.shop-item.rarity-rare {
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2);
}

.shop-item.rarity-rare:hover {
    border-color: #74b9ff;
    box-shadow: 0 4px 16px rgba(116, 185, 255, 0.3);
}

.shop-item.rarity-epic {
    border-color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.2);
}

.shop-item.rarity-epic:hover {
    border-color: #a29bfe;
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.3);
}

.shop-item.rarity-legendary {
    border-color: #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.2);
}

.shop-item.rarity-legendary:hover {
    border-color: #fdcb6e;
    box-shadow: 0 4px 16px rgba(253, 203, 110, 0.3);
}

/* Bordures de rareté pour les options de recrutement */
.recruit-option.rarity-common {
    border-color: #666666;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.2);
}

.recruit-option.rarity-common:hover {
    border-color: #666666;
    box-shadow: 0 4px 16px rgba(102, 102, 102, 0.3);
}

.recruit-option.rarity-uncommon {
    border-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.2);
}

.recruit-option.rarity-uncommon:hover {
    border-color: #00b894;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3);
}

.recruit-option.rarity-rare {
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.2);
}

.recruit-option.rarity-rare:hover {
    border-color: #74b9ff;
    box-shadow: 0 4px 16px rgba(116, 185, 255, 0.3);
}

.recruit-option.rarity-epic {
    border-color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.2);
}

.recruit-option.rarity-epic:hover {
    border-color: #a29bfe;
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.3);
}

.recruit-option.rarity-legendary {
    border-color: #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.2);
}

.recruit-option.rarity-legendary:hover {
    border-color: #fdcb6e;
    box-shadow: 0 4px 16px rgba(253, 203, 110, 0.3);
}

/* Synergies */
.team-synergies {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.team-synergies h5 {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Styles pour les synergies dans la section de préparation au combat */
.team-synergies .synergies-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.team-synergies .synergy-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 1;
    transform: none;
    font-size: 0.9rem;
}

.synergy-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 3px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.synergy-description {
    font-size: 0.8em;
    opacity: 0.9;
    line-height: 1.2;
}

.no-synergies {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Jauge de dégâts pour les boss */
.boss-damage-gauge {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.boss-damage-gauge h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.damage-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.damage-text {
    text-align: center;
    font-weight: 600;
    color: #856404;
    font-size: 1.1rem;
}

/* Section des actions */
.actions-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-top: 3px solid #3498db;
    padding: 15px 20px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 auto;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1001;
}

/* Modal de combat plus large */
#combat-modal .modal-content {
    max-width: 95%;
    width: 95%;
    min-width: 800px;
}

/* Empêcher la fermeture de la modal de combat */
#combat-modal {
    pointer-events: auto;
}

#combat-modal .modal-content {
    pointer-events: auto;
}

/* Désactiver les interactions de fermeture pour la modal de combat */
#combat-modal .close-btn {
    display: none !important;
}

/* Empêcher la fermeture de l'animation de combat pendant un combat actif */
#combat-animation-container.combat-active {
    pointer-events: none;
}

#combat-animation-container.combat-active .close-button {
    display: none !important;
}

/* Section de fermeture de l'animation de combat */
.combat-close-section {
    text-align: center;
    padding: 15px;
}

.combat-close-section .btn {
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.combat-close-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2d3436;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 20px;
}

/* Recrutement */
.recruit-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.recruit-option {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recruit-option:hover {
    border-color: #74b9ff;
    transform: translateY(-2px);
}

.recruit-option.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
}

/* Combat */
.combat-info {
    text-align: center;
}

.combat-objective {
    margin-bottom: 20px;
}

.combat-objective h4 {
    color: #2d3436;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    width: 0%;
    transition: width 0.5s ease;
}

.combat-log {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
    font-family: monospace;
    font-size: 0.9rem;
}

.combat-log .log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 4px;
}

.combat-log .damage {
    background: #ffe6e6;
    color: #d63031;
}

.combat-log .synergy {
    background: #e8f5e8;
    color: #00b894;
}

/* Magasin */
.shop-items {
    display: grid;
    gap: 20px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Sections du shop */
.shop-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.shop-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.shop-section-unit:hover {
    border-color: #3498db;
}

.shop-section-bonus:hover {
    border-color: #e74c3c;
}

.shop-section-consumable:hover {
    border-color: #2ecc71;
}

.shop-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

.shop-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.shop-section-count {
    font-size: 0.9rem;
    color: #666;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

/* Couleurs spécifiques pour chaque section */
.shop-section-unit .shop-section-header {
    border-bottom-color: #3498db;
}

.shop-section-unit .shop-section-title {
    color: #3498db;
}

.shop-section-bonus .shop-section-header {
    border-bottom-color: #e74c3c;
}

.shop-section-bonus .shop-section-title {
    color: #e74c3c;
}

.shop-section-consumable .shop-section-header {
    border-bottom-color: #2ecc71;
}

.shop-section-consumable .shop-section-title {
    color: #2ecc71;
}

.shop-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.shop-item {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.shop-item:hover {
    border-color: #74b9ff;
    transform: translateY(-2px);
}

.shop-item .item-price {
    font-weight: 600;
    color: #ff6b6b;
    margin-top: 10px;
}

.item-type-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Couleurs spécifiques pour chaque type d'item */
.item-type-tag[data-type="bonus"] {
    background: rgba(231, 76, 60, 0.9);
}

.item-type-tag[data-type="consumable"] {
    background: rgba(46, 204, 113, 0.9);
}

.item-type-tag[data-type="unit"] {
    background: rgba(52, 152, 219, 0.9);
}

/* Bouton de rafraîchissement du magasin */
.shop-refresh-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 15px;
}

.shop-refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.shop-refresh-button:active {
    transform: translateY(0);
}

.refresh-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
    animation: refreshSpin 2s linear infinite;
}

.refresh-text {
    font-size: 1rem;
    margin-bottom: 5px;
}

.refresh-cost {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #fdcb6e;
}

@keyframes refreshSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.shop-refresh-button:hover .refresh-icon {
    animation: refreshSpin 0.5s linear infinite;
}

.shop-pack {
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.shop-pack h4 {
    color: #2d3436;
    margin-bottom: 15px;
    text-align: center;
}

.pack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Tutoriel */
.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

#tutorial-content {
    min-height: 200px;
    line-height: 1.6;
}

/* Modal nouvelle partie */
.new-game-form {
    text-align: center;
}

.new-game-form label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 15px;
}

.new-guild-name-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.new-guild-name-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.new-game-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.new-game-actions .btn {
    min-width: 150px;
}

/* Responsive */
@media (max-width: 768px) {
    .team-synergies .synergies-container {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .team-synergies .synergy-item {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    .synergy-name {
        font-size: 1.05em;
        margin-bottom: 4px;
    }
    
    .synergy-description {
        font-size: 0.85em;
    }
    
    .title-container h1 {
        font-size: 2rem;
    }
    
    .title-container h2 {
        font-size: 1.2rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .guild-header {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .guild-name-input {
        text-align: center;
        min-width: 250px;
    }
    
    .resources {
        justify-content: center;
    }
    
    .consumables-header {
        margin-top: 10px;
    }
    
    .consumables-icons {
        gap: 6px;
    }
    
    .consumable-icon-header {
        font-size: 1.3rem;
    }
    
    .troops-container {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .game-main {
        padding-bottom: 120px; /* Plus d'espace sur mobile */
    }
    
    .pack-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .btn {
        min-width: 150px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .troops-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .unit-card {
        padding: 8px;
    }
    
    .unit-card .unit-icon {
        font-size: 1.5rem;
    }
    
    .unit-card .unit-name {
        font-size: 0.8rem;
    }
    
    .unit-card .unit-stats {
        font-size: 0.7rem;
    }
} 

/* Animations de combat */
.combat-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
}

.combat-animation {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 5px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 500px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* Styles supprimés pour l'ancien bouton de fermeture */

/* Compteur principal */
.main-counter {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-radius: 12px;
    padding: 10px;
    margin: 5px 0;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    position: relative;
    overflow: hidden;
}

.main-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--progress-width, 0%);
    height: 100%;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    transition: width 0.5s ease;
    z-index: 0;
}

.main-counter.over-100::before {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    animation: over100Pulse 1s infinite;
}

.main-counter > * {
    position: relative;
    z-index: 1;
}

@keyframes over100Pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.damage-display {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.multiplier-symbol {
    color: #f39c12;
    margin: 0 8px;
    font-size: 2rem;
}

.final-result {
    font-size: 1.1rem;
    color: #ecf0f1;
    font-weight: bold;
}

/* Slider des unités */
.units-slider {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.units-slider h3 {
    margin-bottom: 15px;
    color: #3498db;
}

.unit-slide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin: 10px 0;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.unit-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.unit-slide-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.unit-slide-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.unit-slide-details {
    text-align: left;
}

.unit-slide-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.unit-slide-types {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.unit-slide-stats {
    text-align: right;
    font-weight: bold;
}

.unit-slide-damage {
    color: #e74c3c;
    font-size: 1.2rem;
}

.unit-slide-multiplier {
    color: #f39c12;
    font-size: 1rem;
}

/* Sections synergies et bonus */
.synergies-section, .bonuses-section {
    margin: 10px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid;
}

.synergies-section {
    border-left-color: #9b59b6;
}

.bonuses-section {
    border-left-color: #27ae60;
}

.synergies-section h3 {
    color: #9b59b6;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.bonuses-section h3 {
    color: #27ae60;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Nouvelle structure pour bonus et synergies sur 2 colonnes */
.bonuses-synergies-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 0;
}

.bonuses-synergies-row .bonuses-section,
.bonuses-synergies-row .synergies-section {
    margin: 0;
}

/* Version mobile : passer en une seule colonne */
@media (max-width: 768px) {
    .bonuses-synergies-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Responsive pour les sections du shop */
    .shop-section {
        margin-bottom: 20px;
        padding: 12px;
    }
    
    .shop-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shop-section-title {
        font-size: 1rem;
    }
    
    .shop-section-count {
        font-size: 0.8rem;
        align-self: flex-end;
    }
    
    .shop-section-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
}

/* Styles pour les synergies et bonus dans l'animation de combat */
.combat-animation .synergy-item, 
.combat-animation .bonus-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6px 8px;
    margin: 2px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
    border-left: 3px solid;
    min-height: 45px;
    justify-content: center;
    position: relative;
}

/* Styles de rareté pour les bonus dans l'animation de combat */
.combat-animation .bonus-item.rarity-common {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.8) 0%, rgba(127, 140, 141, 0.6) 100%);
    border-left-color: #666666;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.combat-animation .bonus-item.rarity-uncommon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.8) 0%, rgba(0, 206, 201, 0.6) 100%);
    border-left-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.combat-animation .bonus-item.rarity-rare {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.8) 0%, rgba(85, 163, 255, 0.6) 100%);
    border-left-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.combat-animation .bonus-item.rarity-epic {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.8) 0%, rgba(108, 92, 231, 0.6) 100%);
    border-left-color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.3);
}

.combat-animation .bonus-item.rarity-legendary {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.8) 0%, rgba(225, 112, 85, 0.6) 100%);
    border-left-color: #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

/* Fallback pour les bonus sans rareté dans l'animation */
.combat-animation .bonus-item:not([class*="rarity-"]) {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.8) 0%, rgba(0, 206, 201, 0.6) 100%);
    border-left-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.combat-animation .synergy-item {
    border-left-color: #9b59b6;
}

.combat-animation .bonus-item {
    border-left-color: #27ae60;
    background: rgba(255, 255, 255, 0.1);
}

/* Styles de rareté pour les bonus dans l'animation de combat */
.combat-animation .bonus-item.rarity-common {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.8) 0%, rgba(127, 140, 141, 0.6) 100%);
    border-left-color: #666666;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.combat-animation .bonus-item.rarity-uncommon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.8) 0%, rgba(0, 206, 201, 0.6) 100%);
    border-left-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.combat-animation .bonus-item.rarity-rare {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.8) 0%, rgba(85, 163, 255, 0.6) 100%);
    border-left-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.combat-animation .bonus-item.rarity-epic {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.8) 0%, rgba(108, 92, 231, 0.6) 100%);
    border-left-color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.3);
}

.combat-animation .bonus-item.rarity-legendary {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.8) 0%, rgba(225, 112, 85, 0.6) 100%);
    border-left-color: #fdcb6e;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

/* Fallback pour les bonus sans rareté dans l'animation */
.combat-animation .bonus-item:not([class*="rarity-"]) {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.8) 0%, rgba(0, 206, 201, 0.6) 100%);
    border-left-color: #00b894;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.combat-animation .synergy-item.active, 
.combat-animation .bonus-item.active {
    opacity: 1;
    transform: scale(1);
}

/* Styles pour les noms et effets dans l'animation de combat */
.combat-animation .synergy-name, 
.combat-animation .bonus-name {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 3px;
    text-align: center;
    line-height: 1.1;
}

.combat-animation .synergy-effect, 
.combat-animation .bonus-effect {
    color: #f39c12;
    font-weight: bold;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.1;
}

/* Texte noir pour les bonus légendaires dans l'animation de combat */
.combat-animation .bonus-item.rarity-legendary .bonus-effect {
    color: #000000;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Tag pour le bonus-count dans l'animation de combat */
.combat-animation .bonus-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Grille compacte pour les bonus et synergies */
#bonuses-animation-content,
#synergies-animation-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px;
}

#bonuses-animation-content-mobile,
#synergies-animation-content-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 3px;
}

/* Styles supprimés pour la barre de progression et le bouton de fermeture */

/* Image de l'ennemi dans l'animation de combat */
.enemy-animation-preview {
    margin: 5px 0;
    text-align: center;
}

.enemy-image-animation {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    border: 4px solid #e74c3c;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
}

.enemy-image-animation:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}



/* NOUVELLE ANIMATION DE VICTOIRE */
.victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: victoryScreenFadeIn 0.5s ease-out;
}

.victory-content {
    text-align: center;
    color: white;
    animation: victoryContentSlideIn 0.5s ease-out 0.1s both;
}

.victory-title {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    margin-bottom: 2rem;
    animation: victoryTitleGlow 2s ease-in-out infinite;
}

.victory-subtitle {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 3rem;
    opacity: 0;
    animation: victorySubtitleFadeIn 0.5s ease-out 0.3s both;
}

.victory-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.victory-star {
    position: absolute;
    font-size: 2rem;
    color: #ffd700;
    animation: victoryStarFloat 3s ease-in-out infinite;
}

@keyframes victoryScreenFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes victoryContentSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes victoryTitleGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 40px rgba(255, 215, 0, 1));
    }
}

@keyframes victorySubtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes victoryStarFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Encadré de victoire */
.victory-summary-box {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid #3498db;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.5s ease;
}

.victory-summary-box.show {
    transform: scale(1);
    opacity: 1;
}

.victory-summary-content h3 {
    color: #ecf0f1;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.victory-rewards {
    color: #ecf0f1;
    font-size: 1.1rem;
}

.victory-rewards p {
    margin: 8px 0;
    font-weight: 500;
}

.victory-rewards strong {
    color: #e67e22;
    font-weight: 700;
}

.reward-details {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.reward-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 1rem;
}

.reward-amount {
    color: #f39c12;
    font-weight: 600;
}

.reward-amount.total {
    color: #e67e22;
    font-size: 1.1rem;
}

.reward-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 0 0;
    padding-top: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
}

.rank-progression {
    margin: 15px 0 0 0;
    font-size: 1.1rem;
    color: #ecf0f1;
}

.victory-actions {
    margin-top: 20px;
}

.victory-continue-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: 2px solid #27ae60;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.victory-continue-btn:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* Styles pour les informations de combat */
.enemy-preview {
    text-align: center;
    margin-bottom: 15px;
}

.enemy-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    transition: transform 0.3s ease;
}

.enemy-image:hover {
    transform: scale(1.05);
}

.enemy-preview-modal {
    text-align: center;
    margin-bottom: 20px;
}

.enemy-image-modal {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    border: 4px solid #e74c3c;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    transition: transform 0.3s ease;
}

.enemy-image-modal:hover {
    transform: scale(1.05);
}

.objective-target {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}



/* Styles pour les informations de boss */
.boss-info {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid #e74c3c;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.boss-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: bold;
}

.boss-icon {
    font-size: 1.5rem;
}

.boss-name {
    color: #f1c40f;
    font-weight: bold;
}

.boss-mechanic {
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
    color: #ecf0f1;
}

/* Styles pour la liste des troupes */
.all-troops-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Styles pour le récapitulatif de partie */
.summary-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.summary-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 5px;
}

.summary-section p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #34495e;
}

.summary-section strong {
    color: #2c3e50;
}

.troop-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.troop-list-item:hover {
    background: linear-gradient(135deg, #d5dbdb 0%, #a4b0b7 100%);
    transition: background 0.3s ease;
}

/* Styles de rareté pour les éléments de liste de troupes */
.troop-list-item.rarity-common {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.1) 0%, rgba(102, 102, 102, 0.05) 100%) !important;
    border-left-color: #666666 !important;
}

.troop-list-item.rarity-uncommon {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1) 0%, rgba(0, 184, 148, 0.05) 100%) !important;
    border-left-color: #00b894 !important;
}

.troop-list-item.rarity-rare {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.1) 0%, rgba(116, 185, 255, 0.05) 100%) !important;
    border-left-color: #74b9ff !important;
}

.troop-list-item.rarity-epic {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.1) 0%, rgba(162, 155, 254, 0.05) 100%) !important;
    border-left-color: #a29bfe !important;
}

.troop-list-item.rarity-legendary {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1) 0%, rgba(253, 203, 110, 0.05) 100%) !important;
    border-left-color: #fdcb6e !important;
}

.troop-list-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
}

.troop-list-count {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.troop-list-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.troop-list-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Animations pour les notifications */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Animations pour le malus de boss */
@keyframes bossMalusAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
    100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
}

/* Styles pour l'encart de malus de boss */
.boss-malus-container {
    animation: bossMalusAppear 0.5s ease-out;
    padding: 10px;
    margin: 10px 0;
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    border-radius: 10px;
    border: 2px solid #e74c3c;
    box-shadow: 0 3px 10px rgba(142, 68, 173, 0.3);
}

.boss-malus-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
    pointer-events: none;
}

/* Styles pour l'affichage desktop de l'animation de combat */
.combat-content-desktop {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 10px 0;
}

/* Styles supprimés pour l'ancienne structure en colonnes */

.combat-content-mobile {
    display: block;
}

/* Affichage desktop pour les écrans larges */
@media (min-width: 1024px) {
    .combat-animation {
        max-width: 1200px;
        width: 90%;
        padding: 5px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .combat-content-desktop {
        display: grid;
        gap: 20px;
        margin: 10px 0;
    }
    
    .combat-content-mobile {
        display: none;
    }
    
    .units-section {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 15px;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .units-section h3 {
        color: #ecf0f1;
        margin-bottom: 10px;
        text-align: center;
        font-size: 1.2rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    /* Réduire la taille du compteur principal */
    .main-counter {
        margin: 10px 0;
    }
    
    .damage-display {
        font-size: 2rem;
    }
    
    .final-result {
        font-size: 1.2rem;
        margin-top: 5px;
    }
    
    /* Réduire la taille du malus de boss */
    .boss-malus-container {
        padding: 10px;
        margin: 10px 0;
    }
    
    .boss-malus-container .unit-stat-value {
        font-size: 1rem;
    }
    
    /* Réduire les espaces dans les sections bonus et synergies */
    .bonuses-section, .synergies-section {
        margin-bottom: 8px;
        padding: 8px;
    }
    
    .bonuses-section h3, .synergies-section h3 {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    /* Styles supprimés pour l'ancienne structure */
}

/* Styles pour les animations de bonus sur les unités */
.bonus-animation {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    animation: bonusFloat 1s ease-out forwards;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
    pointer-events: none;
}

.bonus-animation.damage {
    background: #e74c3c;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.bonus-animation.multiplier {
    background: #f39c12;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

/* Styles pour les animations de malus sur les unités */
.malus-animation {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    animation: malusFloat 1s ease-out forwards;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.6);
    border: 1px solid #c0392b;
    pointer-events: none;
}

.malus-animation.damage {
    background: #c0392b;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.6);
}

.malus-animation.multiplier {
    background: #d35400;
    box-shadow: 0 2px 8px rgba(211, 84, 0, 0.6);
}

@keyframes bonusFloat {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.7);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.8);
    }
}

@keyframes malusFloat {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.7);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.8);
    }
}

/* Styles pour les unités avec animations de stats */
.unit-slide {
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

.unit-slide:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.unit-slide.malus-applied {
    animation: unitShake 0.5s ease-in-out;
}

.unit-slide.bonus-applied {
    animation: unitGlow 0.5s ease-in-out;
}

@keyframes unitShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    75% {
        transform: translateX(3px);
    }
}

@keyframes unitGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(39, 174, 96, 0.6);
    }
}

.unit-stats-animated {
    display: flex;
    gap: 15px;
    align-items: center;
}

.unit-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
}

.unit-stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ecf0f1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.unit-stat-value.updated {
    animation: statUpdate 0.6s ease-out;
}

.unit-stat-value.updated::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    border-radius: 4px;
    z-index: -1;
    animation: glowPulse 0.6s ease-out;
}

@keyframes statUpdate {
    0% {
        transform: scale(1);
        color: #ecf0f1;
    }
    20% {
        transform: scale(1.4);
        color: #f1c40f;
    }
    40% {
        transform: scale(1.2);
        color: #f39c12;
    }
    60% {
        transform: scale(1.1);
        color: #e67e22;
    }
    100% {
        transform: scale(1);
        color: #ecf0f1;
    }
}

@keyframes glowPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

.unit-stat-label {
    font-size: 0.8rem;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === STYLES POUR LES CONSOMMABLES === */

.consumables-preview {
    background: #c6e0fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.consumables-preview h4 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.consumables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.consumable-item {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.consumable-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.consumable-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.consumable-info {
    flex: 1;
    min-width: 0;
}

.consumable-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.consumable-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
}

.use-consumable-btn {
    background: linear-gradient(45deg, #00b894, #00a085);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.use-consumable-btn:hover {
    background: linear-gradient(45deg, #00a085, #008f75);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.no-consumables {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
    grid-column: 1 / -1;
}

/* Responsive pour les consomables */
@media (max-width: 768px) {
    .consumables-grid {
        grid-template-columns: 1fr;
    }
    
    .consumable-item {
        padding: 10px;
    }
    
    .consumable-icon {
        font-size: 1.5rem;
    }
    
    .consumable-name {
        font-size: 0.9rem;
    }
    
    .consumable-description {
        font-size: 0.8rem;
    }
    
    .use-consumable-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
} 

/* Consommables */
.consumables-title {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.consumables-title h4 {
    margin: 0;
    color: #2d3436;
    font-size: 1.1rem;
    font-weight: 600;
}

.consumables-display {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Modal de transformation */
.transform-troop-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.transform-troop-card:hover {
    border-color: #74b9ff;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
    transform: translateY(-2px);
}

.transform-troop-card .troop-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.transform-troop-card .troop-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #2d3436;
}

.transform-troop-card .troop-count {
    font-size: 0.9rem;
    color: #74b9ff;
    font-weight: 600;
    margin-bottom: 10px;
}

.transform-troop-card .troop-stats {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.transform-btn {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.transform-btn:hover {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(116, 185, 255, 0.4);
}

/* Animation de transformation */
.transform-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px 50px;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.5s ease;
}

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

.transform-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.transform-arrow {
    font-size: 2rem;
    color: #74b9ff;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.transform-from {
    color: #ff7675;
}

.transform-to {
    color: #00b894;
}

.transform-troop-card .troop-count.unavailable {
    color: #d63031;
}

.transform-btn:disabled {
    background: #ddd !important;
    color: #666 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.transform-btn:disabled:hover {
    background: #ddd !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Styles pour les boutons de transformation dans la modal des troupes */
.troop-list-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.troop-list-actions .transform-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.troop-list-actions .transform-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.troop-list-actions .transform-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Styles pour la modal d'amélioration de synergie */
#synergy-upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.synergy-upgrade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.synergy-upgrade-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.synergy-info {
    flex: 1;
}

.synergy-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2d3436;
    margin-bottom: 5px;
}

.synergy-level {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.synergy-next {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 600;
}

.upgrade-synergy-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.upgrade-synergy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    background: linear-gradient(45deg, #20c997, #17a2b8);
}

.upgrade-synergy-btn:active {
    transform: translateY(0);
}

/* Responsive pour la modal d'amélioration de synergie */
@media (max-width: 768px) {
    .synergy-upgrade-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .synergy-info {
        width: 100%;
    }
    
    .upgrade-synergy-btn {
        width: 100%;
    }
}

/* Styles pour la modal Beta Test */
.beta-test-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-line;
}

/* Modal beta test plus grande */
#beta-test-modal .modal-content {
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
}

.beta-test-content h3 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.beta-test-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.beta-test-actions .btn {
    min-width: 200px;
    font-size: 1.1rem;
    padding: 12px 24px;
}

/* Responsive pour la modal Beta Test */
@media (max-width: 768px) {
    #beta-test-modal .modal-content {
        width: 95vw;
        max-height: 95vh;
    }
    
    .beta-test-content {
        font-size: 0.9rem;
        padding: 15px;
        max-height: 75vh;
    }
    
    .beta-test-actions .btn {
        min-width: 150px;
        font-size: 1rem;
        padding: 10px 20px;
    }
}

.version-number {
    font-size: 1.2rem;
    color: green;
    margin-top: 10px;
    margin-bottom: 15px;
    text-align: center;
    
}

/* Styles pour le simulateur d'équilibrage */
.simulation-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.simulation-config {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.config-item label {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.9rem;
}

.config-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.simulation-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.simulation-progress {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00b894, #00cec9);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3436;
    text-align: center;
    margin-bottom: 5px;
}

.progress-details {
    text-align: center;
    color: #636e72;
    font-size: 0.9rem;
}

.simulation-results {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.results-section {
    margin-bottom: 30px;
}

.results-section h4 {
    color: #2d3436;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #00b894;
    padding-bottom: 5px;
}

.rank-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.rank-label {
    width: 30px;
    font-weight: 600;
    color: #2d3436;
    font-size: 0.9rem;
}

.rank-bar-container {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.rank-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00b894, #00cec9);
    transition: width 0.3s ease;
}

.rank-count {
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: #636e72;
    font-size: 0.9rem;
}

.unit-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.unit-stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #00b894;
}

.synergy-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.synergy-stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #9b59b6;
}

.synergy-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    font-size: 1rem;
}

.synergy-level {
    color: #9b59b6;
    font-weight: 600;
    margin-bottom: 5px;
}

.synergy-usage {
    color: #636e72;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.synergy-active {
    color: #9b59b6;
    font-weight: 600;
    font-size: 0.85rem;
}

.bonus-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bonus-stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.bonus-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    font-size: 1rem;
}

.bonus-usage {
    color: #f39c12;
    font-weight: 600;
}

/* Statistiques des consommables */
.consumable-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.consumable-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.consumable-stat-card:hover {
    transform: translateY(-2px);
}

.consumable-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.consumable-value {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Styles pour les détails des consommables achetés */
.consumable-details {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #1a252f, #2c3e50);
    border-radius: 10px;
    border: 1px solid #34495e;
}

.consumable-details h4 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.consumable-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.consumable-type-card {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.consumable-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.consumable-type {
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.consumable-count {
    color: #3498db;
    font-weight: bold;
    margin-bottom: 3px;
}

.consumable-percentage {
    color: #95a5a6;
    font-size: 0.85rem;
}

/* Styles pour les unités achetées */
.purchased-units-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-item {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 1px solid #e74c3c;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #ecf0f1;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.purchased-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.purchased-unit-card {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.purchased-unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.purchased-unit-card .unit-name {
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.purchased-unit-card .unit-count {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 3px;
}

.purchased-unit-card .unit-percentage {
    color: #95a5a6;
    font-size: 0.85rem;
}

.no-data {
    text-align: center;
    color: #636e72;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.unit-name {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    font-size: 1rem;
}

.unit-usage {
    color: #00b894;
    font-weight: 600;
    margin-bottom: 5px;
}

.unit-rate, .unit-avg {
    color: #636e72;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

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

.recommendation-item {
    display: flex;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.recommendation-item.difficulty {
    border-left-color: #e74c3c;
}

.recommendation-item.economy {
    border-left-color: #f39c12;
}

.recommendation-item.unit {
    border-left-color: #3498db;
}

.recommendation-item.synergy {
    border-left-color: #9b59b6;
}

.rec-type {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.rec-content {
    flex: 1;
}

.rec-issue {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
}

.rec-suggestion {
    color: #636e72;
    font-size: 0.9rem;
}

.no-recommendations {
    text-align: center;
    color: #00b894;
    font-weight: 600;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive design pour le simulateur */
@media (max-width: 768px) {
    .simulation-modal {
        max-width: 95vw;
        margin: 10px;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .unit-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .simulation-controls {
        flex-direction: column;
    }
    
    .recommendation-item {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animations pour les résultats */
.simulation-results {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Styles pour les boutons du simulateur */
.simulation-controls .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.simulation-controls .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.simulation-controls .btn-primary {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.simulation-controls .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 184, 148, 0.3);
}

.simulation-controls .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.simulation-controls .btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.simulation-controls .btn-secondary {
    background: linear-gradient(135deg, #636e72, #2d3436);
    color: white;
}

.simulation-controls .btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 110, 114, 0.3);
}

.troop-damage-tooltip {
    color: #2980ef;
    font-weight: bold;
}
.troop-mult-tooltip {
    color: #e74c3c;
    font-weight: bold;
}

.shop-damage {
    color: #2980ef;
    font-weight: bold;
}
.shop-multiplier {
    color: #e74c3c;
    font-weight: bold;
}

.unit-damage {
    color: #2980ef;
    font-weight: bold;
}
.unit-multiplier {
    color: #e74c3c;
    font-weight: bold;
}

.combat-damage {
    color: #2980ef;
    font-weight: bold;
}
.combat-multiplier {
    color: #e74c3c;
    font-weight: bold;
}

/* Mode transformation */
.transform-mode {
    cursor: pointer !important;
}

.transform-mode .troop-icon-header {
    cursor: pointer !important;
    transition: all 0.3s ease;
}

.transform-mode .troop-icon-header:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.8);
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.2);
}

/* Modal de confirmation de transformation */
.transform-confirmation-content {
    text-align: center;
    padding: 20px;
}

.transform-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.transform-from,
.transform-to {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-width: 120px;
}

.transform-icon {
    font-size: 2rem;
}

.transform-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.transform-arrow {
    font-size: 2rem;
    color: #f39c12;
    animation: pulse 1.5s infinite;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.modal-footer .btn {
    flex: 1;
    max-width: 150px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Styles pour le mode transformation */
#transform-notification {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border: 3px solid #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
    animation: transformNotificationPulse 2s ease-in-out infinite;
}

.transform-notification-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
    color: white;
    font-weight: bold;
}

.transform-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transform-text {
    flex: 1;
}

.transform-title {
    font-size: 16px;
    margin-bottom: 5px;
}

.transform-description {
    font-size: 12px;
    opacity: 0.9;
}

.transform-cancel {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.transform-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

#transform-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 53, 0.1);
    z-index: 9999;
    pointer-events: none;
}

.transform-target {
    animation: transformTargetPulse 1.5s ease-in-out infinite;
    position: relative;
}

.transform-target::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid #ff6b35;
    border-radius: 50%;
    animation: transformTargetGlow 1.5s ease-in-out infinite;
}

@keyframes transformNotificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes transformTargetPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes transformTargetGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Mode transformation actif */
body.transform-mode {
    cursor: crosshair !important;
}

body.transform-mode * {
    cursor: crosshair !important;
}

body.transform-mode .troop-icon {
    cursor: pointer !important;
}

/* Contrôles de vitesse d'animation */
.animation-speed-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 0;
    background: none;
    border-radius: 0;
    justify-content: flex-end;
    border: none;
}

.speed-label {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-right: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.speed-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-transform: none;
    letter-spacing: normal;
    backdrop-filter: blur(5px);
}

.speed-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.speed-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.4);
    transform: translateY(-1px);
}

.speed-btn.active:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    transform: translateY(-1px);
}

.speed-icon {
    font-size: 1rem;
    line-height: 1;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.speed-text {
    font-size: 0.6rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .animation-speed-controls {
        gap: 6px;
    }
    
    .speed-label {
        margin-right: 6px;
        font-size: 0.9rem;
    }
    
    .speed-btn {
        padding: 5px 6px;
        min-width: 35px;
    }
    
    .speed-icon {
        font-size: 0.9rem;
    }
    
    .speed-text {
        font-size: 0.5rem;
    }
}

/* Contrôles de musique */
.music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 15px;
}

.music-label {
    font-size: 1.2rem;
    color: #fff;
    font-weight: bold;
}

.music-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: auto;
    text-transform: none;
    letter-spacing: normal;
}

.music-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.music-btn.playing {
    background: linear-gradient(45deg, #00b894, #00a085);
}

.music-btn.playing:hover {
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.4);
}

.music-icon {
    font-size: 1rem;
}

.music-text {
    font-size: 0.8rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.volume-display {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

@media (max-width: 768px) {
    .music-controls {
        flex-direction: column;
        gap: 8px;
        padding: 6px 8px;
        margin-right: 10px;
    }
    
    .music-label {
        font-size: 1rem;
    }
    
    .music-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .music-icon {
        font-size: 0.9rem;
    }
    
    .music-text {
        font-size: 0.7rem;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .volume-display {
        font-size: 0.7rem;
    }
}

/* Contrôles de musique sur le menu principal */
.title-music-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.title-music-controls .music-label {
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.title-music-controls .music-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: auto;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.title-music-controls .music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.title-music-controls .music-btn.playing {
    background: linear-gradient(45deg, #00b894, #00a085);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.title-music-controls .music-btn.playing:hover {
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.5);
}

.title-music-controls .music-icon {
    font-size: 1.2rem;
}

.title-music-controls .music-text {
    font-size: 0.9rem;
}

.title-music-controls .volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-music-controls .volume-slider {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.title-music-controls .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.5);
}

.title-music-controls .volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.5);
}

.title-music-controls .volume-display {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .title-music-controls {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        margin-top: 20px;
    }
    
    .title-music-controls .music-label {
        font-size: 1.3rem;
    }
    
    .title-music-controls .music-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .title-music-controls .music-icon {
        font-size: 1.1rem;
    }
    
    .title-music-controls .music-text {
        font-size: 0.8rem;
    }
    
    .title-music-controls .volume-slider {
        width: 80px;
    }
    
    .title-music-controls .volume-display {
        font-size: 0.8rem;
    }
}

/* Animation pour l'augmentation des bonus dynamiques */
@keyframes bonusIncrease {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.dynamic-bonus-animation {
    animation: bonusIncrease 1s ease-out;
}

/* Notifications flottantes */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
    font-size: 1rem;
    font-weight: 600;
    opacity: 1;
    background: #74b9ff;
    transition: background 0.2s;
}
.notification.success {
    background: #00b894;
}
.notification.error {
    background: #d63031;
}
.notification.info {
    background: #74b9ff;
}
.notification.slide-out {
    animation: slideOut 0.3s ease;
    opacity: 0;
}

/* Sélecteur de langue avec drapeau */
.language-selector {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.language-flag-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 40px;
}

.language-flag-btn:hover {
    border-color: #2980b9;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.language-flag-btn:active {
    transform: translateY(0);
}

.language-flag {
    font-size: 1.5rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Mini-modal pour la sélection de langue */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.language-modal.show {
    display: flex;
}

.language-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

.language-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.language-modal-header h4 {
    margin: 0;
    color: #2d3436;
    font-size: 1.2rem;
    font-weight: 600;
}

.language-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.language-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.language-modal-body {
    padding: 20px;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.language-option:hover {
    border-color: #3498db;
    background: #e3f2fd;
    transform: translateX(5px);
}

.language-option.active {
    border-color: #3498db;
    background: #e3f2fd;
}

.language-option .language-flag {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.language-option .language-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Sélecteur de langue sur l'écran de titre */
.title-language-selector {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.title-language-selector .language-flag-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 50px;
}

.title-language-selector .language-flag-btn:hover {
    border-color: #2980b9;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.title-language-selector .language-flag {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Sélecteur de langue dans la barre de menu */
.menu-language-selector {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.menu-language-selector .language-flag-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #3498db;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    min-height: 35px;
}

.menu-language-selector .language-flag-btn:hover {
    border-color: #2980b9;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.menu-language-selector .language-flag {
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

@media (max-width: 768px) {
    .language-selector {
        margin-top: 10px;
    }
    
    .language-flag-btn {
        min-width: 45px;
        min-height: 35px;
    }
    
    .language-flag {
        font-size: 1.3rem;
    }
    
    .language-modal-content {
        width: 95%;
        max-width: 280px;
    }
    
    .language-option {
        padding: 12px;
    }
    
    .language-option .language-flag {
        font-size: 1.8rem;
    }
    
    .language-option .language-name {
        font-size: 1rem;
    }
    
    /* Responsive pour les nouveaux sélecteurs */
    .title-language-selector .language-flag-btn {
        min-width: 50px;
        min-height: 40px;
    }
    
    .title-language-selector .language-flag {
        font-size: 1.5rem;
    }
    
    .menu-language-selector {
        margin-left: 10px;
    }
    
    .menu-language-selector .language-flag-btn {
        min-width: 40px;
        min-height: 30px;
    }
    
    .menu-language-selector .language-flag {
        font-size: 1.1rem;
    }
}

/* === ANIMATIONS DE DUPLICATION === */

.duplicate-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
}

.duplicate-animation.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.duplicate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.duplicate-icon {
    font-size: 2rem;
    animation: duplicatePulse 1s ease-in-out;
}

.duplicate-text {
    font-size: 1.2rem;
    font-weight: bold;
}

.duplicate-effect {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    animation: duplicateGlow 1s ease-in-out;
}

@keyframes duplicatePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes duplicateGlow {
    0%, 100% { text-shadow: 0 0 5px #ffd700; }
    50% { text-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700; }
}

/* Mode duplication */
.duplicate-mode {
    cursor: crosshair;
}

.duplicate-mode .troop-icon-header {
    cursor: crosshair;
    transition: all 0.3s ease;
}

.duplicate-mode .troop-icon-header:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    border: 2px solid #ff6b6b;
}

/* Notification de duplication */
#duplicate-notification {
    position: fixed;
    z-index: 10000;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
    animation: duplicateNotificationPulse 2s ease-in-out infinite;
}

.duplicate-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.duplicate-icon {
    font-size: 1.5rem;
}

.duplicate-text {
    flex: 1;
}

.duplicate-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.duplicate-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

.duplicate-cancel {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.duplicate-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#duplicate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 107, 0.1);
    z-index: 9999;
    pointer-events: none;
}

.duplicate-target {
    animation: duplicateTargetPulse 1s ease-in-out infinite;
}

.duplicate-target::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #ff6b6b;
    border-radius: 50%;
    animation: duplicateTargetGlow 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes duplicateNotificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes duplicateTargetPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes duplicateTargetGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

body.duplicate-mode {
    cursor: crosshair;
}

body.duplicate-mode * {
    cursor: crosshair;
}

body.duplicate-mode .troop-icon {
    cursor: crosshair;
}

/* Modal de confirmation de duplication */
.duplicate-confirmation-details {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 10px;
    color: white;
}

.duplicate-confirmation-details .duplicate-icon {
    font-size: 2rem;
}

.duplicate-confirmation-details .duplicate-description {
    flex: 1;
}

.duplicate-confirmation-details .duplicate-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.duplicate-confirmation-details .duplicate-effect {
    font-size: 0.9rem;
    opacity: 0.9;
}

.duplicate-confirmation-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.duplicate-confirmation-actions .btn {
    min-width: 100px;
}

/* Styles pour la prévisualisation de duplication */
.duplicate-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.duplicate-before,
.duplicate-after {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
}

.duplicate-count {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-shadow: none;
}

.duplicate-unit-icon {
    font-size: 1.8rem;
    margin: 5px 0;
}

.duplicate-unit {
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    line-height: 1.2;
    font-weight: 600;
    text-shadow: none;
}

.duplicate-arrow {
    font-size: 1.5rem;
    color: #2e7d32;
    font-weight: bold;
    text-shadow: none;
}

.duplicate-after {
    background: rgba(116, 185, 255, 0.1);
    border-color: rgba(116, 185, 255, 0.3);
}

.duplicate-after .duplicate-count {
    color: #2e7d32;
}

@media (max-width: 768px) {
    .duplicate-preview {
        flex-direction: column;
        gap: 15px;
    }
    
    .duplicate-before,
    .duplicate-after {
        min-width: 100px;
    }
    
    .duplicate-arrow {
        transform: rotate(90deg);
    }
}

