:root {
    --zone1-color: #00FFFF;
    --zone2-color: #FF4500;
    --bg-color: #2c3e50;
    --text-color: #ecf0f1;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 10px;
    user-select: none;
    height: 100vh;
    overflow: hidden;
}

/* --- Controls Panel --- */
#controls-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

#controls-panel h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #f1c40f;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#btn-start {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 0 #1e8449;
    transition: transform 0.1s;
}

#btn-start:active {
    transform: translateY(4px);
    box-shadow: none;
}

#btn-start:disabled {
    background-color: #7f8c8d;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.5;
}

/* --- Game Board --- */
#game-board {
    width: 500px;
    height: 600px;
    background-color: #34495e;
    position: relative;
    border: 4px solid #1a252f;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

/* --- Game Over Modal --- */
#game-over-modal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s;
}

.hidden { display: none !important; }

#game-over-modal h1 {
    font-size: 48px;
    color: #f1c40f;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

#game-over-modal button {
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
    background: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    color: #333;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Zones and Targets --- */
.zone {
    width: 100%;
    height: 200px;
    position: absolute;
    box-sizing: border-box;
    padding: 10px;
}
#zone-2 { top: 0; border-bottom: 2px dashed var(--zone2-color); background: rgba(255, 69, 0, 0.05); }
#zone-1 { bottom: 0; border-top: 2px dashed var(--zone1-color); background: rgba(0, 255, 255, 0.05); }

.zone-label {
    position: absolute;
    font-weight: bold;
    font-size: 20px;
    opacity: 0.3;
    pointer-events: none;
}
#zone-2 .zone-label { right: 10px; top: 10px; color: var(--zone2-color); }
#zone-1 .zone-label { right: 10px; bottom: 10px; color: var(--zone1-color); }

.target-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}
#container-b { top: 20px; }
#container-a { bottom: 20px; }

.target {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 24px; font-weight: 900;
    background: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    margin-bottom: 5px;
    position: relative;
}
#target-b { border: 4px solid var(--zone2-color); color: var(--zone2-color); }
#target-a { border: 4px solid var(--zone1-color); color: var(--zone1-color); }

.hp-bar {
    width: 80px; height: 10px;
    background: #000;
    border-radius: 5px; overflow: hidden;
    border: 1px solid white;
}
.hp-fill { height: 100%; width: 100%; transition: width 0.2s ease-out; }
#hp-b .hp-fill { background-color: var(--zone2-color); }
#hp-a .hp-fill { background-color: var(--zone1-color); }

/* --- Units and Bar --- */

.unit {
    width: 45px;          /* Slightly larger */
    height: 45px;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    
    /* CHANGED HERE: */
    font-size: 24px;      /* Emoji Size */
    line-height: 1;
    border: 2px solid rgba(255,255,255,0.3); /* Subtle border for aesthetics */
    
    font-weight: bold;
    cursor: grab;
    z-index: 10;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    will-change: left, top;
}
.placed-unit { cursor: default; }
.unit span { pointer-events: none; text-shadow: 1px 1px 0 #000; }

#selection-bar {
    width: 500px;
    background-color: #1a252f;
    padding: 10px;
    border-radius: 8px;
    display: flex; justify-content: center; gap: 15px;
    transition: opacity 0.3s;
}

/* Class to visually disable the bar */
#selection-bar.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(100%);
}

.stat-tooltip { font-size: 10px; color: #aaa; margin-top: 50px; text-align: center; }

/* --- VFX --- */
.projectile {
    position: absolute; width: 10px; height: 10px; border-radius: 50%;
    z-index: 20; pointer-events: none;
}
.floating-text {
    position: absolute; font-weight: bold; font-size: 18px; pointer-events: none;
    animation: floatUp 0.8s forwards; z-index: 100; text-shadow: 1px 1px 0 #000;
}
@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-30px) scale(1.2); opacity: 0; }
}