#gameCanvas {
    position: relative;
    width: 700px; 
    height: 700px; 
    background: linear-gradient(135deg, #1e90ff, #87cefa);
    border-radius: inherit;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.2);
}

.popupMenu button {
    background: linear-gradient(145deg, #007acc, #005f99);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s, background-color 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    gap: 10px;
    margin: 2px;
}

.popupMenu button:hover {
    background: linear-gradient(145deg, #005f99, #003f66);
    transform: translateY(-2px);
}

.popupMenu button img {
    width: 85px;
    height: 85px;
}

.popupMenu button:active {
    transform: translateY(1px);
}

#turretMenu button{
    width: 200px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table th, table td {
    padding: 12px;
    text-align: left;
}

table th {
    background-color: #f4f4f4;
    font-weight: bold;
    color: #333;
}

table td {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

#stats-table th {
    background-color: #007bff;
    color: #fff;
}

.tip-image {
    width: 100%;
    max-width: 400px; 
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-content {
    display: none; 
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
}

.dropdown-toggle {
    margin-top: 5px;
    padding: 8px 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.dropdown-toggle:hover {
    background: #0056b3;
}

#wizard-placement {
    width: 120px;
}

#bad-placement {
    width: 220px;
}

.enemy-card canvas {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    image-rendering: pixelated;
  }
  
.enemies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-around;
  }
  
  .enemy-card {
    width: 200px;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    background-color: #f9f9f9;
  }
  
  .enemy-card img {
    width: 100px;
    height: auto;
    border-radius: 5px;
  }
  
  .enemy-card h3 {
    margin: 10px 0;
  }
  
  .enemy-card p {
    font-size: 14px;
    color: #666;
  }
  
.turret-info {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 180px; /* Increased height significantly for better layout */
    background: linear-gradient(145deg, 
        rgba(15, 23, 42, 0.98) 0%, 
        rgba(30, 41, 59, 0.95) 25%,
        rgba(15, 23, 42, 0.98) 50%,
        rgba(30, 41, 59, 0.95) 75%,
        rgba(15, 23, 42, 0.98) 100%
    );
    backdrop-filter: blur(25px) saturate(200%);
    color: #fff;
    padding: 20px 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    font-family: 'Exo 2', sans-serif;
    box-shadow: 
        0 -15px 50px rgba(59, 130, 246, 0.3),
        0 -8px 25px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.8) 0%,
        rgba(147, 51, 234, 0.8) 25%,
        rgba(236, 72, 153, 0.8) 50%,
        rgba(147, 51, 234, 0.8) 75%,
        rgba(59, 130, 246, 0.8) 100%
    ) 1;
    border-radius: 20px 20px 0 0;
    z-index: 50;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    border-left: 1px solid rgba(59, 130, 246, 0.4);
    border-right: 1px solid rgba(59, 130, 246, 0.4);
    overflow: hidden;
}

.turret-info::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.9) 0%,
        rgba(147, 51, 234, 0.9) 25%,
        rgba(236, 72, 153, 0.9) 50%,
        rgba(147, 51, 234, 0.9) 75%,
        rgba(59, 130, 246, 0.9) 100%
    );
    background-size: 200% 100%;
    animation: borderFlow 4s ease-in-out infinite;
}

.turret-info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(59, 130, 246, 0.8), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(236, 72, 153, 0.6), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(147, 51, 234, 0.8), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(59, 130, 246, 0.5), transparent),
        radial-gradient(2px 2px at 80% 80%, rgba(236, 72, 153, 0.7), transparent);
    background-size: 200px 200px, 300px 300px, 150px 150px, 250px 250px, 180px 180px;
    animation: particleFloat 8s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes borderFlow {
    0% { 
        background-position: 0% 50%;
        opacity: 0.8; 
    }
    50% { 
        background-position: 100% 50%;
        opacity: 1; 
    }
    100% { 
        background-position: 0% 50%;
        opacity: 0.8; 
    }
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-10px) rotate(90deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-5px) rotate(180deg);
        opacity: 1;
    }
    75% { 
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.7;
    }
}

#turretDetailsHeader {
    top: 40%;
    left: -10px;
}

.turret-info h3 {
    position: relative;
    margin: 4px 0 8px 0; 
    font-size: 12px; 
    letter-spacing: 0.5px; 
    color: #FFF;
    text-shadow: 
        0 0 15px rgba(59, 130, 246, 0.8),
        0 0 30px rgba(147, 51, 234, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
    font-family: 'Orbitron', 'Russo One', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(145deg, 
        rgba(15, 23, 42, 0.98) 0%, 
        rgba(30, 41, 59, 0.98) 50%,
        rgba(15, 23, 42, 0.98) 100%
    );
    padding: 6px 12px; 
    border-radius: 6px; 
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.6) 0%,
        rgba(147, 51, 234, 0.6) 50%,
        rgba(59, 130, 246, 0.6) 100%
    ) 1;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.turret-info h3::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.3) 0%,
        rgba(147, 51, 234, 0.3) 25%,
        rgba(236, 72, 153, 0.3) 50%,
        rgba(147, 51, 234, 0.3) 75%,
        rgba(59, 130, 246, 0.3) 100%
    );
    border-radius: 0 0 17px 17px;
    animation: headerGlow 3s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes headerGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.turret-info .info-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch; 
    width: 100%;
    height: 110%;
    gap: 15px; 
    margin-top: 0; 
    position: relative;
    z-index: 5;
}

#turretCurrentStats {
    flex: 1; 
    background: linear-gradient(145deg, 
        rgba(22, 78, 99, 0.85) 0%, 
        rgba(15, 58, 80, 0.9) 50%,
        rgba(8, 47, 73, 0.95) 100%
    );
    padding: 15px; 
    border-radius: 15px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(56, 189, 248, 0.2);
    border: 2px solid rgba(56, 189, 248, 0.4);
    font-size: 14px; 
    line-height: 1.4; 
    height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-weight: 600;
    color: #e8f4f8;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    word-wrap: break-word; 
    min-width: 0; 
    padding-top:20px;

}

#turretCurrentStats:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 12px 25px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(56, 189, 248, 0.4);
}

#turretCurrentStats::before {
    content: attr(data-level);
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 11px;
    font-weight: 700;
    color: #38BDF8;
    background: linear-gradient(145deg, 
        rgba(15, 58, 80, 0.98) 0%, 
        rgba(8, 47, 73, 0.98) 100%
    );
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#turretCurrentStats::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(56, 189, 248, 0.1), 
        transparent
    );
    animation: currentStatsFlow 4s ease-in-out infinite;
}

@keyframes currentStatsFlow {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

#turretNextStats {
    flex: 1; 
    background: linear-gradient(145deg, 
        rgba(120, 53, 15, 0.85) 0%, 
        rgba(146, 64, 14, 0.9) 50%,
        rgba(154, 52, 18, 0.95) 100%
    );
    padding: 15px; 
    border-radius: 15px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(251, 146, 60, 0.2);
    border: 2px solid rgba(251, 146, 60, 0.4);
    font-size: 14px; 
    line-height: 1.4; 
    height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    font-weight: 600;
    color: #fef3e2;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    word-wrap: break-word; 
    min-width: 0; 
    padding-top:20px;
}

#turretNextStats:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 12px 25px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(251, 146, 60, 0.4);
}

#turretNextStats::before {
    content: 'NEXT LEVEL';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 11px;
    font-weight: 700;
    color: #FB923C;
    background: linear-gradient(145deg, 
        rgba(146, 64, 14, 0.98) 0%, 
        rgba(154, 52, 18, 0.98) 100%
    );
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(251, 146, 60, 0.5);
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#turretNextStats::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(251, 146, 60, 0.1), 
        transparent
    );
    animation: nextStatsFlow 4s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes nextStatsFlow {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

#upgradeCostLabel {
    position: absolute;
    top: 20px;
    right: 220px;
    font-size: 20px;
    font-weight: 700;
    color: #FFF;
    text-align: center;
    padding: 8px 20px;
    background: linear-gradient(145deg, 
        rgba(168, 85, 247, 0.9) 0%, 
        rgba(139, 69, 19, 0.9) 100%
    );
    border-radius: 25px;
    font-family: 'Russo One', sans-serif;
    border: 2px solid rgba(168, 85, 247, 0.5);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(168, 85, 247, 0.3);
    text-shadow: 
        0 0 10px rgba(168, 85, 247, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
    animation: costPulse 2s ease-in-out infinite alternate;
}

@keyframes costPulse {
    0% { 
        transform: scale(1);
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(168, 85, 247, 0.3);
    }
    100% { 
        transform: scale(1.05);
        box-shadow: 
            0 6px 20px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(168, 85, 247, 0.5);
    }
}

.upgrade-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
    width: 180px; 
    height: auto; 
    justify-content: center;
    position: relative;
    z-index: 10;
    align-self: center; 
}

.turret-info .buttons-container {
  display: flex;
  gap: 12px; 
  align-items: center;
  justify-content: center;
}

.damage-counter {
    position: absolute;
    top: 15px;
    right: 25px;
    padding: 6px 14px;
    background: linear-gradient(145deg, 
        rgba(239, 68, 68, 0.9) 0%, 
        rgba(185, 28, 28, 0.95) 100%
    );
    border-radius: 25px;
    font-size: 15px;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(239, 68, 68, 0.3);
    border: 2px solid rgba(248, 113, 113, 0.5);
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
    animation: damageGlow 2s ease-in-out infinite alternate;
}

.damage-counter::before {
    content: '⚔️';
    font-size: 14px;
}

@keyframes damageGlow {
    0% { 
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(239, 68, 68, 0.3);
    }
    100% { 
        box-shadow: 
            0 6px 20px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(239, 68, 68, 0.5);
    }
}

#upgradeButton {
    position: relative;
    padding: 18px 30px;
    height: 70px;
    width: 160px;
    background: linear-gradient(145deg, 
        rgba(34, 197, 94, 0.9) 0%, 
        rgba(21, 128, 61, 0.95) 50%,
        rgba(15, 118, 110, 1) 100%
    );
    border: 2px solid rgba(34, 197, 94, 0.6);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    border-radius: 15px;
    font-weight: 700;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(34, 197, 94, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Exo 2', sans-serif;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    margin-top: 50px;
}

#upgradeButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transition: left 0.6s ease;
}

#upgradeButton:hover::before {
    left: 100%;
}

#upgradeButton:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(34, 197, 94, 0.5);
    background: linear-gradient(145deg, 
        rgba(34, 197, 94, 1) 0%, 
        rgba(21, 128, 61, 1) 50%,
        rgba(15, 118, 110, 1) 100%
    );
    border-color: rgba(34, 197, 94, 0.8);
}

#upgradeButton.blue {
    background: linear-gradient(145deg, 
        rgba(59, 130, 246, 0.9) 0%, 
        rgba(37, 99, 235, 0.95) 50%,
        rgba(29, 78, 216, 1) 100%
    );
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(59, 130, 246, 0.3);
}

#upgradeButton.blue:hover {
    background: linear-gradient(145deg, 
        rgba(59, 130, 246, 1) 0%, 
        rgba(37, 99, 235, 1) 50%,
        rgba(29, 78, 216, 1) 100%
    );
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(59, 130, 246, 0.5);
}

#upgradeButton.red {
    background: linear-gradient(145deg, 
        rgba(239, 68, 68, 0.9) 0%, 
        rgba(220, 38, 38, 0.95) 50%,
        rgba(185, 28, 28, 1) 100%
    );
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(239, 68, 68, 0.3);
}

#upgradeButton.red:hover {
    background: linear-gradient(145deg, 
        rgba(239, 68, 68, 1) 0%, 
        rgba(220, 38, 38, 1) 50%,
        rgba(185, 28, 28, 1) 100%
    );
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(239, 68, 68, 0.5);
}

#sellButton {
    position: absolute;
    top: 8px;
    left: 15px;
    padding: 5px 12px;
    height: 40px;
    background: linear-gradient(145deg, 
        rgba(251, 146, 60, 0.9) 0%, 
        rgba(245, 101, 101, 0.95) 100%
    );
    border: 2px solid rgba(251, 146, 60, 0.6);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 14x rgba(251, 146, 60, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#sellButton:hover {
    background: linear-gradient(145deg, 
        rgba(251, 146, 60, 1) 0%, 
        rgba(245, 101, 101, 1) 100%
    );
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(251, 146, 60, 0.5);
    border-color: rgba(251, 146, 60, 0.8);
}


@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Exo+2:wght@400;600;700&display=swap');

#turretMenu.turret-shop-active {
    display: flex !important; 
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Changed from flex-start to space-between */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(20, 20, 20, 0.95)); 
    backdrop-filter: blur(8px);
    border-radius: 0 15px 15px 0; 
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 150; 
    font-family: 'Exo 2', sans-serif;
    overflow: visible; /* Ensures tooltips can appear outside */
}
.turret-shop-scroll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: calc(100% - 70px); /* Leave space for controls at bottom */
    position: relative;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-right: 20px; /* Compensate for scrollbar width */
    margin-right: -20px; /* Offset the padding */
}

.turret-shop-scroll-container::-webkit-scrollbar {
    width: 10px;
}

.turret-shop-scroll-container::-webkit-scrollbar-track {
    background: rgba(40, 40, 40, 0.5);
    border-radius: 0 8px 8px 0;
}

.turret-shop-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg, #7c2cbf, #5a1f8a);
    border-radius: 5px;
    border: 2px solid rgba(20, 20, 20, 0.7);
}

.turret-shop-scroll-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg, #8c36cf, #6a2f9a);
    box-shadow: 0 0 5px rgba(120, 44, 190, 0.5);
}
.turret-shop-header {
    display: flex;
    justify-content: space-between;
    width: 90%;
    background: rgba(40, 40, 40, 0.7);
    border-radius: 10px;
    padding: 10px 15px;
    margin: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.shop-stat img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.shop-stat-value {
    font-family: 'Russo One', sans-serif;
    font-size: 1.2em;
    color: #FFD700; 
}

.shop-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
    position: relative;
}

.shop-back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.shop-back-button:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-50%) translateX(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(120, 44, 190, 0.5);
}

.shop-back-button:active {
    transform: translateY(-50%) translateX(0px) scale(0.95);
    transition: transform 0.1s ease;
}

.shop-back-button img {
    width: 20px;
    height: 20px;
    filter: brightness(1.2) drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.shop-title {
    width: 100%;
    text-align: center;
    margin: 0;
    color: #FFD700;
    font-family: 'Russo One', sans-serif;
    font-size: 1.5em;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
    letter-spacing: 1px;
}

.turret-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
    width: 90%;
    margin: 0 auto; 
    padding: 6px; 
}

.turret-shop-item {
    position: relative; 
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.8), rgba(40, 40, 40, 0.8));
    border: 2px solid #7c2cbf; 
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 155px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000; 
}

.turret-shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(120, 44, 190, 0.5);
    border-color: #9c4cdf;
    z-index: 1001; 
}

.turret-shop-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.turret-shop-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #888;
}


.turret-name {
    color: white;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    text-align: center;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 32px;
    margin-top:-14px;
}

.price-tag {
    position: absolute;
    bottom: 10px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Russo One', sans-serif;
}


.turret-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%; 
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 230px; 
    min-width: 220px; 
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.95));
    color: #FFD700 !important; 
    text-align: left;
    padding: 15px;
    border-radius: 10px;
    z-index: 1200; 
    transition: all 0.3s ease;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    pointer-events: none; 
    border: 1px solid rgba(120, 44, 190, 0.3);
    
    box-sizing: border-box; 
    margin: 0;
}

.turret-tooltip * {
    color: #FFD700 !important;
}


.turret-shop-item:hover .turret-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Hover transforms for top row tooltips */
.turret-shop-item:nth-child(1):hover .turret-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(0) translateY(5px);
}

/* Hover transform for sniper tooltip (2nd card) - move left */
.turret-shop-item:nth-child(2):hover .turret-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(50%) translateX(-50%);
}

.turret-shop-item:nth-child(3):hover .turret-tooltip,
.turret-shop-item:nth-child(4):hover .turret-tooltip {
    transform: translateX(0) translateY(-5px);
}


.turret-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: rgba(20, 20, 20, 0.95) transparent transparent transparent;
}



.tooltip-title {
    color: #FFD700;
    font-family: 'Russo One', sans-serif;
    font-size: 1.2em;
    margin: 0 0 8px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
}

.tooltip-description {
    color: #FFA500 !important;
    margin: 5px 0 8px 0;
    font-style: italic;
    font-size: 0.85em;
    line-height: 1.2;
}

.tooltip-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 8px;
    margin-top: 8px;
    font-size: 0.85em;
}

.stat-label {
    color: #8BC34A !important; 
    font-weight: 600;
    text-align: right;
}

.stat-value {
    color: #FFD700 !important;
}

#cancelTurretSelectionButton {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-top: auto;
    width: 80%;
    max-width: 250px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#cancelTurretSelectionButton:hover {
    background: linear-gradient(145deg, #d32f2f, #b71c1c);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.turret-shop-item:nth-child(1) .turret-tooltip,
.turret-shop-item:nth-child(3) .turret-tooltip {
    left: 10px;
    transform: translateX(0);
}

/* Position tooltips below for top row turret cards */
.turret-shop-item:nth-child(1) .turret-tooltip {
    bottom: auto;
    top: 130%;
}

/* Position sniper tooltip (2nd card) to the left */
.turret-shop-item:nth-child(2) .turret-tooltip {
    bottom: 50%;
    top: auto;
    left: auto;
    right: 100%;
    transform: translateY(50%);
}

.turret-shop-item:nth-child(1) .turret-tooltip:after,
.turret-shop-item:nth-child(3) .turret-tooltip:after {
    left: 20%;
}

/* Arrow pointing up for first card tooltip */
.turret-shop-item:nth-child(1) .turret-tooltip:after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent rgba(20, 20, 20, 0.95) transparent;
}

/* Arrow pointing right for sniper tooltip (2nd card) */
.turret-shop-item:nth-child(2) .turret-tooltip:after {
    top: 50%;
    bottom: auto;
    left: 100%;
    right: auto;
    transform: translateY(-50%);
    border-color: transparent transparent transparent rgba(20, 20, 20, 0.95);
}


.turret-shop-item:nth-child(2) .turret-tooltip,
.turret-shop-item:nth-child(4) .turret-tooltip {
    left: auto;
    right: 10px;
    transform: translateX(0);
}




.turret-shop-item:nth-child(3):hover .turret-tooltip,
.turret-shop-item:nth-child(4):hover .turret-tooltip {
    transform: translateX(0) translateY(-5px);
}


.turret-hover-info {
    position: absolute;
    display: none;
    width: 220px;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.95));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    padding: 12px;
    color: white;
    z-index: 100;
    font-family: 'Exo 2', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.turret-hover-title {
    color: #FFD700;
    font-family: 'Russo One', sans-serif;
    font-size: 1.1em;
    margin: 0 0 8px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 4px;
}

.turret-hover-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    font-size: 0.85em;
}

.turret-hover-label {
    color: #8BC34A;
    font-weight: 600;
    text-align: right;
}

.turret-hover-value {
    color: white;
}

#buyText {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(145deg, #4CAF50, #388E3C);
    color: white;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#buyText:hover {
    background: linear-gradient(145deg, #5BBD60, #43A047);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#buyText img {
    width: 22px !important;
    height: 22px !important;
}

.easy-tooltip {
    border-color: rgba(100, 255, 100, 0.3);
}

.normal-tooltip {
    border-color: rgba(255, 200, 100, 0.3);
}

.hard-tooltip {
    border-color: rgba(255, 100, 100, 0.3);
}

.popup.minion-warning.show {
    opacity: 1;
}


#powerUpMenu.power-up-shop-active {
    display: flex !important; 
    flex-direction: column;
    align-items: center;
    /* justify-content: space-between; */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(20, 20, 20, 0.95)); 
    backdrop-filter: blur(8px);
    border-radius: 0 15px 15px 0; 
    padding: 20px;
    box-sizing: border-box;
    z-index: 150; 
    font-family: 'Exo 2', sans-serif;
    overflow: visible; 
}


.turret-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.turret-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.turret-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

.turret-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.2);
    border-color: #007bff;
}

.turret-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.turret-card-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.turret-card-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.turret-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.turret-quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
}

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

.quick-stat .stat-value {
    font-weight: 700;
    color: #007bff;
}

.turret-ability {
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.ability-label {
    font-weight: 700;
    color: #2e7d32;
    margin-right: 8px;
}

.ability-text {
    color: #388e3c;
    font-style: italic;
}

/* Enhanced Table Styles */
.table-turret-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-turret-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.section-header {
    color: #2c3e50;
    font-size: 1.6rem;
    margin: 30px 0 20px 0;
    padding: 10px 0;
    border-bottom: 3px solid #007bff;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #28a745;
}

/* Power-up Overview Cards */
.powerup-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.powerup-card {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.powerup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
}

.powerup-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
}

.powerup-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 2px solid #ffcc02;
}

.powerup-card-image {
    width: 56px;
    height: 56px;
    margin-right: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
}

.powerup-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d84315;
    margin: 0;
}

.powerup-description {
    color: #5d4037;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 18px;
    font-weight: 500;
}

.powerup-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.powerup-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
}

.powerup-stat .stat-label {
    font-weight: 600;
    color: #6d4c41;
}

.powerup-stat .stat-value {
    font-weight: 700;
    color: #e65100;
}

.powerup-tips {
    background: linear-gradient(135deg, #f3e5f5 0%, #e8f5e8 100%);
    padding: 14px;
    border-radius: 10px;
    border-left: 4px solid #9c27b0;
}

.tips-label {
    font-weight: 700;
    color: #7b1fa2;
    margin-right: 8px;
}

.tips-text {
    color: #4a148c;
    font-style: italic;
    line-height: 1.4;
}

/* Power-up Usage Guide */
.powerup-usage-guide {
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.usage-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.usage-step {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.step-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.powerup-notes {
    margin-top: 20px;
    padding: 18px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.powerup-notes h3 {
    margin: 0 0 12px 0;
    color: #155724;
    font-size: 1.2rem;
}

.powerup-notes ul {
    margin: 0;
    padding-left: 20px;
}

.powerup-notes li {
    color: #155724;
    margin: 8px 0;
    line-height: 1.4;
}

/* Evolution badge styles */
.evolution-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(45deg, #FF5722, #FF8A50);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.evolution-badge.unlocked {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    animation: evolutionPulse 2s infinite;
}

.evolution-badge.locked {
    background: linear-gradient(45deg, #FF5722, #FF8A50);
    cursor: pointer;
}

.evolution-badge:hover.unlocked {
    background: linear-gradient(45deg, #45a049, #7CB342);
    transform: scale(1.1);
}

.evolution-badge:hover.locked {
    background: linear-gradient(45deg, #E64A19, #FF7043);
    transform: scale(1.05);
}

.evolution-badge:hover {
    transform: scale(1.05);
}

@keyframes evolutionPulse {
    0%, 100% { 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% { 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(76, 175, 80, 0);
    }
}

/* Evolution progress styles */
.evolution-progress {
    margin-top: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 5px;
    background: rgba(255, 165, 0, 0.1);
}

.evolution-progress-title {
    color: #FFB347 !important;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.evolution-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
}

.evolution-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35, #FFB347);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.evolution-progress-text {
    color: #FFD700 !important;
    font-size: 0.8em;
    text-align: center;
    margin-top: 3px;
}

/* Evolution requirement styling for locked cards */
.turret-shop-item.evolved .evolution-progress {
    border-color: rgba(255, 99, 71, 0.5);
    background: rgba(255, 99, 71, 0.1);
}

.turret-shop-item.evolved .evolution-progress-title {
    color: #FF6347 !important;
}

.turret-shop-item.evolved .evolution-progress-fill {
    background: linear-gradient(90deg, #FF4500, #FF6347);
}

.turret-shop-item.evolved {
    background: linear-gradient(145deg, rgba(75, 85, 150, 0.9), rgba(55, 65, 130, 0.9));
    border-color: #6C7B95;
}

.turret-shop-item.evolved:hover {
    border-color: #8A9BB8;
    box-shadow: 0 8px 20px rgba(108, 123, 149, 0.5);
}

/* Evolution card flip animation */
@keyframes flipCard {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.turret-shop-item.flipping {
    animation: flipCard 0.6s ease-in-out;
}

/* Ensure all buttons in upgrade section have consistent styling */
.upgrade-section button {
    position: relative;
    border: 2px solid;
    cursor: pointer;
    font-weight: 700;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.upgrade-section button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transition: left 0.6s ease;
}

.upgrade-section button:hover::before {
    left: 100%;
}

.upgrade-section button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

#setTargetButton {
    position: absolute;
    top: 58px; /* Position below sell button (8px + 40px height + 10px gap) */
    left: 15px; /* Same left position as sell button */
    padding: 10px 15px;
    height: 40px; /* Same height as sell button */
    width: auto; /* Auto width to match content */
    font-size: 15px; /* Same font size as sell button */
    background: linear-gradient(145deg, 
        rgba(168, 85, 247, 0.9) 0%, 
        rgba(147, 51, 234, 0.95) 100%
    );
    border: 2px solid rgba(168, 85, 247, 0.6);
    color: #fff;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(168, 85, 247, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#setTargetButton:hover {
    background: linear-gradient(145deg, 
        rgba(168, 85, 247, 1) 0%, 
        rgba(147, 51, 234, 1) 100%
    );
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(168, 85, 247, 0.5);
    border-color: rgba(168, 85, 247, 0.8);
}

/* Power-up Shop Item Styles - Taller/longer than turret shop items */
.power-up-shop-item {
    position: relative; 
    background: linear-gradient(145deg, rgba(60, 40, 80, 0.8), rgba(40, 25, 60, 0.8));
    border: 2px solid #9C27B0; 
    border-radius: 10px;
    padding: 15px 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 200px; /* Taller than turret shop items (155px) */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000; 
}

.power-up-shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.5);
    border-color: #E91E63;
    z-index: 1001; 
}

.power-up-shop-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.power-up-shop-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #888;
}

.power-up-shop-item .turret-name {
    color: white;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    text-align: center;
    margin: 0 0 10px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.power-up-shop-item .power-up-description {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.75em;
    text-align: center;
    margin: 5px 0;
    line-height: 1.3;
    padding: 0 5px;
}

.power-up-shop-item .price-tag {
    position: relative;
    bottom: auto;
    background: linear-gradient(90deg, #9C27B0, #E91E63);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Russo One', sans-serif;
    margin-top: 8px;
}

/* Power-up Shop Grid */
.power-up-shop-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column for taller cards */
    gap: 15px; 
    width: 90%;
    margin: 0 auto; 
    padding: 10px 6px; 
}