* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: auto; /* Allow scrolling if content is too tall */
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
    position: relative;
}

#gameContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(39, 174, 96, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.02) 50%, transparent 51%);
    pointer-events: none;
}

#gameHeader {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
    color: #ecf0f1;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #27ae60;
    position: relative;
}

#gameHeader #gameStats {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#gameHeader h1 {
    flex: 0 0 auto;
}

#gameHeader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db, #9b59b6);
    animation: sweep 3s linear infinite;
}

@keyframes sweep {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

#gameHeader h1 {
    font-size: 28px;
    color: #ecf0f1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

#gameHeader h1::after {
    content: '⚡ TACTICAL COMMAND ⚡';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #27ae60;
    letter-spacing: 1px;
    white-space: nowrap;
}

#gameStats {
    gap: 25px;
}

.stat {
    text-align: center;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2), rgba(46, 204, 113, 0.1));
    padding: 12px 18px;
    border-radius: 8px;
    border: 2px solid rgba(39, 174, 96, 0.4);
    position: relative;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 2px 2px 0 0;
}

.stat .label {
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
    font-size: 11px;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat .value {
    font-size: 18px;
    font-weight: bold;
    color: #2ecc71;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#gameArea {
    flex: 1;
    display: flex;
    position: relative;
    gap: 0;
}

#gameCanvasContainer {
    position: relative;
    display: flex;
    flex-direction: column;
}

#gameCanvas {
    background: #2c5234;
    border: 4px solid #27ae60;
    cursor: crosshair;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 1000px;
    height: 600px;
    display: block;
}

#gameCanvas::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #27ae60, #2ecc71, #27ae60, #2ecc71);
    background-size: 20px 20px;
    animation: border-march 2s linear infinite;
    z-index: -1;
    border-radius: 2px;
}

@keyframes border-march {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* Battle Control Panel */
#battleControlPanel {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
    border: 3px solid #27ae60;
    border-top: none;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    width: 1000px;
}

#battleControlPanel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db, #9b59b6);
    background-size: 400% 100%;
    animation: command-sweep 4s linear infinite;
}

.battle-control-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.3), rgba(46, 204, 113, 0.2));
    border-radius: 6px;
    border: 2px solid rgba(39, 174, 96, 0.6);
}

.battle-control-title {
    font-weight: bold;
    color: #2ecc71;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.battle-control-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

.battle-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.battle-label {
    font-size: 10px;
    color: #27ae60;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    background: rgba(39, 174, 96, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

.battle-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 50%, #34495e 100%);
    color: #ecf0f1;
    border: 2px solid rgba(39, 174, 96, 0.5);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.battle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(39, 174, 96, 0.3), transparent);
    transition: left 0.5s ease;
}

.battle-btn:hover::before {
    left: 100%;
}

.battle-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #27ae60 100%);
    border-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(39, 174, 96, 0.4);
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.battle-btn:disabled {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    border-color: rgba(127, 140, 141, 0.5);
    color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

#towerShop {
    width: 280px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 50%, #34495e 100%);
    color: #f5f5f5;
    padding: 0;
    overflow-y: auto;
    border-left: 4px solid #27ae60;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

#towerShop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db);
    animation: pulse-border 2s ease-in-out infinite alternate;
}

@keyframes pulse-border {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

#towerShop h3 {
    margin: 0;
    padding: 20px;
    color: #ecf0f1;
    text-align: center;
    border-bottom: 3px solid #27ae60;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#towerShop h3::after {
    content: '⚔️ ARMORY ⚔️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #27ae60;
    font-size: 14px;
}

.tower-section {
    padding: 20px;
    border-bottom: 2px solid rgba(39, 174, 96, 0.3);
}

.tower-item {
    display: flex;
    align-items: center;
    padding: 18px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, 
                rgba(44, 62, 80, 0.8) 0%, 
                rgba(52, 73, 94, 0.9) 50%, 
                rgba(44, 62, 80, 0.8) 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid rgba(39, 174, 96, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tower-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(39, 174, 96, 0.2), transparent);
    transition: left 0.5s ease;
}

.tower-item:hover::before {
    left: 100%;
}

.tower-item:hover {
    background: linear-gradient(135deg, 
                rgba(39, 174, 96, 0.2) 0%, 
                rgba(52, 73, 94, 0.9) 50%, 
                rgba(39, 174, 96, 0.2) 100%);
    border-color: #27ae60;
    transform: translateX(8px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.tower-item.selected {
    background: linear-gradient(135deg, 
                rgba(46, 204, 113, 0.3) 0%, 
                rgba(39, 174, 96, 0.4) 50%, 
                rgba(46, 204, 113, 0.3) 100%);
    border-color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.5), inset 0 0 10px rgba(46, 204, 113, 0.2);
}

.tower-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(127, 140, 141, 0.5), rgba(95, 106, 106, 0.5));
    border-color: rgba(127, 140, 141, 0.5);
}

.tower-item.disabled:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tower-icon {
    width: 50px;
    height: 50px;
    margin-right: 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    font-size: 14px;
    text-transform: uppercase;
}

.tower-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 8px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tower-item:hover .tower-icon::after {
    opacity: 1;
}

.basic-tower {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 50%, #34495e 100%),
                radial-gradient(circle at 30% 30%, rgba(74, 144, 226, 0.6), transparent);
    border-color: #4a90e2;
}

.cannon-tower {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%),
                radial-gradient(circle at 30% 30%, rgba(231, 76, 60, 0.6), transparent);
    border-color: #e74c3c;
}

.laser-tower {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 50%, #8e44ad 100%),
                radial-gradient(circle at 30% 30%, rgba(155, 89, 182, 0.6), transparent);
    border-color: #9b59b6;
}

.ice-tower {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 50%, #2980b9 100%),
                radial-gradient(circle at 30% 30%, rgba(52, 152, 219, 0.6), transparent);
    border-color: #3498db;
}

.tower-info {
    flex: 1;
    position: relative;
}

.tower-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: #ecf0f1;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.tower-cost {
    color: #2ecc71;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.tower-cost::before {
    content: '💰 ';
    margin-right: 4px;
}

.tower-stats {
    font-size: 11px;
    color: #bdc3c7;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 8px;
    border-radius: 4px;
    border-left: 3px solid rgba(39, 174, 96, 0.6);
}

/* Tactical Information Panel */
.tactical-info {
    padding: 20px;
    border-top: 2px solid rgba(39, 174, 96, 0.3);
    background: linear-gradient(135deg, rgba(26, 37, 47, 0.9), rgba(44, 62, 80, 0.8));
}

.tactical-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2), rgba(46, 204, 113, 0.1));
    border-radius: 6px;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

.tactical-title {
    font-weight: bold;
    color: #2ecc71;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.tactical-stats {
    margin-bottom: 20px;
}

.tactical-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 2px solid rgba(39, 174, 96, 0.5);
    transition: all 0.3s ease;
}

.tactical-item:hover {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: #2ecc71;
}

.tactical-label {
    font-size: 11px;
    color: #bdc3c7;
    font-weight: bold;
}

.tactical-value {
    font-size: 12px;
    color: #2ecc71;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.mission-briefing {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.briefing-title {
    font-size: 11px;
    color: #f39c12;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.briefing-text {
    font-size: 10px;
    color: #ecf0f1;
    line-height: 1.4;
    text-align: justify;
}

/* Tower Control Section */
.tower-control-section {
    background: rgba(0, 0, 0, 0.4);
    padding: 18px;
    margin-top: 15px;
    border-radius: 8px;
    border: 2px solid rgba(231, 76, 60, 0.4);
    position: relative;
}

.control-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.1));
    border-radius: 6px;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.control-title {
    font-weight: bold;
    color: #e74c3c;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.tower-control-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.tower-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 50%, #34495e 100%);
    color: #ecf0f1;
    border: 2px solid rgba(231, 76, 60, 0.5);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.tower-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.3), transparent);
    transition: left 0.5s ease;
}

.tower-btn:hover::before {
    left: 100%;
}

.tower-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
    color: #ffffff;
}

.tower-btn:disabled {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    border-color: rgba(127, 140, 141, 0.5);
    color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.tower-btn.success {
    border-color: rgba(39, 174, 96, 0.5);
}

.tower-btn.success:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #27ae60 100%);
    border-color: #27ae60;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.4);
}

.tower-btn.danger {
    border-color: rgba(231, 76, 60, 0.5);
}

.tower-btn.danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
    border-color: #e74c3c;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.control-status {
    text-align: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-text {
    font-size: 10px;
    color: #bdc3c7;
    font-style: italic;
}

/* Command Instructions */
.command-instructions {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.instruction-title {
    font-size: 11px;
    color: #3498db;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.instruction-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.instruction-item {
    font-size: 9px;
    color: #bdc3c7;
    padding: 4px 8px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 3px;
    border-left: 2px solid rgba(52, 152, 219, 0.5);
    transition: all 0.3s ease;
}

.instruction-item:hover {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
    color: #ecf0f1;
}

#gameControls {
    display: none; /* Hidden since controls moved to battle control panel */
}

.btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 50%, #34495e 100%);
    color: #ecf0f1;
    border: 2px solid rgba(39, 174, 96, 0.5);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(39, 174, 96, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #27ae60 100%);
    border-color: #2ecc71;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.btn:disabled {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    border-color: rgba(127, 140, 141, 0.5);
    color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    opacity: 1; /* Make disabled buttons more visible for debugging */
}

.btn.danger {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%);
    border-color: rgba(231, 76, 60, 0.5);
}

.btn.danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #e74c3c 0%, #ec7063 50%, #e74c3c 100%);
    border-color: #ec7063;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #27ae60 100%);
    border-color: rgba(46, 204, 113, 0.5);
}

.btn.success:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ecc71 0%, #58d68d 50%, #2ecc71 100%);
    border-color: #58d68d;
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#gameMessage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#gameMessage.hidden {
    display: none;
}

#messageContent {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 400px;
}

#pauseMenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

#pauseMenu.hidden {
    display: none;
}

#pauseMenuContent {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    color: white;
    border: 3px solid #ffd700;
}

#pauseMenuContent h2 {
    margin-bottom: 30px;
    color: #ffd700;
    font-size: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#pauseMenuStats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.pause-stat {
    text-align: center;
}

.pause-stat .label {
    display: block;
    font-weight: bold;
    color: #bbb;
    margin-bottom: 5px;
    font-size: 14px;
}

.pause-stat span:last-child {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

#pauseMenuButtons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

#pauseMenuButtons .btn {
    padding: 15px 30px;
    font-size: 18px;
    min-width: 200px;
}

#backToGamesBtn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

#backToGamesBtn:hover:not(:disabled) {
    background: linear-gradient(45deg, #229954, #27ae60);
}

#pauseMenuTips {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ffd700;
}

#pauseMenuTips h3 {
    margin-bottom: 15px;
    color: #ffd700;
    text-align: center;
}

#pauseMenuTips ul {
    list-style: none;
    padding: 0;
}

#pauseMenuTips li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

#pauseMenuTips li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

/* Start Menu */
#startMenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95), rgba(52, 73, 94, 0.95)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,215,0,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

#startMenu.hidden {
    display: none;
}

#startMenuContent {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    max-width: 600px;
    color: white;
    border: 4px solid #ffd700;
    position: relative;
    overflow: hidden;
}

#startMenuContent::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.05), transparent);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

#gameTitle h1 {
    font-size: 42px;
    margin-bottom: 10px;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    font-weight: bold;
}

#gameTitle .subtitle {
    font-size: 18px;
    color: #bbb;
    margin-bottom: 40px;
    font-style: italic;
}

#startMenuButtons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

#startMenuButtons .btn {
    padding: 18px 40px;
    font-size: 20px;
    min-width: 250px;
    font-weight: bold;
}

#startGameBtn.primary {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    font-size: 24px;
    padding: 22px 40px;
}

#startGameBtn.primary:hover:not(:disabled) {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(231, 76, 60, 0.4);
}

#gamePreview {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.preview-stats {
    display: flex;
    justify-content: space-around;
}

.preview-stat {
    text-align: center;
}

.preview-stat .stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.preview-stat .stat-label {
    display: block;
    font-size: 14px;
    color: #bbb;
    margin-top: 5px;
}

/* Instructions Menu */
#instructionsMenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1003;
    overflow-y: auto;
}

#instructionsMenu.hidden {
    display: none;
}

#instructionsContent {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 40px;
    border-radius: 20px;
    color: white;
    border: 3px solid #ffd700;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
}

#instructionsContent h2 {
    text-align: center;
    color: #ffd700;
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.instruction-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 4px solid #ffd700;
}

.instruction-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 20px;
}

.tower-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tower-type {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.tower-icon-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 14px;
}

.tower-desc {
    flex: 1;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.control-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.control-item kbd {
    background: #34495e;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #555;
    margin-right: 10px;
    font-weight: bold;
    color: #ffd700;
    min-width: 40px;
    text-align: center;
}

#instructionsButtons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
}

#instructionsButtons .btn {
    padding: 15px 30px;
    font-size: 18px;
    min-width: 150px;
}

#messageTitle {
    margin-bottom: 20px;
    color: #333;
}

#messageText {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

/* Tower placement indicators */
.tower-placement {
    position: absolute;
    pointer-events: none;
    border: 2px dashed #ffd700;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
}

.tower-range {
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

/* Animation classes */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive design */
@media (max-width: 1300px) {
    #gameCanvas {
        width: 800px;
        height: 480px;
    }
    
    #towerShop {
        width: 200px;
        padding: 15px;
    }
    
    .tower-item {
        padding: 10px;
    }
    
    .tower-icon {
        width: 30px;
        height: 30px;
        margin-right: 10px;
    }
}

@media (max-width: 1000px) {
    #gameArea {
        flex-direction: column;
    }
    
    #towerShop {
        width: 100%;
        height: 150px;
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }
    
    #towerShop h3 {
        display: none;
    }
    
    .tower-item {
        min-width: 200px;
        margin-right: 10px;
        margin-bottom: 0;
    }
}

/* Health bar styles */
.health-bar {
    width: 30px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #2ecc71);
    transition: width 0.3s ease;
}

/* Loading screen */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== MOBILE RESPONSIVE STYLES ==================== */

/* Tablet Styles */
@media screen and (max-width: 1024px) {
    #gameContainer {
        flex-direction: column;
    }
    
    #gameArea {
        flex-direction: column;
    }
    
    #gameCanvasContainer {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 900px;
        height: auto;
    }
    
    .tactical-info {
        width: 100%;
        margin-top: 10px;
    }
    
    #towerShop {
        width: 100%;
        margin: 10px 0;
    }
}

/* Mobile Portrait Styles */
@media screen and (max-width: 768px) {
    body {
        touch-action: manipulation;
        -webkit-text-size-adjust: none;
    }
    
    #gameContainer {
        height: 100vh;
        overflow-y: auto;
    }
    
    #gameHeader {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    #gameHeader h1 {
        font-size: 20px;
        order: 1;
    }
    
    #gameStats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        order: 2;
    }
    
    .stat {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .stat .label {
        font-size: 10px;
    }
    
    .stat .value {
        font-size: 14px;
        font-weight: bold;
    }
    
    #gameArea {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }
    
    #gameCanvasContainer {
        width: 100%;
        position: relative;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        touch-action: none;
    }
    
    #battleControlPanel {
        position: relative;
        width: 100%;
        margin-top: 10px;
        padding: 10px;
    }
    
    .battle-control-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .battle-control-group {
        flex: 1;
        min-width: 120px;
    }
    
    .battle-btn {
        width: 100%;
        padding: 10px 8px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #towerShop {
        width: 100%;
        padding: 15px;
        border-radius: 8px;
    }
    
    .tower-section {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tower-item {
        padding: 12px;
        border-radius: 8px;
        touch-action: manipulation;
    }
    
    .tower-icon {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
    
    .tower-info {
        flex: 1;
    }
    
    .tower-name {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .tower-cost {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .tower-stats {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .tactical-info {
        width: 100%;
        padding: 15px;
        border-radius: 8px;
    }
    
    .tactical-header,
    .control-header,
    .instruction-title,
    .briefing-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .tactical-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .tactical-item {
        flex: 1;
        min-width: 80px;
        text-align: center;
        font-size: 12px;
    }
    
    .tower-control-buttons {
        display: flex;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .tower-btn {
        flex: 1;
        padding: 10px 8px;
        font-size: 12px;
        touch-action: manipulation;
    }
    
    .instruction-item {
        font-size: 11px;
        padding: 4px 0;
        line-height: 1.3;
    }
    
    .briefing-text {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Mobile Landscape Styles */
@media screen and (max-width: 768px) and (orientation: landscape) {
    #gameContainer {
        height: 100vh;
    }
    
    #gameHeader {
        padding: 8px;
        flex-direction: row;
    }
    
    #gameHeader h1 {
        font-size: 16px;
    }
    
    #gameStats {
        gap: 6px;
    }
    
    .stat {
        min-width: 70px;
        padding: 6px 8px;
        font-size: 10px;
    }
    
    #gameArea {
        flex-direction: row;
        padding: 8px;
        gap: 10px;
    }
    
    #gameCanvasContainer {
        flex: 2;
    }
    
    .game-controls-mobile {
        flex: 1;
        max-width: 250px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    #towerShop,
    .tactical-info {
        padding: 10px;
    }
}

/* Small Mobile Styles */
@media screen and (max-width: 480px) {
    #gameHeader {
        padding: 8px;
    }
    
    #gameHeader h1 {
        font-size: 18px;
    }
    
    .stat {
        min-width: 70px;
        padding: 6px 8px;
        font-size: 11px;
    }
    
    #gameArea {
        padding: 8px;
        gap: 10px;
    }
    
    .tower-section {
        grid-template-columns: 1fr;
    }
    
    .tower-item {
        padding: 15px;
        background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%) !important;
        border: 3px solid #4a90e2 !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(74,144,226,0.3) !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
        font-weight: bold !important;
        position: relative;
        overflow: hidden;
    }
    
    .tower-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, 
            rgba(255,255,255,0.2) 0%, 
            rgba(255,255,255,0.05) 50%, 
            rgba(255,255,255,0.1) 100%);
        pointer-events: none;
        z-index: 1;
    }
    
    .tower-item > * {
        position: relative;
        z-index: 2;
    }
    
    .tower-icon {
        width: 50px;
        height: 50px;
        font-size: 16px;
        background: rgba(255,255,255,0.2);
        border: 2px solid rgba(255,255,255,0.4);
        border-radius: 8px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 auto 8px auto;
        text-shadow: 2px 2px 4px rgba(0,0,0,1);
        box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 4px 8px rgba(0,0,0,0.3);
    }
    
    .tower-name {
        font-size: 14px;
        font-weight: bold;
        text-shadow: 2px 2px 4px rgba(0,0,0,1);
        margin-bottom: 6px;
    }
    
    .tower-cost {
        font-size: 15px;
        font-weight: bold;
        color: #ffff00 !important;
        text-shadow: 2px 2px 4px rgba(0,0,0,1);
        background: rgba(0,0,0,0.6);
        padding: 4px 8px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,0,0.4);
        display: inline-block;
    }
    
    .tower-stats {
        font-size: 11px;
        text-shadow: 1px 1px 2px rgba(0,0,0,1);
        background: rgba(0,0,0,0.4);
        padding: 4px 6px;
        border-radius: 4px;
        margin-top: 4px;
    }
    
    /* Enhanced mobile tower type differentiation */
    .tower-item[data-tower="basic"] {
        background: linear-gradient(135deg, #4a90e2 0%, #2c5aa0 100%) !important;
        border-color: #7bb3f0 !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(74,144,226,0.4) !important;
    }
    
    .tower-item[data-tower="cannon"] {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
        border-color: #ec7063 !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(231,76,60,0.4) !important;
    }
    
    .tower-item[data-tower="laser"] {
        background: linear-gradient(135deg, #9b59b6 0%, #7d3c98 100%) !important;
        border-color: #bb8fce !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(155,89,182,0.4) !important;
    }
    
    .tower-item[data-tower="ice"] {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
        border-color: #5dade2 !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(52,152,219,0.4) !important;
    }
    
    .battle-btn,
    .tower-btn {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .tactical-item {
        font-size: 11px;
    }
    
    .instruction-item {
        font-size: 10px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .tower-item,
    .battle-btn,
    .tower-btn,
    .btn {
        min-height: 44px;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    
    .tower-item:active,
    .tower-item:hover {
        transform: scale(0.98) translateY(-2px);
        transition: transform 0.1s;
        box-shadow: 0 8px 16px rgba(0,0,0,0.5), 0 0 25px rgba(74,144,226,0.5) !important;
    }
    
    .tower-item[data-tower="basic"]:active,
    .tower-item[data-tower="basic"]:hover {
        box-shadow: 0 8px 16px rgba(0,0,0,0.5), 0 0 25px rgba(74,144,226,0.6) !important;
    }
    
    .tower-item[data-tower="cannon"]:active,
    .tower-item[data-tower="cannon"]:hover {
        box-shadow: 0 8px 16px rgba(0,0,0,0.5), 0 0 25px rgba(231,76,60,0.6) !important;
    }
    
    .tower-item[data-tower="laser"]:active,
    .tower-item[data-tower="laser"]:hover {
        box-shadow: 0 8px 16px rgba(0,0,0,0.5), 0 0 25px rgba(155,89,182,0.6) !important;
    }
    
    .tower-item[data-tower="ice"]:active,
    .tower-item[data-tower="ice"]:hover {
        box-shadow: 0 8px 16px rgba(0,0,0,0.5), 0 0 25px rgba(52,152,219,0.6) !important;
    }
    
    .battle-btn:active,
    .tower-btn:active,
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s;
        background: rgba(39, 174, 96, 0.8) !important;
    }
}

/* Additional mobile button styles */
@media screen and (max-width: 768px) {
    .btn, .battle-btn, .tower-btn {
        position: relative;
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn::before, .battle-btn::before, .tower-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        opacity: 0;
        transition: opacity 0.2s;
        pointer-events: none;
    }
    
    .btn:active::before, .battle-btn:active::before, .tower-btn:active::before {
        opacity: 1;
    }
}

/* Menu responsiveness */
@media screen and (max-width: 768px) {
    #startMenu,
    #pauseMenu,
    #instructionsMenu {
        padding: 20px;
    }
    
    #startMenuContent,
    #pauseMenuContent,
    #instructionsContent {
        max-width: 100%;
        padding: 20px;
    }
    
    #gameTitle h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        margin: 5px auto;
        padding: 12px 20px;
        font-size: 14px;
        touch-action: manipulation;
    }
    
    .preview-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .preview-stat {
        padding: 15px;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .control-item {
        font-size: 12px;
        padding: 8px;
    }
    
    kbd {
        font-size: 11px;
        padding: 4px 6px;
    }
}

/* Mobile Help Overlay */
.mobile-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-help-overlay.hidden {
    display: none !important;
}

.mobile-help-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 2px solid #27ae60;
    border-radius: 15px;
    padding: 25px;
    max-width: 300px;
    color: #ecf0f1;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-help-content h3 {
    margin-bottom: 20px;
    color: #27ae60;
    font-size: 18px;
}

.mobile-help-item {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 8px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.help-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 30px;
}

.help-text {
    font-size: 14px;
    text-align: left;
    flex: 1;
}

.btn-small {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 100px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 1001;
    position: relative;
}

.btn-small:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
}

.btn-small:active {
    transform: translateY(0);
}

/* Mobile-specific tower selection improvements */
@media screen and (max-width: 768px) {
    .tower-item.selected {
        border: 3px solid #f39c12;
        box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
        transform: scale(1.02);
    }
    
    .tower-item:active {
        transform: scale(0.98);
    }
    
    /* Larger touch targets for mobile */
    .battle-btn,
    .tower-btn,
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improved readability on mobile */
    .tactical-value,
    .stat .value {
        font-weight: bold;
        font-size: 16px;
    }
    
    /* Mobile-friendly tooltips */
    .tower-tooltip {
        position: absolute;
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 12px;
        pointer-events: none;
        z-index: 100;
        max-width: 200px;
        text-align: center;
    }
}


