/* Interactive CSS - Touch Interactions and Animation Styles */

/* Mobile Tower Placement Controls - Overlay over canvas controls */
#mobile-placement-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.mobile-control-btn {
    padding: 12px 20px;
    border: 2px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 14px;
    min-height: 44px;
    min-width: 150px;
}

.confirm-btn {
    background: #90EE90;
    border-color: #32CD32;
    color: #228B22;
}

.cancel-btn {
    background: #FFB6C1;
    border-color: #FF69B4;
    color: #DC143C;
}

/* Consolidated hover effects for mobile control buttons */
.confirm-btn:hover,
.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.confirm-btn:hover {
    background: #98FB98;
}

.cancel-btn:hover {
    background: #FFA0B4;
}

.mobile-control-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.mobile-control-btn .hotkey {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 18px;
    font-weight: bold;
}

/* Enhanced mobile touch targets and accessibility */
.tower-btn:active,
button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Enhanced interaction feedback for touch-capable devices (universal) */
.touch-device .tower-btn:hover,
.touch-device .tower-btn:active,
.tower-btn:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.touch-device button:hover,
.touch-device button:active,
button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.touch-device .header-btn:hover,
.touch-device .header-btn:active,
.header-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.touch-device #game-canvas {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

/* Media query adjustments for mobile controls */
@media (max-width: 900px), (max-height: 700px) {
    /* Mobile placement controls responsive styling */
    #mobile-placement-controls {
        gap: 8px;
    }

    .mobile-control-btn {
        flex: 1;
        padding: 10px 15px;
        font-size: 12px;
        min-width: 200px;
    }
}

/* Animation keyframes */
@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(var(--explosion-scale));
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}