body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background-color: #000;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

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

/* Joystick */
#joystick-container {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: 150px;
    height: 150px;
    pointer-events: auto;
}

#joystick-base {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#joystick-stick {
    width: 60px;
    height: 60px;
    background: #00bcd4;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.8);
}

/* Action Buttons */
#shoot-container {
    position: absolute;
    bottom: 50px;
    right: 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-end;
    pointer-events: auto;
}

.action-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s;
}

.action-btn:active {
    transform: scale(0.9);
}

#shoot-btn {
    background: #e91e63;
    border: 4px solid #ad1457;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
}

#super-btn {
    width: 120px;
    height: 120px;
    background: #ffeb3b;
    border: 5px solid #fbc02d;
    box-shadow: 0 5px 20px rgba(255, 235, 59, 0.5);
    overflow: hidden;
}

.super-locked {
    filter: grayscale(0.8);
    opacity: 0.6;
    pointer-events: none;
}

#super-charge-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(255, 152, 0, 0.8);
    transition: height 0.3s;
    z-index: 1;
}

.inner-btn {
    font-size: 40px;
    z-index: 2;
}

/* HUD elements */
#top-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
}

#timer {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#team-score {
    font-size: 32px;
    font-weight: 800;
    margin-top: 5px;
}

.blue-score {
    color: #2196f3;
}

.red-score {
    color: #f44336;
}

#player-hud {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
}

.health-bar-container {
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

#player-health-bar {
    width: 100%;
    height: 100%;
    background: #4caf50;
    transition: width 0.3s;
}

#player-health-text {
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.ammo-container {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ammo-slot {
    width: 40px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.ammo-slot.active {
    background: #ffeb3b;
}

/* Game Over */
#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 100;
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

#game-over h1 {
    font-size: 60px;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

#game-over button {
    padding: 15px 40px;
    font-size: 24px;
    margin: 10px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    background: #e91e63;
    color: white;
    font-weight: bold;
    transition: 0.2s;
}

#game-over button:hover {
    transform: scale(1.1);
    background: #f50057;
}

@media (max-width: 768px) {
    #joystick-container {
        left: 20px;
        bottom: 20px;
        width: 120px;
        height: 120px;
    }

    #shoot-container {
        right: 20px;
        bottom: 20px;
        gap: 15px;
    }

    .action-btn {
        width: 80px;
        height: 80px;
    }

    #super-btn {
        width: 90px;
        height: 90px;
    }
}