* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #1a1a2e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#soldier-count {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: bold;
    color: white;
    text-shadow: 
        0 0 10px rgba(0, 255, 136, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    z-index: 100;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.screen p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.screen button {
    margin-top: 30px;
    padding: 15px 50px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #00ff88, #00aa55);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.screen button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.6);
}

.screen button:active {
    transform: scale(0.98);
}

#end-screen h1 {
    font-size: 3.5rem;
}

#end-screen.victory h1 {
    color: #00ff88;
}

#end-screen.defeat h1 {
    color: #ff4444;
}
