.player-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed */
}

.player-card {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 10px;
    min-width: 120px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.p1-card {
    border-color: #4CAF50;
}

/* Green */
.p2-card {
    border-color: #2196F3;
}

/* Blue */
.p3-card {
    border-color: #F44336;
}

/* Red */

.player-name {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    font-size: 14px;
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.stat-label {
    width: 25px;
    font-size: 10px;
    font-weight: bold;
    opacity: 0.8;
}

.stat-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.hp-bar {
    background: #E91E63;
}

.mp-bar {
    background: #03A9F4;
}

.player-status {
    margin-top: 5px;
    font-size: 11px;
    font-style: italic;
    color: #ddd;
    text-align: center;
    min-height: 15px;
    /* Prevent jitter */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}