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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, #87CEEB 0%, #B8D4E8 50%, #8B7355 50%, #654321 100%);
}

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

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.ui-overlay button {
    pointer-events: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    gap: 20px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 280px;
}

.blue-team .team-name {
    color: #4A90E2;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.red-team .team-name {
    color: #E74C3C;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.resource-display {
    display: flex;
    gap: 15px;
    color: #FFD700;
    font-size: 16px;
    font-weight: bold;
}

.gold-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.statue-health {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.health-bar {
    width: 150px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.health-fill {
    height: 100%;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
    width: 100%;
}

.enemy-fill {
    background: linear-gradient(to right, #E74C3C, #C0392B);
}

.center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wave-info {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.timer {
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
}

.spawn-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.spawn-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
    min-width: 80px;
}

.spawn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.spawn-btn:active {
    transform: translateY(0);
}

.spawn-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.spawn-btn small {
    display: block;
    font-size: 11px;
    margin-top: 2px;
    color: #FFD700;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 40px;
}

.overlay-content h1 {
    font-size: 64px;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overlay-content p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 40px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.game-button:active {
    transform: translateY(0);
}

.controls-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    pointer-events: none;
    z-index: 5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .player-info {
        min-width: auto;
        width: 100%;
    }
    
    .spawn-controls {
        bottom: 10px;
        padding: 10px;
        gap: 6px;
    }
    
    .spawn-btn {
        padding: 8px 10px;
        font-size: 12px;
        min-width: 60px;
    }
    
    .overlay-content h1 {
        font-size: 48px;
    }
    
    .overlay-content p {
        font-size: 14px;
    }
    
    .controls-hint {
        font-size: 11px;
        bottom: 80px;
    }
}


