/* Ensure game container is the positioning context */
.game-container {
    position: relative;
    overflow: hidden; /* Prevent UI from spilling out */
}

#actionControls {
    position: absolute; /* Changed from fixed to absolute */
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    pointer-events: auto;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* [新增] 暂停按钮样式 (右上角) */
.pause-button {
    position: absolute; /* Changed from fixed to absolute */
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 32px; /* 稍微放大图标 */
    cursor: pointer;
    display: none; /* 默认隐藏，由 JS 控制显示 */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    z-index: 2000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.pause-button:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.pause-button:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    #actionControls {
        bottom: 80px; /* Above potential bottom navigation bars on mobile */
        right: 30px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .pause-button {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
